/* Cutting Board Designer — Web App
 * Visual language inherited from /landing/index.html (cream + amber palette).
 */

@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/playfair-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('/fonts/playfair-900.woff2') format('woff2');
}

:root {
  --amber: #E8A552;
  --amber-deep: #D88A3A;
  --olive: #C8C26B;
  --cream: #F8F2E8;
  --cream-card: #FFFDF8;
  --cream-card-2: #F2EADC;
  --ink: #1A1410;
  --ink-soft: #4A3A2D;
  --muted: #8A7A6A;
  --hairline: rgba(26, 20, 16, 0.10);
  --hairline-soft: rgba(26, 20, 16, 0.06);
  --shadow: 0 8px 32px rgba(26, 20, 16, 0.10);
  --shadow-card: 0 2px 10px rgba(26, 20, 16, 0.06);
  --radius: 14px;
  --radius-lg: 22px;
  --warn: #B5320C;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: transparent; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--amber-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: 2rem; line-height: 1.1; }
h2 { font-size: 1.4rem; line-height: 1.15; }
h3 { font-size: 1.05rem; line-height: 1.2; }

/* ───────── Top bar ───────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px;
  background: rgba(248, 242, 232, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Playfair Display', serif;
  font-weight: 900; font-size: 1.1rem; letter-spacing: -0.02em;
  color: var(--ink);
}
.brand img { border-radius: 7px; box-shadow: 0 2px 6px rgba(26, 20, 16, 0.15); }
.topbar-nav { display: flex; align-items: center; gap: 10px; }
.nav-user {
  font-size: 0.85rem; color: var(--ink-soft);
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ───────── Buttons ───────── */
.btn-amber, .btn-ink, .btn-ghost, .btn-pro, .btn-line, .btn-apple {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.88rem; font-weight: 600;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.btn-amber {
  background: linear-gradient(180deg, var(--amber) 0%, var(--amber-deep) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(216, 138, 58, 0.32);
}
.btn-amber:hover { transform: translateY(-1px); }
.btn-amber:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(26, 20, 16, 0.06); }

.btn-line {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--ink);
}
.btn-line:hover { background: rgba(26, 20, 16, 0.04); }

.btn-apple { background: #000; color: #fff; }
.btn-apple:hover { transform: translateY(-1px); }

.btn-pro {
  background: linear-gradient(180deg, #F0C780 0%, var(--amber) 100%);
  color: var(--ink);
  font-weight: 700;
  padding: 4px 11px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: default;
  pointer-events: none;
  text-transform: uppercase;
}

.btn-danger { color: var(--warn); }
.btn-danger:hover { background: rgba(181, 50, 12, 0.08); }

.btn-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.btn-icon:hover { background: rgba(26, 20, 16, 0.06); color: var(--ink); }

/* ───────── Layout ───────── */
.root {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  min-height: 0;
}

.page {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

/* ───────── Projects grid ───────── */
.projects-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 22px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.project-card {
  background: var(--cream-card);
  border-radius: var(--radius);
  border: 1px solid var(--hairline-soft);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.project-card .thumb {
  aspect-ratio: 16/10;
  background: var(--cream-card-2);
  display: block;
}
.project-card canvas { width: 100%; height: 100%; display: block; }
.project-card .meta {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.project-card .name { font-weight: 600; font-size: 0.98rem; }
.project-card .sub { font-size: 0.78rem; color: var(--muted); }
.project-card .row {
  display: flex; gap: 6px; margin-top: 8px;
}

.empty-state {
  border: 1px dashed var(--hairline);
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  padding: 52px 24px;
  text-align: center;
  color: var(--ink-soft);
}
.empty-state h2 { margin-bottom: 6px; }
.empty-state p { color: var(--muted); margin-bottom: 18px; font-size: 0.95rem; }

/* Skeleton cards shown during the first cloud-sync after sign-in, while
   localStorage is still empty. Replaces the "No projects yet" empty state
   so we don't flash a misleading message before the list arrives. */
.project-card-skeleton {
  cursor: default;
  pointer-events: none;
}
.project-card-skeleton:hover { transform: none; box-shadow: none; }
.project-card-skeleton .meta { gap: 8px; padding-top: 14px; padding-bottom: 16px; }
.skeleton-line {
  display: block;
  height: 12px;
  border-radius: 4px;
}
.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.10) 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-shimmer { animation: none; }
}

/* ───────── Designer screen ───────── */
.designer {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  padding: 16px;
  min-height: 0;
}
@media (max-width: 920px) {
  .designer { grid-template-columns: 1fr; }
}

.canvas-wrap {
  background: var(--cream-card);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  min-height: 360px;
  overflow: hidden;
}
.canvas-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline-soft);
}
.canvas-toolbar .title-input {
  background: transparent; border: 0; outline: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.15rem; color: var(--ink);
  flex: 1 1 auto; min-width: 0;
}
.canvas-toolbar .title-input:focus { color: var(--amber-deep); }
.canvas-toolbar .toolbar-actions { display: flex; gap: 6px; }

.canvas-stage {
  flex: 1 1 auto;
  position: relative;
  background: var(--cream-card-2);
  display: flex; align-items: center; justify-content: center;
  min-height: 280px;
}
.canvas-stage canvas { display: block; max-width: 100%; max-height: 100%; }
.three-host {
  position: absolute;
  inset: 0;
  background: #1a1a26;
}

.view-toggle {
  display: inline-flex;
  background: rgba(26, 20, 16, 0.06);
  border-radius: 999px;
  padding: 3px;
  gap: 0;
}
.view-toggle-btn {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}
.view-toggle-btn.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(26, 20, 16, 0.10);
}
.view-toggle-btn:not(.active):hover { color: var(--ink); }
.view-toggle-btn .pro-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

.canvas-warning {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  background: rgba(181, 50, 12, 0.10);
  color: var(--warn);
  border: 1px solid rgba(181, 50, 12, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.85rem;
  pointer-events: none;
}

/* Inspector / sidebar */
.inspector {
  display: flex; flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.section {
  background: var(--cream-card);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  padding: 14px;
}
.section h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.field {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.92rem;
}
.field + .field { border-top: 1px solid var(--hairline-soft); }
.field label { color: var(--ink-soft); flex: 0 0 auto; }
.field .value { display: flex; align-items: center; gap: 6px; }
.field input[type="number"], .field input[type="text"], .field select {
  width: 90px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: white;
  text-align: right;
}
.field input[type="text"] { text-align: left; width: 140px; }
.field input:focus, .field select:focus {
  outline: 2px solid rgba(232, 165, 82, 0.35);
  border-color: var(--amber);
}
.field .unit { color: var(--muted); font-size: 0.8rem; }

.toggle {
  position: relative;
  width: 38px; height: 22px;
  background: var(--hairline);
  border-radius: 999px;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.15s ease;
}
.toggle.on { background: var(--amber); }
.toggle.on::after { transform: translateX(16px); }

/* Layers list */
.layers-list { display: flex; flex-direction: column; gap: 6px; }
.layer-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.02);
  cursor: pointer;
  border: 1px solid transparent;
}
.layer-row:hover { background: rgba(232, 165, 82, 0.08); }
.layer-row.selected { background: rgba(232, 165, 82, 0.16); border-color: rgba(232, 165, 82, 0.4); }
.swatch {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background-size: cover;
  background-position: center;
}
.swatch-round { border-radius: 50%; }
.layer-row .info { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.layer-row .name { font-weight: 600; font-size: 0.92rem; }
.layer-row .desc { color: var(--muted); font-size: 0.78rem; }

.layer-edit {
  margin-top: 8px;
  background: rgba(0,0,0,0.02);
  border-radius: 10px;
  padding: 12px;
}
.layer-edit .field input[type="number"] { width: 80px; }
.layer-edit .row-buttons {
  display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px;
}

.wood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.wood-cell {
  aspect-ratio: 1.6;
  border-radius: 8px;
  border: 2px solid transparent;
  position: relative;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 4px 6px;
  font-size: 0.7rem; font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  cursor: pointer;
}
.wood-cell.selected { border-color: var(--amber); transform: scale(1.04); }
.wood-cell .lock {
  position: absolute; top: 4px; right: 4px;
  background: rgba(255,255,255,0.85); color: var(--ink);
  border-radius: 999px; padding: 1px 6px;
  font-size: 0.62rem; letter-spacing: 0.05em;
}
.wood-cell .wood-edit {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.85); color: var(--ink);
  border-radius: 999px;
  font-size: 0.7rem;
  text-shadow: none;
  opacity: 0.55; transition: opacity 0.12s ease;
  cursor: pointer;
}
.wood-cell:hover .wood-edit,
.wood-cell:focus-within .wood-edit { opacity: 1; }
@media (hover: none) {
  .wood-cell .wood-edit { opacity: 0.85; }
}
.wood-cell.dark { color: white; }

.cw-preview {
  height: 60px;
  border-radius: 10px;
  display: flex; align-items: flex-end; padding: 8px 12px;
  font-weight: 600; color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  border: 1px solid var(--line);
}

.btn-line.danger { color: #b00020; border-color: rgba(176,0,32,0.4); }
.btn-line.danger:hover { background: rgba(176,0,32,0.06); }

/* Cut list */
.cutlist { display: flex; flex-direction: column; gap: 8px; }
.cutlist-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 0.92rem;
}
.cutlist-row:last-child { border-bottom: 0; }
.cutlist-row .num { font-weight: 600; }
.cutlist-summary {
  margin-top: 8px;
  padding: 12px;
  background: rgba(232, 165, 82, 0.10);
  border-radius: 10px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.cutlist-summary strong { color: var(--ink); }

/* ───────── Modal ───────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(26, 20, 16, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow: auto;
  box-shadow: var(--shadow);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head {
  padding: 20px 22px 8px;
}
.modal-head h2 { font-size: 1.5rem; }
.modal-head p { font-size: 0.92rem; color: var(--muted); margin-top: 4px; }
.modal-body { padding: 12px 22px 22px; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--hairline-soft);
  background: rgba(26, 20, 16, 0.02);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.template-card {
  background: var(--cream-card-2);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s ease, border-color 0.12s ease;
  display: flex; flex-direction: column; gap: 6px;
}
.template-card:hover { transform: translateY(-2px); border-color: rgba(232, 165, 82, 0.35); }
.template-card.locked { opacity: 0.6; }
.template-card .thumb { aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: white; }
.template-card .label { font-size: 0.85rem; font-weight: 600; }
.template-card .summary { font-size: 0.76rem; color: var(--muted); line-height: 1.3; }

/* Auth */
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: white;
}
.auth-form input:focus { outline: 2px solid rgba(232, 165, 82, 0.35); border-color: var(--amber); }
.auth-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 0.8rem;
  margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--hairline-soft);
}
.auth-error {
  background: rgba(181, 50, 12, 0.10);
  color: var(--warn);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
}

