/* The board (/board, a test variant): a chat and one build plate, the dark
   studio's look. Where the chat sits is the page's data-chat - left, right or
   a composer at the bottom - so the three can be compared live. */

:root {
  --bg: #0b0b0c; --panel: #121214; --card: #18181b; --card-hi: #1f1f23;
  --line: rgba(255, 255, 255, 0.08); --line-strong: rgba(255, 255, 255, 0.16);
  --ink: rgba(255, 255, 255, 0.94); --ink-mid: rgba(255, 255, 255, 0.64);
  --ink-dim: rgba(255, 255, 255, 0.42);
  --accent: #e9d8d0; --accent-ink: #171513;
  --ok: #3ccf7a; --warn: #e8b04a; --err: #f06a5a;
  --serif: "Playfair Display", Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --chat-w: 380px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button, select, textarea, input { font: inherit; color: inherit; }
button:disabled { opacity: .45; cursor: default; }
[hidden] { display: none !important; }

.bd { --side-w: 300px; height: 100dvh; display: grid; grid-template-rows: 56px minmax(0, 1fr);
  grid-template-columns: var(--chat-w) minmax(0, 1fr) var(--side-w);
  grid-template-areas: "top top top" "chat stage side"; }
.bd[data-chat="right"] { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--chat-w);
  grid-template-areas: "top top top" "side stage chat"; }
.bd[data-chat="bottom"] { grid-template-columns: minmax(0, 1fr) var(--side-w);
  grid-template-areas: "top top" "stage side"; }

/* ---------------------------------------------------------------- top bar */
.bd-top { grid-area: top; display: flex; align-items: center; gap: 16px; padding: 0 16px;
  border-bottom: 1px solid var(--line); background: var(--bg); min-width: 0; }
.bd-mark { font: 500 20px/1 var(--serif); color: var(--ink); text-decoration: none;
  letter-spacing: 0.01em; }
.bd-crumb { color: var(--ink-mid); padding-left: 14px; border-left: 1px solid var(--line); }
.bd-crumb em { font-style: normal; font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-dim); border: 1px solid var(--line-strong);
  border-radius: 99px; padding: 1px 7px; margin-left: 6px; }
.bd-top-mid { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-width: 0; margin-left: auto; }
/* home, all boards, the open boards as tabs, + */
.bd-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px;
  color: var(--ink-mid); background: none; border: 0; cursor: pointer; }
.bd-icon:hover { color: var(--ink); background: var(--card); }
.bd-icon svg, .bd-tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.bd-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 0 1 auto; overflow-x: auto;
  scrollbar-width: none; margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--line); }
.bd-tabs::-webkit-scrollbar { display: none; }
.bd-tab { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 12px; border-radius: 8px;
  color: var(--ink-mid); text-decoration: none; flex: none; max-width: 200px; }
.bd-tab:hover { background: var(--card); color: var(--ink); }
.bd-tab[aria-current="page"] { background: var(--card-hi); color: var(--ink); }
.bd-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-tab button { width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--ink-dim);
  display: grid; place-items: center; cursor: pointer; flex: none; opacity: 0; }
.bd-tab:hover button, .bd-tab[aria-current="page"] button { opacity: 1; }
.bd-tab button:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.bd-tab button svg { width: 12px; height: 12px; }
.bd-tab input { width: 150px; border: 1px solid var(--line-strong); background: var(--card); border-radius: 6px;
  padding: 2px 6px; }
.bd-beta { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-dim);
  border: 1px solid var(--line-strong); border-radius: 99px; padding: 1px 7px; flex: none; }
.bd-printer { display: flex; align-items: center; gap: 8px; color: var(--ink-dim); }
.bd-printer select { background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 6px 10px; max-width: 220px; }
.bd-bed { color: var(--ink-dim); font-size: 12px; white-space: nowrap; }
.bd-top-end { display: flex; align-items: center; gap: 8px; }
.bd-seg { display: flex; padding: 3px; gap: 2px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--panel); }
.bd-seg button { width: 32px; height: 28px; border: 0; border-radius: 8px; background: none;
  display: grid; place-items: center; cursor: pointer; color: var(--ink-dim);
  transition: background .15s ease, color .15s ease; }
.bd-seg button:hover { color: var(--ink); }
.bd-seg button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.bd-seg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.bd-seg svg .f { fill: currentColor; stroke: none; }
.bd-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card);
  cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap;
  transition: background .15s ease, transform .12s var(--ease); }
.bd-btn:hover { background: var(--card-hi); }
.bd-btn:active { transform: scale(0.97); }
.bd-btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent;
  font-weight: 600; }
.bd-btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* ---------------------------------------------------------------- the chat */
.bd-chat { grid-area: chat; display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--line); background: var(--panel); }
.bd[data-chat="right"] .bd-chat { border-right: 0; border-left: 1px solid var(--line); }
.bd-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column;
  gap: 14px; scrollbar-width: thin; }
.bd-msg { display: flex; gap: 10px; align-items: flex-start; animation: bd-in .25s var(--ease); }
.bd-msg.you { justify-content: flex-end; }
.bd-msg .bubble { max-width: 86%; padding: 9px 13px; border-radius: 16px; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.bd-msg.you .bubble { background: rgba(255, 255, 255, 0.08); border-bottom-right-radius: 6px; }
.bd-msg.ai .bubble { padding: 4px 0; color: var(--ink); }
.bd-msg.ai .ai-orb { flex: none; margin-top: 2px; }
.bd-msg .sub { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-dim); }
.bd-msg .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bd-msg .chip { font-size: 12px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-strong);
  color: var(--ink-mid); }
.bd-msg .chip.err { border-color: rgba(240, 106, 90, .45); color: #f3a39a; }
@keyframes bd-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.bd-ask { margin: 10px 12px 12px; border: 1px solid var(--line-strong); border-radius: 18px;
  background: var(--card); padding: 10px 10px 8px 14px;
  transition: border-color .15s ease, box-shadow .15s ease; }
.bd-ask:focus-within { border-color: rgba(233, 216, 208, 0.45);
  box-shadow: 0 0 0 4px rgba(233, 216, 208, 0.06); }
.bd-ask textarea { width: 100%; resize: none; border: 0; outline: 0; background: none;
  min-height: 44px; max-height: 160px; line-height: 1.45; }
.bd-ask textarea::placeholder { color: var(--ink-dim); }
.bd-ask-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.bd-add { border: 1px solid var(--line-strong); background: none; border-radius: 99px;
  padding: 4px 11px; font-size: 12.5px; color: var(--ink-mid); cursor: pointer; white-space: nowrap; }
.bd-add:hover { color: var(--ink); border-color: rgba(255, 255, 255, .3); }
.bd-left { flex: 1; font-size: 12px; color: var(--ink-dim); text-align: right; }
.bd-send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent);
  display: grid; place-items: center; cursor: pointer; transition: transform .12s var(--ease), opacity .15s; }
.bd-send:active { transform: scale(0.94); }
.bd-send:disabled { opacity: .35; cursor: default; }
.bd-send svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-ink); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }

/* Bottom: the chat is a composer over the plate, its history above it. */
.bd[data-chat="bottom"] .bd-chat { grid-area: stage; z-index: 5; align-self: end; justify-self: center;
  width: min(720px, calc(100% - 32px)); margin-bottom: 18px; border: 0; background: none;
  pointer-events: none; max-height: 62%; }
.bd[data-chat="bottom"] .bd-log { pointer-events: auto; background: rgba(18, 18, 20, 0.92);
  backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 18px 18px 0 0;
  border-bottom: 0; max-height: min(26vh, 240px); padding: 14px 16px; }