/* Paywall */
.paywall-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 4px 0 14px;
  background: linear-gradient(180deg, rgba(232, 165, 82, 0.16), rgba(232, 165, 82, 0.08));
  border: 1px solid rgba(232, 165, 82, 0.35);
  border-radius: 12px;
}
.pill {
  display: inline-block;
  background: linear-gradient(180deg, var(--amber), var(--amber-deep));
  color: white;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(126, 70, 14, 0.25);
}
.paywall-banner .pill {
  font-size: 0.72rem;
  padding: 4px 10px;
  align-self: start;
}
.paywall-banner-text { display: grid; gap: 2px; line-height: 1.35; }
.paywall-banner-text strong { font-size: 0.95rem; }
.paywall-banner-text span { color: var(--muted); font-size: 0.82rem; }
.feature-list {
  display: grid; gap: 10px;
  background: var(--cream-card-2);
  padding: 14px;
  border-radius: 12px;
}
.feature-row {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
}
.feature-row .ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(232, 165, 82, 0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber-deep);
  font-weight: 700;
}
.feature-row .det { color: var(--muted); font-size: 0.82rem; }
.plan-grid { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.plan-card {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--cream-card-2);
  border: 2px solid transparent;
  cursor: pointer;
  /* <button> defaults to text-align:center, which would centre the plan
     title in its grid cell. Anchor name + subtitle to the left. */
  text-align: left;
}
.plan-card.selected { background: rgba(232, 165, 82, 0.16); border-color: var(--amber); }
.plan-card .dot { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--hairline); }
.plan-card.selected .dot { background: var(--amber); border-color: var(--amber); box-shadow: inset 0 0 0 3px var(--cream-card-2); }
.plan-card .pname { font-weight: 600; }
.plan-card .pprice { font-weight: 700; }
.plan-card .pper { color: var(--muted); font-size: 0.78rem; }