.bd[data-chat="bottom"] .bd-log:empty { display: none; }
.bd[data-chat="bottom"] .bd-ask { pointer-events: auto; margin: 0; border-radius: 22px;
  background: rgba(26, 26, 28, 0.96); backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.bd[data-chat="bottom"] .bd-log:not(:empty) + .bd-ask { border-top-left-radius: 0;
  border-top-right-radius: 0; }
.bd[data-chat="bottom"][data-empty="true"] .bd-chat { align-self: center; margin-bottom: 0;
  transform: translateY(70px); }

/* ---------------------------------------------------------------- the stage */
.bd-stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.bd-canvas { position: absolute; inset: 0; }
.bd-canvas canvas { display: block; width: 100%; height: 100%; }
.bd-hero { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 24px; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 40%, rgba(11, 11, 12, 0.6), rgba(11, 11, 12, 0.92)); }
.bd[data-empty="false"] .bd-hero { display: none; }
.bd[data-chat="bottom"] .bd-hero { justify-content: center; padding-bottom: 200px; }
.bd-hero h1 { margin: 0 0 10px; font: 500 clamp(28px, 3.4vw, 44px)/1.1 var(--serif); }
.bd-hero p { margin: 0 0 22px; max-width: 520px; color: var(--ink-mid); }
.bd-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 680px;
  pointer-events: auto; }
.bd-ideas button { border: 1px solid var(--line-strong); background: rgba(24, 24, 27, .85);
  border-radius: 99px; padding: 7px 14px; cursor: pointer; color: var(--ink-mid);
  transition: color .15s, border-color .15s, transform .12s var(--ease); }
.bd-ideas button:hover { color: var(--ink); border-color: rgba(255, 255, 255, .32); }
.bd-ideas button:active { transform: scale(0.97); }

.bd-status { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4;
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px;
  background: rgba(24, 24, 27, .92); border: 1px solid var(--line); font-size: 13px; color: var(--ink-mid); }
.bd-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: bd-pulse 1s ease-in-out infinite alternate; }
@keyframes bd-pulse { from { opacity: .3; } to { opacity: 1; } }

/* The side panel, as Blender's outliner over its properties: the pieces as
   rows, then the chosen piece's settings. */
.bd-side { grid-area: side; min-height: 0; display: flex; flex-direction: column; background: var(--panel);
  border-left: 1px solid var(--line); position: relative; }
/* The settings panel widens by its inner edge, as the studio's does. */
.bd-side-grip { position: absolute; top: 0; bottom: 0; left: -4px; width: 8px; cursor: col-resize;
  touch-action: none; z-index: 5; }
.bd-side-grip:hover, .bd-side-grip:focus-visible, .bd.is-resizing .bd-side-grip {
  background: linear-gradient(90deg, transparent 3px, var(--accent) 3px, var(--accent) 5px, transparent 5px);
  outline: none; }
.bd[data-chat="right"] .bd-side-grip { left: auto; right: -4px; }
.bd.is-resizing, .bd.is-resizing * { cursor: col-resize !important; user-select: none; }
.bd[data-chat="right"] .bd-side { border-left: 0; border-right: 1px solid var(--line); }
.bd-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px 8px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-dim); }
.bd-side-head b { font-weight: 500; color: var(--ink-mid); margin-left: 4px; }
.bd-items { flex: 0 1 auto; max-height: 42%; overflow-y: auto; padding: 0 6px 8px; display: flex;
  flex-direction: column; gap: 1px; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
.bd-items:empty::after { content: "Nothing yet - ask in the chat, or + Add item."; color: var(--ink-dim);
  font-size: 12.5px; padding: 6px 8px 10px; }
.bd-row { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 4px 0 8px; border-radius: 8px;
  cursor: pointer; color: var(--ink-mid); }
.bd-row:hover { background: rgba(255, 255, 255, .04); color: var(--ink); }
.bd-row[aria-selected="true"] { background: rgba(233, 216, 208, .12); color: var(--ink); }
.bd-row .bd-item-dot { width: 7px; height: 7px; }
/* a set's pieces, nested under it */
.bd-sub { height: 28px; padding-left: 26px; font-size: 12.5px; }
.bd-sub .bd-item-dot { width: 5px; height: 5px; }
.bd-row.err .bd-item-dot { background: var(--err); }
.bd-row.off .bd-item-dot { background: var(--warn); }
.bd-row.wait .bd-item-dot { background: var(--ink-dim); }
.bd-row.words .bd-item-dot { background: var(--ink-dim); }
.bd-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-row-cols { display: flex; flex: none; }
.bd-row-cols i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .35);
  margin-left: -3px; }
.bd-row button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; flex: none;
  color: var(--ink-dim); cursor: pointer; display: grid; place-items: center; }
.bd-row button:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.bd-row button[aria-pressed="true"] { color: var(--accent); }
.bd-row svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }

/* the chosen piece's settings, as Figma's right panel */
.bd-props { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px 20px; display: grid;
  align-content: start; gap: 12px; scrollbar-width: thin; }
.bd-props h3 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.bd-props h3 span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-props .bd-item-meta, .bd-props .bd-item-msg, .bd-props .bd-item-note, .bd-props .bd-sw { margin-left: 0; }
.bd-props .bd-item-meta { margin-top: -8px; }
.bd-pgroup { display: grid; gap: 8px; }
.bd-pgroup > h4 { margin: 4px 0 0; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-dim); font-weight: 500; }
.bd-prow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-mid); }
.bd-prow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-prow input[type="text"], .bd-prow input[type="number"], .bd-prow select {
  width: 100%; min-width: 0; height: 28px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 12.5px; }
.bd-prow input:focus, .bd-prow select:focus { outline: none; border-color: var(--line-strong); }
.bd-prow .bd-range { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 6px; align-items: center; }
.bd-prow input[type="range"] { width: 100%; accent-color: var(--accent); }
.bd-prow input[type="checkbox"] { justify-self: start; accent-color: var(--accent); width: 16px; height: 16px; }
.bd-item { background: rgba(20, 20, 23, 0.92); backdrop-filter: blur(12px); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease; animation: bd-in .25s var(--ease); }
.bd-item:hover { border-color: var(--line-strong); }
.bd-item[aria-selected="true"] { border-color: rgba(233, 216, 208, .55); background: rgba(30, 28, 27, .95); }
.bd-item-head { display: flex; align-items: center; gap: 8px; }
.bd-item-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ok); }
.bd-item.err .bd-item-dot { background: var(--err); }
.bd-item.wait .bd-item-dot { background: var(--ink-dim); }
.bd-item-name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.bd-item-x { border: 0; background: none; color: var(--ink-dim); cursor: pointer; padding: 2px 4px;
  border-radius: 6px; font-size: 16px; line-height: 1; }
.bd-item-x:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.bd-item-meta { font-size: 12px; color: var(--ink-dim); margin: 3px 0 0 16px; }
.bd-item-msg { font-size: 12px; margin: 6px 0 0 16px; color: #f3a39a; }
.bd-item-msg.is-words { color: var(--ink-mid); }
.bd-item-note { font-size: 12px; margin: 6px 0 0 16px; color: var(--ink-mid); }
.bd-sw { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 16px; }
.bd-sw button { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: none; border-radius: 99px; padding: 2px 8px 2px 3px; cursor: pointer;
  font-size: 11.5px; color: var(--ink-mid); }
.bd-sw button:hover { border-color: var(--line-strong); color: var(--ink); }
.bd-sw i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); }

.bd-fils { display: flex; gap: 4px; align-items: center; font-size: 11px; color: var(--ink-dim);
  text-transform: none; letter-spacing: 0; }
.bd-fils:empty { display: none; }
.bd-fils i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); }
.bd-notes { position: absolute; right: 14px; top: 14px; z-index: 3; width: 280px; display: flex;
  flex-direction: column; gap: 8px; }
.bd-notes .bd-note { display: flex; gap: 8px; align-items: flex-start; background: rgba(40, 30, 16, .92);
  border: 1px solid rgba(232, 176, 74, .35); color: #f0d29a; border-radius: 12px; padding: 9px 8px 9px 12px;
  font-size: 12.5px; }