/* Misc */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--cream);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  z-index: 200;
  box-shadow: var(--shadow);
  animation: pop 0.2s ease;
}
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

[hidden] { display: none !important; }

/* Cross-promo card (App Store) */
.crosspromo {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(232, 165, 82, 0.10), rgba(26, 20, 16, 0.04));
  border: 1px solid rgba(232, 165, 82, 0.28);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.crosspromo:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 165, 82, 0.55);
  box-shadow: 0 6px 18px rgba(26, 20, 16, 0.06);
}
.crosspromo-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  display: flex; align-items: center; justify-content: center;
}
.crosspromo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crosspromo-eyebrow {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--amber-deep);
  font-weight: 700;
}
.crosspromo-title { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.crosspromo-body { color: var(--muted); font-size: 0.85rem; line-height: 1.35; }
.crosspromo-cta {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  font-size: 0.85rem; font-weight: 600;
  color: var(--amber-deep);
}

.crosspromo-banner { margin: 24px 0 12px; }
.crosspromo-empty { margin: 16px auto 0; max-width: 560px; }
.crosspromo-compact {
  grid-template-columns: auto 1fr;
  margin: 0 0 12px;
  padding: 10px 12px;
  gap: 10px;
}
.crosspromo-compact .crosspromo-icon { width: 34px; height: 34px; border-radius: 9px; }
.crosspromo-compact .crosspromo-icon svg { width: 18px; height: 18px; }
.crosspromo-compact .crosspromo-title { font-size: 0.92rem; }
.crosspromo-compact .crosspromo-body { font-size: 0.78rem; }
.crosspromo-compact .crosspromo-cta { display: none; }

@media (max-width: 540px) {
  .crosspromo { grid-template-columns: auto 1fr; }
  .crosspromo-cta { display: none; }
}

/* Ads */
.ad-slot {
  position: relative;
  margin: 16px 0;
  padding: 22px 12px 12px;
  border-radius: 12px;
  background: rgba(26, 20, 16, 0.04);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.ad-slot .ad-label {
  position: absolute;
  top: 6px; right: 10px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ad-slot-placeholder {
  border-style: dashed;
}
.ad-slot-placeholder .adsbygoogle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  color: var(--muted);
  font-size: 0.82rem;
}
.ad-slot-placeholder code {
  background: rgba(26,20,16,0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.78rem;
}

/* Compact banner above the projects grid. */
.ad-slot[data-slot="projectsBanner"] {
  padding: 18px 12px 8px;
}
.ad-slot[data-slot="projectsBanner"] .adsbygoogle {
  min-height: 60px;
  max-height: 90px;
}

/* Compact ad inside the designer's Board Settings panel. */
.ad-slot[data-slot="designerSettings"] {
  margin: 10px 0 4px;
  padding: 16px 10px 6px;
}
.ad-slot[data-slot="designerSettings"] .adsbygoogle {
  min-height: 50px;
  max-height: 70px;
}

/* Horizontal banner inside the designer canvas column. */
.canvas-ad-host {
  flex: 0 0 auto;
  padding: 0 12px 12px;
}
.canvas-ad-host:empty { display: none; }
.canvas-ad-host .ad-slot {
  margin: 0;
  min-height: 90px;
}
.canvas-ad-host .ad-slot .adsbygoogle {
  min-height: 90px;
  max-height: 120px;
}