.bd-note span { flex: 1; }
.bd-note-x { flex: none; border: 0; background: none; color: inherit; opacity: .6; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px; }
.bd-note-x:hover { opacity: 1; }
.bd-notes-hide, .bd-notes-tab { align-self: flex-end; border: 1px solid rgba(232, 176, 74, .35);
  background: rgba(40, 30, 16, .85); color: #f0d29a; border-radius: 999px; padding: 4px 11px;
  font-size: 12px; cursor: pointer; }
.bd-notes-hide:hover, .bd-notes-tab:hover { background: rgba(60, 44, 20, .95); }

.bd-lie { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-lie button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 5px 10px;
  font-size: 12.5px; color: var(--ink-mid); cursor: pointer; }
.bd-lie button:hover { border-color: var(--line-strong); color: var(--ink); }

/* Notices about the board (not the conversation): over the plate, a few seconds. */
.bd-toasts { position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(520px, calc(100% - 32px));
  pointer-events: none; }
.bd-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
  border-radius: 12px; background: rgba(24, 24, 27, .96); border: 1px solid var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-size: 13px; color: var(--ink); animation: bd-in .2s var(--ease); }
.bd-toast a { color: var(--accent); white-space: nowrap; }
.bd-toast button { margin-left: auto; border: 0; background: none; color: var(--ink-dim); cursor: pointer;
  width: 24px; height: 24px; border-radius: 6px; font-size: 16px; line-height: 1; flex: none; }
.bd-toast button:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }

/* Menus: add an item, pick a colour. */
.bd-menu { position: fixed; z-index: 50; background: #1b1b1e; border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  max-height: 60vh; overflow-y: auto; min-width: 220px; animation: bd-in .16s var(--ease); }
.bd-menu button { display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.bd-menu button:hover { background: rgba(255, 255, 255, .07); }
.bd-menu small { color: var(--ink-dim); display: block; font-size: 11.5px; }
.bd-tiles { width: min(560px, calc(100vw - 16px)); display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
  gap: 6px; padding: 8px; }
.bd-tiles button.bd-tile { display: grid; grid-template-rows: auto 1fr; align-content: start; gap: 6px;
  padding: 6px; text-align: center; border-radius: 10px; font-size: 12px; line-height: 1.25;
  color: var(--ink-mid); }
.bd-tiles button.bd-tile:hover { color: var(--ink); }
.bd-tile .bd-tile-im { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 8px;
  overflow: hidden; background: #0f0f11; }
.bd-tile img, .bd-tile .bd-tile-ph { width: 100%; height: 100%; object-fit: cover; display: grid;
  place-items: center; }
.bd-tile .bd-tile-tag { position: absolute; top: 6px; right: 6px; font-size: 9.5px; font-weight: 600;
  letter-spacing: .04em; text-transform: none; padding: 2px 7px; border-radius: 999px;
  background: rgba(196, 220, 124, .16); color: #c4dc7c; border: 1px solid rgba(196, 220, 124, .35); }
.bd-tile .bd-tile-ph svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.bd-tile em { font-style: normal; }
.bd-tiles .bd-tiles-head { grid-column: 1 / -1; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-dim); padding: 4px 4px 0; }

/* Connect your own generator */
.bd-dlg { border: 1px solid var(--line-strong); border-radius: 16px; background: #18181b; color: var(--ink);
  padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.bd-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.bd-dlg-in { padding: 20px 22px; display: grid; gap: 12px; }
.bd-dlg h2 { margin: 0; font-size: 18px; font-weight: 600; }
.bd-dlg h2 em { font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-dim); border: 1px solid var(--line-strong); border-radius: 99px; padding: 1px 7px;
  margin-left: 6px; vertical-align: 3px; }
.bd-dlg p { margin: 0; color: var(--ink-mid); font-size: 13.5px; }
.bd-dlg code { font-size: 12px; background: var(--card-hi); padding: 1px 5px; border-radius: 5px; }
.bd-dlg a { color: var(--accent); }
.bd-dlg-field { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-mid); }
.bd-dlg-field input { height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--ink); }
.bd-dlg-field input:focus { outline: none; border-color: var(--accent); }
.bd-dlg-err { color: #f3a39a !important; min-height: 1em; }
.bd-dlg-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45;
  padding: 12px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.bd-dlg-check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.bd-dlg .bd-btn:disabled { opacity: .45; cursor: not-allowed; }
.bd-dlg-err:empty { display: none; }
.bd-dlg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bd-dlg-grow { flex: 1; }
/* the guest's Download: one email field, one big button (owner, 01.11) */
#signDlg { width: min(420px, calc(100vw - 32px)); }
#signDlg input { font-size: 16px; }            /* 16px: iOS does not zoom into the field */
.bd-dlg-wide { width: 100%; height: 44px; justify-content: center; font-size: 15px; font-weight: 600; }
.bd-dlg-small { font-size: 13px; color: var(--ink-mid); }
.bd-link { background: none; border: 0; padding: 4px 0; color: var(--ink-dim); font-size: 13px; cursor: pointer; }
.bd-link:hover { color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bd-dlg-more summary { cursor: pointer; color: var(--ink-mid); font-size: 13px; }
.bd-dlg-more p { margin-top: 8px; }

.bd-pal { display: grid; grid-template-columns: repeat(9, 24px); gap: 6px; padding: 10px; min-width: 0; }
.bd-pal button { width: 24px; height: 24px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22); }
.bd-pal button:hover { transform: scale(1.12); background: inherit; }

@media (max-width: 900px) {
  .bd, .bd[data-chat] { grid-template-columns: 1fr; grid-template-rows: 56px 1fr auto;
    grid-template-areas: "top" "stage" "chat"; }
  .bd, .bd[data-chat] { grid-template-rows: 56px minmax(0, 1fr) auto auto;
    grid-template-areas: "top" "stage" "side" "chat"; }
  .bd .bd-chat { grid-area: chat; max-height: 40vh; border: 0; border-top: 1px solid var(--line); }
  .bd .bd-side { max-height: 30vh; border: 0; border-top: 1px solid var(--line); }
  .bd-side-grip { display: none; }
  .bd-seg, .bd-bed, .bd-crumb { display: none; }
  .bd-notes { display: none; }
}
@media (max-width: 1100px) {
  /* the open boards' tabs get the room: the printer keeps its pick only */
  .bd-printer > span, .bd-bed, .bd-beta { display: none; }
}
@media (max-width: 560px) {
  /* a phone: the mark, a narrow printer pick and the download fit one row */
  .bd-top { gap: 8px; padding: 0 12px; }
  .bd-mark { flex-shrink: 0; font-size: 18px; }
  .bd-printer > span, .bd-beta, .bd-icon[href="/board"] { display: none; }
  .bd-tab { max-width: 110px; }
  .bd-printer select { max-width: 104px; padding: 6px 8px; }
  .bd-top .bd-btn { white-space: nowrap; padding-inline: 10px; }
  /* Download ran off the right edge on a phone (owner, 01.11): Share and the
     history step aside there, and the button says "Download" alone. */
  #shareBtn, #historyBtn, .bd-dl-fmt { display: none; }
  .bd-top-end { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- shop items */
.bd-attach { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.bd-attach .chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  padding: 2px 4px 2px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--ink-mid); }
.bd-item-sell { padding: 1px 9px; font-size: 11.5px; white-space: nowrap; }
/* The saved item's share block: its link, the line for a site, the socials. */
.bd-share-row { display: flex; gap: 6px; }
.bd-share-row input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--card-hi); color: var(--ink); font-size: 12.5px; }
.bd-share-socials { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-share-socials a { text-decoration: none; color: var(--ink); }
.bd-draft { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line-strong); display: grid; gap: 8px; white-space: normal; }
.bd-draft-head { font-weight: 600; font-size: 13px; }
.bd-draft-row { display: grid; gap: 3px; font-size: 12px; color: var(--ink-mid); }
.bd-draft-row input { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--ink); font-size: 13px; min-width: 0; }
.bd-draft-row input:focus { outline: none; border-color: var(--accent); }
.bd-draft-sub { font-size: 12px; color: var(--ink-dim); }
.bd-draft-field { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.bd-draft-field input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.bd-draft-field small { margin-left: auto; color: var(--ink-dim); font-size: 11.5px; }
.bd-draft-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bd-draft-save { background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 600; }
.bd-draft-save:hover { background: #f3e6df; }
.bd-draft-save:disabled { opacity: .6; cursor: progress; }
.bd-draft-err { font-size: 12px; color: #f3a39a; }
.bd-draft-link { font-size: 12.5px; color: var(--accent); word-break: break-all; }
.bd-draft-code { display: block; font: 11.5px/1.4 ui-monospace, Consolas, monospace; padding: 8px;
  border-radius: 8px; background: var(--panel); color: var(--ink-mid); word-break: break-all; user-select: all; }
.bd-draft [data-copy] { justify-self: start; }
.bd-msg-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 10px;
  border-radius: 8px; background: rgba(255, 255, 255, .06); font-size: 12px; color: var(--ink-mid); }
.bd-msg-file::before { content: "SVG"; font-size: 10px; font-weight: 600; letter-spacing: .04em;
  padding: 1px 5px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- canvas tools */
.bd-tools { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4;
  display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px;
  background: rgba(18, 18, 20, .92); border: 1px solid var(--line-strong);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45); }
.bd-tools button { display: inline-flex; white-space: nowrap; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 0; border-radius: 8px; background: none; color: var(--ink-mid); font-size: 12.5px; cursor: pointer; }
.bd-tools button:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.bd-tools button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.bd-tools kbd { font: 600 10px/1 var(--sans); padding: 2px 4px; border-radius: 4px;
  border: 1px solid currentColor; opacity: .7; }
.bd-tool-hint { font-size: 12px; color: var(--ink); padding: 0 8px; font-variant-numeric: tabular-nums; }
.bd-item.off .bd-item-dot { background: var(--warn); }
.bd-item.off .bd-item-msg { color: #f0c97a; }
.bd[data-drop="true"] .bd-stage { outline: 2px dashed var(--accent); outline-offset: -10px; }
.bd-scad { margin: 8px 0 4px 16px; font-size: 12.5px; }
.bd-scad summary { cursor: pointer; color: var(--ink-mid); }
.bd-scad-row { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: center; margin-top: 6px; }
.bd-scad-row span { color: var(--ink-mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-scad-row input, .bd-scad-row select { height: 28px; border-radius: 6px; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--ink); padding: 0 6px; font-size: 12.5px; min-width: 0; }
.bd-scad-row input[type="checkbox"] { height: 16px; justify-self: start; }

/* Undo / redo (22.10): icon buttons at the toolbar's start, a thin rule after. */
.bd-tools .bd-tool-ico { width: 32px; padding: 0; justify-content: center; }
.bd-tools .bd-tool-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bd-tools .bd-tool-ico:disabled { opacity: .35; cursor: default; background: none; }
.bd-tools .bd-tool-sep { width: 1px; height: 18px; margin: 0 2px; background: rgba(255, 255, 255, .12); }

/* Board history (22.10): versions under the clock button. */
.bd-hist { width: 260px; padding: 6px; display: grid; gap: 2px; }
.bd-hist-head { padding: 6px 8px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3, #8a8f98); }
.bd-hist button { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 8px;
  border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 13px;
  cursor: pointer; text-align: left; }
.bd-hist button:hover { background: rgba(255, 255, 255, .06); }
.bd-hist button em { font-style: normal; color: var(--ink-3, #8a8f98); font-size: 12px; }
.bd-hist-empty { margin: 4px 8px 8px; font-size: 12.5px; color: var(--ink-3, #8a8f98); }
.bd-hist-more { display: block; padding: 8px; font-size: 12.5px; color: var(--accent, #c4dc7c); }

/* Show to a client (22.10): the owner's Share menu, and the client's view. */
.bd-share { width: 300px; padding: 14px; display: grid; gap: 10px; }
.bd-share h4 { margin: 0; font-size: 14px; }
.bd-share p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-dim, #9aa0a6); }
.bd-share input { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line-strong, rgba(255,255,255,.16)); background: rgba(255,255,255,.04);
  color: inherit; font: inherit; font-size: 12.5px; }
.bd-share .bd-btn { justify-content: center; }
.bd-msg.comment .bubble { background: rgba(216, 178, 106, .10); border: 1px solid rgba(216, 178, 106, .3);
  border-radius: 14px; }
.bd-comment-head { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: #e9c987;
  margin-bottom: 4px; }
.bd-comment-x { margin-left: auto; border: 0; background: none; color: inherit; cursor: pointer;
  font-size: 15px; line-height: 1; opacity: .6; }
.bd-comment-x:hover { opacity: 1; }
.bd-view-title { display: none; font-weight: 600; font-size: 14px; }
.bd-view-gone { margin: 24px 8px; color: var(--ink-dim, #9aa0a6); font-size: 13.5px; }
#viewName { width: 100%; box-sizing: border-box; margin-bottom: 6px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line-strong, rgba(255,255,255,.16)); background: transparent; color: inherit;
  font: inherit; font-size: 13px; }
/* The client sees, turns and comments - every tool that changes the board steps aside. */
[data-view="true"] .bd-tools, [data-view="true"] .bd-tabs, [data-view="true"] #newTab,
[data-view="true"] #shareBtn, [data-view="true"] #historyBtn, [data-view="true"] #download,
[data-view="true"] #addBtn, [data-view="true"] #clip, [data-view="true"] #modelBtn,
[data-view="true"] .bd-row-edit, [data-view="true"] .bd-row-x, [data-view="true"] .bd-ideas,
[data-view="true"] .bd-beta, [data-view="true"] .bd-icon[href="/board"] { display: none !important; }
[data-view="true"] .bd-view-title { display: inline; }
[data-view="true"] #printer { pointer-events: none; }

/* Download: the 3MF, and a chevron for the other formats (22.10). */
.bd-split { display: inline-flex; }
.bd-split #download { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bd-split .bd-split-more { width: 30px; padding: 0; justify-content: center; border-top-left-radius: 0;
  border-bottom-left-radius: 0; border-left: 1px solid rgba(0, 0, 0, .18); }
.bd-split .bd-split-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.bd-dl { width: 280px; padding: 6px; display: grid; gap: 2px; }
.bd-dl button { display: grid; gap: 2px; text-align: left; width: 100%; padding: 9px 10px; border: 0;
  border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; }
.bd-dl button:hover { background: rgba(255, 255, 255, .06); }
.bd-dl b { font-size: 13px; font-weight: 600; }
.bd-dl span { font-size: 12px; color: var(--ink-dim, #9aa0a6); }
[data-view="true"] .bd-split { display: none !important; }

/* "Send this idea" under an answer the AI could not make (board-page.js ideaButton) */
.bd-idea { display: inline-flex; margin-top: 10px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(196, 220, 124, 0.45); background: transparent; color: inherit; font: inherit;
  font-size: 13px; cursor: pointer; text-align: left; }
.bd-idea:hover:not(:disabled) { background: rgba(196, 220, 124, 0.1); }
.bd-idea:disabled { opacity: .65; cursor: default; }

/* "Create generator" (beta, 28.10) on a model of one's own */
.bd-beta { font-style: normal; font-size: 9.5px; font-weight: 600; letter-spacing: .04em;
  padding: 1px 7px; margin-left: 6px; border-radius: 999px; vertical-align: 1px;
  background: rgba(196, 220, 124, .16); color: #c4dc7c; border: 1px solid rgba(196, 220, 124, .35); }
.bd-make-gen { width: 100%; justify-content: center; }
.bd-pgroup .bd-make-gen + .bd-item-note { margin-left: 0; }

/* "Send me news" on the guest's email step (owner, 05.11): never pre-ticked. */
.bd-dlg-check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0;
  font-size: 12px; line-height: 1.45; opacity: .8; cursor: pointer; }
.bd-dlg-check input { margin: 2px 0 0; flex: none; width: 15px; height: 15px; }
