/* app.css — handcrafted styles for app components (auth, workspace, admin,
   pricing). NOT processed by Tailwind, so nothing is purged. Single source of
   truth for these components; design tokens live in :root below.
   Sharp, no border-radius — matches the DSGN.HOUSE brand. */

:root {
  --bd:        rgba(255, 255, 255, .14);
  --bd-soft:   rgba(255, 255, 255, .12);
  --bd-strong: rgba(255, 255, 255, .25);
  --muted:     #9a9a9a;
  --muted-dim: #6a6a6a;
  --inset:     #000;
  --inset-2:   #000;
  --pos:       #19c37d;
  --neg:       #ff5a5a;
  --mono:      'JetBrains Mono', monospace;
}

/* ---------- like / favorite heart (color / paint / palette) ---------- */
.like-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: none; background: transparent; cursor: pointer; color: rgba(255,255,255,.55); line-height: 0; }
.like-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .12s; }
.like-btn:hover { color: #fff; }
.like-btn:hover svg { transform: scale(1.12); }
/* liked = filled WHITE (monochrome premium, not red) */
.like-btn.is-liked { color: #fff; }
.like-btn.is-liked svg { fill: currentColor; stroke: currentColor; }
/* framed square heart — same height as .btn (46px), single source here */
.like-btn--framed { width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.28); color: #fff; box-sizing: border-box; flex: none; }
.like-btn--framed svg { width: 20px; height: 20px; }
.like-btn--framed:hover { background: rgba(255,255,255,.08); }
.like-btn--framed.is-liked { background: #fff; }
.like-btn--framed.is-liked svg { fill: #000; stroke: #000; }
/* heart over a colour swatch (light bg) — chip so it stays visible */
.like-btn--onswatch { background: rgba(0,0,0,.4); width: 26px; height: 26px; }
.like-btn--onswatch svg { width: 15px; height: 15px; }

/* ---------- workspace favorites ---------- */
.fav-empty { color: var(--muted); font-size: .82rem; padding: .6rem 0; }
.fav-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: .6rem; }
.fav-color { position: relative; }
.fav-color-sw { display: block; height: 76px; border: 1px solid var(--bd); }
.fav-color-heart { position: absolute; top: .3rem; right: .3rem; }
.fav-paints { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.fav-paint { position: relative; }
.fav-paint-card { border: 1px solid var(--bd-soft); text-decoration: none; display: flex; align-items: stretch; }
.fav-paint-c { width: 56px; flex: none; }
.fav-paint-m { padding: .5rem .6rem; min-width: 0; padding-right: 2rem; }
.fav-paint-b { display: block; font-size: .54rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.fav-paint-n { display: block; font-size: .8rem; color: #fff; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-paint-code { display: block; font-family: var(--mono); font-size: .62rem; color: #bdbdbd; margin-top: .1rem; }
.fav-paint-heart { position: absolute; top: .3rem; right: .2rem; }
.fav-pal-heart { position: absolute; top: .4rem; right: .4rem; }
.wc-combo { position: relative; }
.wc-combo-heart { position: absolute; top: .5rem; right: .5rem; z-index: 2; }

/* ---------- shared atoms ---------- */
.app-input {
  width: 100%; height: 40px; box-sizing: border-box; background: var(--inset); border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: .92rem; padding: 0 .8rem;
}
.app-input:focus { outline: none; box-shadow: 0 0 0 2px #fff; border-color: #fff; }
.app-label {
  display: block; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--muted); margin: 0 0 .4rem;
}
.app-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; box-sizing: border-box;
  background: #fff; color: #000; border: 1px solid #fff; font-size: .72rem;
  letter-spacing: .05em; text-transform: uppercase; font-weight: 700;
  padding: 0 1.2rem; cursor: pointer;
}
.app-btn:hover { background: #cfcfcf; border-color: #cfcfcf; }
.app-btn--ghost { background: transparent; color: #fff; }
.app-btn--ghost:hover { background: #fff; color: #000; }
.app-btn--danger { background: transparent; color: var(--neg); border-color: var(--neg); }
.app-btn--danger:hover { background: var(--neg); color: #000; }
.app-err {
  border: 1px solid var(--neg); color: #ff8a8a; font-size: .78rem;
  padding: .6rem .8rem; margin-bottom: 1.1rem;
}

/* ---------- sidebar: hide scrollbar + centered scroll arrow ---------- */
/* no scrollbar — scroll via the arrow button at the bottom */
.sidebar-nav { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sidebar-scroll { display: none; align-items: center; justify-content: center; width: 100%; height: 28px; margin-top: -28px; border: none; background: linear-gradient(to top, #fff 60%, rgba(255,255,255,0)); cursor: pointer; position: relative; z-index: 4; }
.sidebar-scroll svg { width: 20px; height: 20px; color: #000; transition: transform .2s; }
.sidebar-scroll.is-up svg { transform: rotate(180deg); }
.sidebar-scroll:hover svg { color: #555; }
/* expanded: show a thin scrollbar instead of the arrow */
.app-sidebar.is-expanded .sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.22) transparent; }
.app-sidebar.is-expanded .sidebar-nav::-webkit-scrollbar { width: 6px; display: block; }
.app-sidebar.is-expanded .sidebar-nav::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
.app-sidebar.is-expanded .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); }
.app-sidebar.is-expanded .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.app-sidebar.is-expanded .sidebar-scroll { display: none !important; }

/* Logo mark holds its position when the sidebar expands — left-aligned in both
   states, its 32px icon centred on the same vertical axis as the tool icons
   (px-[15px] + 22px → centre 26px; logo: 10px + 32px → centre 26px). */
.sidebar-logo { justify-content: flex-start !important; padding-left: 10px !important; padding-right: 10px !important; }

/* ---------- sidebar: roomier rows (premium, more breathing space) ---------- */
.sidebar-nav { padding-top: .6rem; padding-bottom: 2.4rem; gap: .55rem; }
.sidebar-item { height: 52px; }
.sidebar-item svg { width: 24px; height: 24px; }
/* Tools (.sidebar-nav) and bottom block (.sidebar-foot) FORCED to the exact same
   gap + item height, so they look identical. Tailwind gave them different gaps;
   !important guarantees they match. */
.sidebar-nav, .sidebar-foot { display: flex !important; flex-direction: column !important; gap: 2px !important; }
.sidebar-foot { padding-top: 2px !important; padding-bottom: .5rem !important; }
.sidebar-item, .sidebar-toggle { height: 42px !important; margin: 0 !important; flex: none !important; }
.sidebar-toggle .sidebar-chevron { width: 24px; height: 24px; }

/* ---------- sidebar tool groups (even rhythm, thin dividers) ---------- */
/* same vertical gap everywhere; the group divider sits in that gap, no extra space */
.sidebar-group { margin: .55rem .55rem; padding-top: .55rem; border-top: 1px solid rgba(0,0,0,.09); }
.sidebar-group span { display: block; font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: #9a9a9a; white-space: nowrap; padding-left: .35rem; opacity: 0; height: 0; overflow: hidden; transition: opacity .15s; }
.app-sidebar.is-expanded .sidebar-group span { opacity: 1; height: auto; }
.app-sidebar:not(.is-expanded) .sidebar-group { margin: .55rem .5rem; padding-top: 0; }

/* ---------- auth split layout (pixel animation left, form right) ---------- */
.auth-split { display: grid; grid-template-columns: 7fr 3fr; min-height: 100vh; }
.auth-anim { position: relative; background: #000; overflow: hidden; }
.auth-anim canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.auth-anim-mark { position: absolute; left: 2.2rem; bottom: 2rem; z-index: 2; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 800; color: #fff; text-decoration: none; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-form .au-wrap { padding: 1rem 0; }
@media (max-width: 860px) { .auth-split { grid-template-columns: 1fr; } .auth-anim { display: none; } }

/* ---------- footer oversized wordmark (Sage Grotesk, edge-cropped) ---------- */
/* SVG wordmark: textLength stretches "DSGN.HOUSE" to fill the full width exactly
   (never overflows), bold via stroke, cropped at the bottom by the wrap. */
.footer-wordmark-wrap { overflow: hidden; line-height: 0; margin-top: 2.5rem; }
.footer-wordmark { display: block; width: 100%; height: auto; }
.footer-wordmark text { font-family: "Sage Grotesk", "Nohemi", sans-serif; fill: #1d1d1d; paint-order: stroke; stroke: #1d1d1d; stroke-width: 4; user-select: none; }

/* ---------- home hero (full-height, reuses the .auth-anim pixel canvas) ---------- */
.home-hero { position: relative; overflow: hidden; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.home-hero .auth-anim { position: absolute; inset: 0; z-index: 0; display: block; }
.home-hero-veil { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.88) 6%, rgba(0,0,0,.45) 40%, transparent 80%); }
.home-hero-inner { position: relative; z-index: 1; width: 100%; }
@media (max-width: 680px) { .home-hero { min-height: auto; padding: 5rem 0 2.5rem; } }

/* ---------- auth (login / signup) ---------- */
.au-wrap { max-width: 400px; margin: 0 auto; padding: 4rem 0 5rem; }
.au-eyebrow { font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--muted); text-align: center; margin-bottom: .7rem; }
.au-title { font-size: 1.7rem; font-weight: 700; color: #fff; text-align: center; line-height: 1.1; margin-bottom: .4rem; }
.au-sub { font-size: .82rem; color: var(--muted); text-align: center; margin-bottom: 2rem; }
.au-card { border: none; padding: 0; }
.au-label { display: block; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 0 0 .4rem; }
.au-input { width: 100%; background: var(--inset); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: .92rem; padding: .7rem .8rem; margin-bottom: 1.1rem; }
.au-input:focus { outline: none; box-shadow: 0 0 0 2px #fff; border-color: #fff; }
.au-hint { font-size: .66rem; color: var(--muted-dim); margin: -.7rem 0 1.1rem; }
.au-btn { width: 100%; background: #fff; color: #000; border: 1px solid #fff; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: .85rem; cursor: pointer; }
.au-btn:hover { background: #cfcfcf; border-color: #cfcfcf; }
.au-alt { text-align: center; font-size: .82rem; color: var(--muted); margin-top: 1.4rem; }
.au-alt a { color: #fff; text-decoration: none; font-weight: 600; }
.au-alt a:hover { text-decoration: underline; }
.au-legal { text-align: center; font-size: .66rem; color: var(--muted-dim); margin-top: 1rem; }
.au-legal a { color: var(--muted); }
.au-google { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; background: #fff; color: #1f1f1f; border: 1px solid #fff; font-size: .82rem; font-weight: 600; padding: .75rem; text-decoration: none; }
.au-google:hover { background: #ececec; border-color: #ececec; }
.au-or { display: flex; align-items: center; gap: .7rem; margin: 1.1rem 0; }
.au-or::before, .au-or::after { content: ''; flex: 1; height: 1px; background: var(--bd); }
.au-or span { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dim); }

/* ---------- workspace ---------- */
/* App-shell fixed top bar (logged-in pages). Brand left, nav, account right.
   The sidebar drops below it and loses its own logo, so expanding the sidebar
   no longer clashes with the bar. Reuses .ws-topnav / .ws-topbtn / .ws-plan. */
.appbar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 56px; display: flex; align-items: center; background: #000; border-bottom: 1px solid var(--bd-soft); padding-right: 1.5rem; }
/* Logo mark sits in a 56px square directly over the sidebar rail (same place
   the sidebar logo used to live) — white, no wordmark. */
.appbar-logo { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; flex: none; text-decoration: none; }
.appbar-logo img { width: 32px; height: 32px; }
.appbar-nav { margin-left: .8rem; }
.appbar-act { margin-left: auto; }
/* Square avatar (no border-radius — on-brand). Image or initial fallback. */
.appbar-ava { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--bd-strong); overflow: hidden; text-decoration: none; background: #000; }
.appbar-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.appbar-ava span { font-size: .9rem; font-weight: 800; color: #fff; }
.appbar-ava:hover { border-color: #fff; }
/* Avatar block in settings. */
.ws-ava-row { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.ws-ava-prev { width: 72px; height: 72px; flex: none; border: 1px solid var(--bd-strong); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: #000; }
.ws-ava-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-ava-prev span { font-size: 1.6rem; font-weight: 800; color: #fff; }
.ws-ava-ctl { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ws-ava-pick { width: auto; padding: .7rem 1.2rem; cursor: pointer; }
.ws-ava-hint { flex-basis: 100%; font-size: .74rem; color: var(--muted); margin: .2rem 0 0; }
/* When the bar is present: sidebar starts under it, loses its logo; content clears it. */
.app-shell .app-sidebar { top: 56px; }
.app-shell .sidebar-logo { display: none; }
.app-shell-main { padding-top: 56px; }
@media (max-width: 767px) { .appbar-nav { display: none; } }

/* Workspace top-bar — dark, on-brand, full-bleed to the page container edges.
   Every control is the same 40px height so the right-hand row reads as one. */
.ws-topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: #000; border-bottom: 1px solid var(--bd-soft); min-height: 64px; padding: .7rem 1.5rem; margin: -2.5rem -1.5rem 1.6rem; }
@media (min-width: 640px) { .ws-topbar { margin-left: -2rem; margin-right: -2rem; padding-left: 2rem; padding-right: 2rem; } }
@media (min-width: 768px) { .ws-topbar { margin-left: -3rem; margin-right: -3rem; padding-left: 3rem; padding-right: 3rem; } }
.ws-topnav { display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; }
.ws-topnav a { display: inline-flex; align-items: center; height: 40px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 0 .9rem; text-decoration: none; border-bottom: 2px solid transparent; }
.ws-topnav a:hover { color: #fff; }
.ws-topnav a[data-on=true] { color: #fff; border-bottom-color: #fff; }
.ws-topact { display: flex; align-items: center; gap: .5rem; }
.ws-topbtn { display: inline-flex; align-items: center; height: 40px; background: transparent; border: 1px solid var(--bd-strong); color: #cfcfcf; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 0 .95rem; cursor: pointer; text-decoration: none; }
.ws-topbtn:hover { background: #fff; color: #000; border-color: #fff; }
.ws-topbtn--cta { background: #fff; color: #000; border-color: #fff; }
.ws-topbtn--cta:hover { background: #cfcfcf; border-color: #cfcfcf; }
.ws-greet { margin-bottom: 1.4rem; }
.ws-hi { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1.1; letter-spacing: -.01em; }
.ws-mail { font-size: .85rem; color: var(--muted); margin-top: .35rem; }
/* inside a header row the greet block carries no extra bottom gap */
.ws-head-row .ws-greet { margin-bottom: 0; }
.ws-plan { display: inline-flex; align-items: center; height: 40px; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; padding: 0 .75rem; border: 1px solid; box-sizing: border-box; }
.ws-topact .ws-plan--free { color: var(--muted); border-color: var(--bd-strong); }
.ws-topact .ws-plan--studio { color: #000; background: #fff; border-color: #fff; }
/* Compact upgrade strip (was a big block — slimmed to one line). */
.ws-upgrade { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .6rem .65rem .6rem 1rem; border: 1px solid var(--bd-strong); margin: 0 0 1.4rem; }
.ws-up-text { font-size: .82rem; color: var(--muted); }
.ws-up-text strong { color: #fff; font-weight: 700; }
.ws-upgrade a { flex: none; display: inline-flex; align-items: center; height: 40px; background: #fff; color: #000; text-decoration: none; font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 0 1.1rem; box-sizing: border-box; }
.ws-upgrade a:hover { background: #cfcfcf; }
.ws-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1.2rem 0 1.6rem; border-bottom: 1px solid var(--bd-soft); padding-bottom: .8rem; }
.ws-nav a { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: .4rem .7rem; text-decoration: none; border: 1px solid transparent; }
.ws-nav a:hover { color: #fff; }
.ws-nav a[data-on=true] { background: #fff; color: #000; }
.ws-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.ws-bar-l { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ws-sort { display: flex; gap: .3rem; }
.ws-sortlink { display: inline-flex; align-items: center; height: 40px; box-sizing: border-box; font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: 0 .9rem; text-decoration: none; border: 1px solid var(--bd-strong); }
.ws-sortlink:hover { color: #fff; }
.ws-sortlink[data-on=true] { background: #fff; color: #000; border-color: #fff; }
.ws-flash { font-size: .8rem; padding: .6rem .9rem; margin-bottom: 1.4rem; border: 1px solid; }
.ws-flash--ok { color: var(--pos); border-color: var(--pos); }
.ws-flash--err { color: var(--neg); border-color: var(--neg); }
.ws-set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.ws-edit { position: absolute; top: .4rem; right: 2.4rem; background: rgba(0,0,0,.55); border: none; color: #fff; width: 24px; height: 24px; cursor: pointer; font-size: .8rem; line-height: 1; opacity: 0; transition: opacity .15s; }
.ws-pal-wrap { position: relative; }
.ws-pal-wrap:hover .ws-edit { opacity: 1; }
.ws-edit:hover { background: #fff; color: #000; }
.ws-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .ws-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ws-grid { grid-template-columns: 1fr; } }
.ws-pal { border: 1px solid var(--bd-soft); text-decoration: none; display: block; position: relative; }
/* Bigger, premium strip; hover a swatch to expand it and reveal its hex. */
.ws-strip { display: flex; height: 112px; }
.ws-strip span { flex: 1; position: relative; display: flex; align-items: flex-end; justify-content: center; transition: flex .18s ease; overflow: hidden; }
.ws-strip:hover span { flex: .7; }
.ws-strip span:hover { flex: 2.6; }
.ws-strip b { font-family: var(--mono); font-size: .58rem; font-weight: 700; padding: .35rem; opacity: 0; transition: opacity .15s; white-space: nowrap; pointer-events: none; }
.ws-strip span:hover b { opacity: 1; }
.ws-foot { padding: .6rem .7rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ws-pname { font-size: .78rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-psrc { font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-dim); }
.ws-del { position: absolute; top: .4rem; right: .4rem; background: rgba(0,0,0,.55); border: none; color: #fff; width: 24px; height: 24px; cursor: pointer; font-size: .9rem; line-height: 1; opacity: 0; transition: opacity .15s; }
.ws-pal-wrap:hover .ws-del { opacity: 1; }
.ws-del:hover { background: var(--neg); }
.ws-empty { border: 1px dashed rgba(255,255,255,.2); padding: 3rem 1.5rem; text-align: center; color: var(--muted); }
.ws-empty a { color: #fff; }

/* ---------- admin ---------- */
.ad-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ad-title { font-size: 1.5rem; font-weight: 700; color: #fff; }
.ad-back { font-size: .62rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; color: #cfcfcf; border: 1px solid var(--bd-strong); padding: .4rem .7rem; text-decoration: none; }
.ad-back:hover { background: #fff; color: #000; border-color: #fff; }
.ad-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.6rem; border-bottom: 1px solid var(--bd-soft); padding-bottom: .8rem; }
.ad-nav a { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding: .4rem .7rem; text-decoration: none; border: 1px solid transparent; }
.ad-nav a:hover { color: #fff; }
.ad-nav a[data-on=true] { background: #fff; color: #000; }
.ad-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.ad-card { border: 1px solid var(--bd); padding: 1rem 1.1rem; }
.ad-k { font-size: .56rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.ad-v { font-size: 1.8rem; font-weight: 700; color: #fff; font-family: var(--mono); line-height: 1.1; margin-top: .3rem; }
.ad-v small { font-size: .8rem; color: var(--muted); }
.ad-note { font-size: .72rem; color: var(--muted-dim); border-left: 2px solid rgba(255,255,255,.2); padding: .5rem .8rem; margin: 0 0 1.6rem; }
.ad-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.ad-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.ad-table th, .ad-table td { text-align: left; padding: .5rem .6rem; border: 1px solid var(--bd-soft); }
.ad-table th { font-size: .56rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ad-table td { color: #cfcfcf; }
.ad-table a { color: #fff; text-decoration: none; }
.ad-table a:hover { text-decoration: underline; }
.ad-mono { font-family: var(--mono); color: #fff; }
.ad-tag { font-size: .54rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: .15rem .4rem; border: 1px solid var(--bd-strong); color: var(--muted); }
.ad-tag--studio { background: #fff; color: #000; border-color: #fff; }
.ad-tag--ban { color: var(--neg); border-color: var(--neg); }
.ad-empty { color: var(--muted-dim); font-size: .82rem; padding: .6rem 0; }
.ad-search { height: 40px; box-sizing: border-box; background: var(--inset); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: .85rem; padding: 0 .8rem; min-width: 240px; }
.ad-search:focus { outline: none; box-shadow: 0 0 0 2px #fff; }
.ad-form { border: 1px solid var(--bd); padding: 1.2rem; margin-bottom: 1.4rem; }
.ad-form h3 { font-size: .82rem; color: #fff; font-weight: 700; margin: 0 0 .9rem; }
.ad-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.ad-fld { display: flex; flex-direction: column; gap: .3rem; }
.ad-lbl { font-size: .56rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.ad-in { background: var(--inset); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: .85rem; padding: .5rem .6rem; }
.ad-in:focus { outline: none; box-shadow: 0 0 0 2px #fff; }
.ad-btn { background: #fff; color: #000; border: 1px solid #fff; font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; padding: .55rem .9rem; cursor: pointer; }
.ad-btn:hover { background: #cfcfcf; }
.ad-btn--ghost { background: transparent; color: #fff; }
.ad-btn--ghost:hover { background: #fff; color: #000; }
.ad-btn--danger { background: transparent; color: var(--neg); border-color: var(--neg); }
.ad-btn--danger:hover { background: var(--neg); color: #000; }
@media (max-width: 760px) { .ad-cols { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */
.pr-toggle { display: inline-flex; border: 1px solid rgba(255,255,255,.2); margin: 0; background: var(--inset); }
.pr-toggle-row { margin-bottom: 1.4rem; }
.pr-toggle button { background: transparent; border: none; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: .6rem 1.1rem; cursor: pointer; }
.pr-toggle button[data-on=true] { background: #fff; color: #000; }
.pr-save { font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--pos); margin-left: .4rem; }
.pr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; max-width: none; margin: 0; align-items: stretch; }
.pr-card { border: 1px solid var(--bd); padding: 2rem 2rem 2.2rem; display: flex; flex-direction: column; position: relative; }
.pr-card--pro { border-color: #fff; }
/* Animated hero-style pixel shimmer behind the Studio card (same engine as the homepage hero). */
.pr-anim { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pr-anim canvas { display: block; width: 100%; height: 100%; }
.pr-anim::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.34) 0%, rgba(0,0,0,.62) 52%, rgba(0,0,0,.82) 100%); }
/* lift content above the canvas, but DON'T touch the absolutely-positioned badge (keep it pinned to the corner) */
.pr-card--pro > *:not(.pr-anim):not(.pr-badge) { position: relative; z-index: 1; }
.pr-badge { position: absolute; top: -1px; right: -1px; z-index: 2; background: #fff; color: #000; font-size: .56rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; padding: .3rem .6rem; }
.pr-name { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.pr-price { font-size: 3rem; line-height: 1; font-weight: 700; color: #fff; margin: .7rem 0 .2rem; font-family: var(--mono); }
.pr-price small { font-size: .9rem; color: var(--muted); font-weight: 400; }
.pr-sub { font-size: .74rem; color: var(--muted); min-height: 1.1rem; }
.pr-cta { display: block; text-align: center; text-decoration: none; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; padding: .9rem; margin: 1.6rem 0 0; border: 1px solid #fff; }
.pr-cta--ghost { background: transparent; color: #fff; }
.pr-cta--ghost:hover { background: #fff; color: #000; }
.pr-cta--solid { background: #fff; color: #000; }
.pr-cta--solid:hover { background: #cfcfcf; border-color: #cfcfcf; }
.pr-feat { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .72rem; }
.pr-feat li { font-size: .82rem; color: #cfcfcf; display: flex; gap: .55rem; align-items: flex-start; line-height: 1.45; }
.pr-feat li::before { content: '✓'; color: #fff; font-weight: 800; flex: none; margin-top: .04rem; }
/* divider sets the feature list apart from the CTA — matches the site's sharp, bordered blocks */
.pr-head { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 1.7rem 0 .9rem; padding-top: 1.6rem; border-top: 1px solid var(--bd-soft); }
@media (max-width: 680px) { .pr-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Save modal — opened by palette hearts. Dark, square, premium.
   ============================================================ */
.sm-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1.2rem; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sm-overlay[hidden] { display: none; }
.sm-box { width: min(560px, 96vw); max-height: 88vh; display: flex; flex-direction: column; background: #000; border: 1px solid var(--bd-strong); box-shadow: 0 20px 60px rgba(0,0,0,.7); }
.sm-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--bd-soft); flex: none; }
.sm-title { margin: 0; font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: .01em; }
.sm-x { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; background: transparent; color: var(--muted); cursor: pointer; }
.sm-x:hover { color: #fff; }

.sm-tabs { display: flex; gap: .25rem; padding: 0 1.2rem; border-bottom: 1px solid var(--bd-soft); flex: none; }
.sm-tab { appearance: none; border: none; background: transparent; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 600; padding: .7rem .55rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sm-tab:hover { color: #cfcfcf; }
.sm-tab.is-active { color: #fff; border-bottom-color: #fff; }

.sm-body { padding: 1.2rem; overflow-y: auto; flex: 1 1 auto; }
.sm-panel { display: none; }
.sm-panel.is-active { display: block; }

.sm-label { display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 0 0 .35rem; }
.sm-label + .sm-input { margin-bottom: 1rem; }
.sm-input { display: block; width: 100%; box-sizing: border-box; background: #000; border: 1px solid var(--bd); color: #fff; font: inherit; font-size: .9rem; padding: .6rem .7rem; outline: none; }
.sm-input::placeholder { color: var(--muted-dim); }
.sm-input:focus { border-color: var(--bd-strong); }
.sm-textarea { min-height: 76px; resize: vertical; line-height: 1.4; }
.sm-hint { margin: 0 0 .9rem; font-size: .78rem; color: var(--muted); line-height: 1.45; }

.sm-roles { display: flex; flex-direction: column; gap: .5rem; }
.sm-role { display: flex; align-items: center; gap: .6rem; }
.sm-role-sw { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 38px; flex: none; font-family: var(--mono); font-size: .72rem; border: 1px solid var(--bd); }
/* Role combobox — our dropdown, plus free-text custom roles. */
.sm-combo { position: relative; flex: 1 1 auto; }
.sm-combo-inp { width: 100%; box-sizing: border-box; background: #000; border: 1px solid var(--bd); color: #fff; font: inherit; font-size: .85rem; padding: .55rem 2rem .55rem .6rem; outline: none; cursor: text; }
.sm-combo-inp::placeholder { color: var(--muted-dim); }
.sm-combo.is-open .sm-combo-inp, .sm-combo-inp:focus { border-color: var(--bd-strong); }
.sm-combo-ca { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; transition: transform .12s; }
.sm-combo.is-open .sm-combo-ca { transform: translateY(-50%) rotate(180deg); }
.sm-combo-menu { position: fixed; z-index: 2100; background: #000; border: 1px solid var(--bd-strong); max-height: 200px; overflow-y: auto; box-shadow: 0 14px 34px rgba(0,0,0,.65); }
.sm-combo-menu[hidden] { display: none; }
.sm-combo-opt { display: block; width: 100%; text-align: left; appearance: none; border: none; background: transparent; color: #e8e8e8; font: inherit; font-size: .85rem; padding: .55rem .6rem; cursor: pointer; }
.sm-combo-opt:hover { background: rgba(255,255,255,.08); }
.sm-combo-opt[hidden] { display: none; }

.sm-list { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .8rem; }
.sm-empty { color: var(--muted); font-size: .82rem; padding: .7rem .2rem; border: 1px dashed var(--bd-soft); text-align: left; }
.sm-projgroup { display: flex; flex-direction: column; gap: .1rem; padding: .15rem 0; }
.sm-opt { display: flex; align-items: center; gap: .55rem; padding: .5rem .55rem; cursor: pointer; color: #e8e8e8; font-size: .88rem; }
.sm-opt:hover { background: rgba(255,255,255,.04); }
.sm-opt input { width: 16px; height: 16px; accent-color: #fff; flex: none; }
.sm-opt--room { padding-left: 1.7rem; color: var(--muted); font-size: .82rem; }
.sm-room-add { align-self: flex-start; margin-left: 1.7rem; appearance: none; border: none; background: transparent; color: var(--muted-dim); font: inherit; font-size: .74rem; cursor: pointer; padding: .2rem 0; }
.sm-room-add:hover { color: #fff; }

.sm-addrow { display: flex; gap: .5rem; }
.sm-addrow .sm-input { flex: 1 1 auto; }
.sm-add { flex: none; appearance: none; border: 1px solid var(--bd); background: transparent; color: #fff; font: inherit; font-size: .82rem; font-weight: 600; padding: 0 1rem; cursor: pointer; }
.sm-add:hover { background: rgba(255,255,255,.08); }

.sm-foot { display: flex; align-items: stretch; gap: 1rem; padding: 1rem 1.2rem; border-top: 1px solid var(--bd-soft); flex: none; }
.sm-strip { display: flex; flex: 1 1 auto; overflow: hidden; border: 1px solid var(--bd-soft); }
.sm-strip span { flex: 1 1 0; }
.sm-save { flex: none; appearance: none; border: none; background: #fff; color: #000; font: inherit; font-size: .9rem; font-weight: 700; padding: .7rem 1.8rem; cursor: pointer; }
.sm-save:hover { background: #e2e2e2; }
.sm-save:disabled { opacity: .5; cursor: default; }
@media (max-width: 560px) { .sm-foot { flex-wrap: wrap; } .sm-strip { order: 2; width: 100%; flex-basis: 100%; min-height: 30px; } }

/* Combination-card heart lives in the footer (square design, square layout). */
.wc-foot-acts { display: flex; align-items: center; gap: .05rem; margin: -3px -6px -3px 0; }
.wc-foot-heart, .wc-foot-save { width: 28px; height: 28px; flex: none; margin: 0; }
.wc-foot-heart svg, .wc-foot-save svg { width: 18px; height: 18px; }

/* Inline "add room" field under a project (replaces the browser prompt). */
.sm-roomadd { padding-left: 1.7rem; margin: .15rem 0 .35rem; display: flex; gap: .5rem; }
.sm-roomadd .sm-input { font-size: .82rem; padding: .45rem .6rem; flex: 1 1 auto; }
.sm-roomadd .sm-add { padding: 0 .9rem; }

/* Project / collection row with a delete ✕ that appears on hover. */
.sm-row { display: flex; align-items: center; }
.sm-row .sm-opt { flex: 1 1 auto; min-width: 0; }
.sm-del { flex: none; appearance: none; border: none; background: transparent; color: var(--muted-dim); cursor: pointer; padding: .3rem .5rem; display: inline-flex; opacity: 0; transition: opacity .12s, color .12s; }
.sm-row:hover .sm-del { opacity: 1; }
.sm-del:hover { color: var(--neg); }
@media (hover: none) { .sm-del { opacity: .55; } }

/* Tags input — removable chips (white pill, black text). */
.sm-tags { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; width: 100%; box-sizing: border-box; background: #000; border: 1px solid var(--bd); padding: .45rem .5rem; cursor: text; }
.sm-tags:focus-within { border-color: var(--bd-strong); }
.sm-tag { display: inline-flex; align-items: center; gap: .15rem; background: #fff; color: #000; font-size: .78rem; font-weight: 600; padding: .25rem .2rem .25rem .55rem; }
.sm-tag button { display: inline-flex; align-items: center; appearance: none; border: none; background: transparent; color: #000; cursor: pointer; padding: 0 .35rem; opacity: .55; }
.sm-tag button:hover { opacity: 1; }
.sm-tags-inp { flex: 1 1 80px; min-width: 80px; background: transparent; border: none; outline: none; color: #fff; font: inherit; font-size: .85rem; padding: .25rem .2rem; }
.sm-tags-inp:focus, .sm-tags-inp:focus-visible { border: none !important; }
.sm-tags-inp::placeholder { color: var(--muted-dim); }
/* One single border indicates focus — kill the global inner focus-ring on every modal field. */
#save-modal input:focus, #save-modal input:focus-visible,
#save-modal textarea:focus, #save-modal textarea:focus-visible { outline: none !important; box-shadow: none !important; }

/* ---------- GDPR cookie consent banner (dark, square, on-brand) ---------- */
/* Compact card, bottom-right — doesn't span full width or touch the sidebar. */
.ck-banner { position: fixed; right: 1.25rem; bottom: 1.25rem; left: auto; z-index: 2200; width: 340px; max-width: calc(100vw - 2.5rem); background: #000; border: 1px solid var(--bd-strong); box-shadow: 0 14px 44px rgba(0,0,0,.55); }
.ck-banner[hidden] { display: none; }
.ck-inner { padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .9rem; }
.ck-text { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--muted); }
.ck-text a { color: #fff; text-decoration: underline; }
.ck-acts { display: flex; align-items: center; gap: .5rem; }
.ck-btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 .8rem; background: transparent; border: 1px solid var(--bd-strong); color: #fff; font-size: .62rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ck-btn:hover { background: rgba(255,255,255,.08); }
.ck-btn--cta { background: #fff; color: #000; border-color: #fff; }
.ck-btn--cta:hover { background: #cfcfcf; border-color: #cfcfcf; }
/* Mobile/tablet: full-width card, sits ABOVE the bottom nav (4rem) so it never covers it. */
@media (max-width: 767px) { .ck-banner { right: .75rem; left: .75rem; width: auto; bottom: calc(4rem + .75rem + env(safe-area-inset-bottom)); } }

/* ---------- Projects / Collections (workspace) ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.proj-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem; border: 1px solid var(--bd); text-decoration: none; transition: border-color .15s, background .15s; }
.proj-card:hover { border-color: #fff; background: rgba(255,255,255,.03); }
.proj-card-icon { color: var(--muted); line-height: 0; }
.proj-card:hover .proj-card-icon { color: #fff; }
.proj-card-name { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.proj-card-meta { font-size: .76rem; color: var(--muted); }
/* clickable card (div now) + hover pencil to rename inline */
.proj-card-wrap { position: relative; }
.proj-card { cursor: pointer; }
.proj-card-edit { position: absolute; top: .7rem; right: .7rem; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--bd-strong); background: #000; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .14s, color .14s, border-color .14s; z-index: 2; }
.proj-card-wrap:hover .proj-card-edit { opacity: 1; }
.proj-card-edit:hover { color: #fff; border-color: #fff; }
.proj-card-rename { font-size: 1rem; font-weight: 700; color: #fff; background: #000; border: 1px solid #fff; padding: .1rem .35rem; width: 100%; box-sizing: border-box; font-family: inherit; outline: none; }
.proj-sub { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 0 0 .6rem; }
.ws-back { margin: 0 0 .8rem; }
.ws-back a { font-size: .8rem; color: var(--muted); text-decoration: none; }
.ws-back a:hover { color: #fff; }

/* ---------- Project page: room blocks + 3-up palette grid ---------- */
.proj-room { border: 1px solid var(--bd-soft); padding: 1.1rem 1.2rem 1.3rem; margin-bottom: 1rem; }
.proj-room-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.proj-room-name { display: inline-flex; align-items: center; gap: .55rem; font-size: 1rem; font-weight: 700; color: #fff; }
.proj-room-name svg { color: var(--muted); flex: none; }
.proj-room-right { display: inline-flex; align-items: center; gap: .4rem; }
.proj-room-count { font-size: .72rem; color: var(--muted); white-space: nowrap; margin-right: .4rem; }
.proj-room-edit { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--muted-dim); cursor: pointer; line-height: 0; opacity: 0; transition: opacity .14s, color .14s; }
.proj-room:hover .proj-room-edit { opacity: 1; }
.proj-room-edit:hover { color: #fff; }
.proj-room-del { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--muted-dim); cursor: pointer; font-size: 1rem; }
.proj-room-del:hover { color: var(--neg); }
.proj-room-rename { font-size: 1rem; font-weight: 700; color: #fff; background: #000; border: 1px solid #fff; padding: .05rem .35rem; font-family: inherit; outline: none; min-width: 160px; }
.proj-room-empty { font-size: .82rem; color: var(--muted-dim); }
.proj-pal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.proj-paint-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.1rem; }
.proj-paint { border: 1px solid var(--bd-soft); display: flex; align-items: center; gap: .7rem; padding: .55rem; }
.proj-paint-sw { width: 56px; height: 56px; flex: none; }
.proj-paint-m { padding: .5rem .6rem; min-width: 0; }
.proj-paint-b { display: block; font-size: .54rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.proj-paint-n { display: block; font-size: .8rem; color: #fff; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-paint-code { display: block; font-family: var(--mono); font-size: .62rem; color: #bdbdbd; margin-top: .1rem; }
@media (max-width: 900px) { .proj-pal-grid, .proj-paint-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .proj-pal-grid, .proj-paint-grid { grid-template-columns: 1fr; } }

/* Heart on catalogue swatch cards — always visible (chip over the swatch). */
.swatch-fill { position: relative; }
/* heart + "+" now live in the swatch info bar — layout in color-catalogue.html */

/* Remove-paint ✕ on a project paint card (on hover). */
.proj-paint { position: relative; }
.proj-paint-del { position: absolute; top: .3rem; right: .3rem; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--muted-dim); cursor: pointer; opacity: 0; transition: opacity .12s; font-size: .8rem; }
.proj-paint:hover .proj-paint-del { opacity: 1; }
.proj-paint-del:hover { color: var(--neg); }

/* Project paint card is now a link to the full colour page. */
.proj-paint { text-decoration: none; transition: border-color .15s; }
.proj-paint:hover { border-color: var(--bd-strong); }

/* Client/project details disclosure on the project page. */
.proj-details-box { border: 1px solid var(--bd-soft); margin: 0 0 1.4rem; }
.proj-details-head { padding: .7rem 1rem; font-size: .8rem; font-weight: 700; color: #fff; border-bottom: 1px solid var(--bd-soft); }
.proj-details-head span { color: var(--muted); font-weight: 400; }
/* view mode — saved details as a tidy read-only summary */
.pd-view { padding: 1rem; }
.pd-rows { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1.1rem; }
.pd-row { display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: baseline; }
.pd-k { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding-top: .15rem; }
.pd-v { font-size: .92rem; color: #fff; line-height: 1.5; white-space: pre-wrap; }
/* edit mode */
.proj-details-grid { padding: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.proj-details-note { grid-column: 1 / -1; min-height: 64px; resize: vertical; box-sizing: border-box; background: var(--inset); border: 1px solid rgba(255,255,255,.2); color: #fff; font: inherit; font-size: .88rem; padding: .55rem .8rem; }
.proj-details-note:focus { outline: none; border-color: #fff; }
.pd-actions { grid-column: 1 / -1; display: flex; gap: .6rem; }
@media (max-width: 560px) { .proj-details-grid { grid-template-columns: 1fr; } .pd-row { grid-template-columns: 1fr; gap: .15rem; } }

/* ---------- export constructor (live PDF preview) ---------- */
.ex-wrap { display: flex; align-items: flex-start; gap: 2.5rem; padding: 2rem 2.5rem 0; box-sizing: border-box; }
@media (max-width: 900px) { .ex-wrap { flex-direction: column; gap: 1.2rem; padding: 1.4rem 1.2rem 0; } }

/* left control panel */
.ex-panel { width: 320px; flex: none; position: sticky; top: 76px; }
@media (max-width: 900px) { .ex-panel { width: 100%; position: static; } }
.ex-back { display: inline-block; font-size: .8rem; color: var(--muted); text-decoration: none; margin-bottom: 1rem; }
.ex-back:hover { color: #fff; }
.ex-h { font-size: 1.5rem; font-weight: 800; margin: 0 0 .3rem; }
.ex-sub { font-size: .82rem; color: var(--muted); line-height: 1.5; margin: 0 0 1.4rem; }
.ex-group { border-top: 1px solid var(--bd-soft); padding: 1rem 0; }
.ex-group-t { font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--muted); margin-bottom: .7rem; }
.ex-tog { display: flex; align-items: center; gap: .65rem; padding: .35rem 0; font-size: .9rem; color: #eee; cursor: pointer; user-select: none; }
/* custom on-brand checkbox — square, no border; grey → white w/ black tick */
.ex-tog input { -webkit-appearance: none; appearance: none; width: 19px; height: 19px; flex: none; margin: 0; border: none; background: #242424; cursor: pointer; position: relative; transition: background .12s; }
.ex-tog input:hover { background: #333; }
.ex-tog input:checked { background: #fff; }
.ex-tog input:checked::after { content: ''; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ex-group .bsel { margin-top: .6rem; }
.ex-hint { font-size: .72rem; color: var(--muted-dim); line-height: 1.45; margin: .6rem 0 0; }
.ex-dl { width: 100%; margin-top: 2rem; margin-bottom: 2.5rem; font-size: .82rem; }
/* form fields inside a control group get even spacing without inline styles */
.ex-group .app-input { margin-bottom: .5rem; }
.ex-group .app-input:last-of-type { margin-bottom: 0; }
.ex-group .ex-tog + .app-input { margin-top: .6rem; }
.ex-group .app-btn { margin-top: .6rem; }

/* right preview column — plain block; sheets centre via margin auto (robust) */
.ex-preview { flex: 1; min-width: 0; padding-bottom: 3rem; }

/* one A4 sheet — white paper, black ink, like the real PDF. Fixed 460px width
   and A4 aspect (460 × 1.414 ≈ 650) so every sheet always looks like a page. */
.ex-page { width: 460px; max-width: 100%; min-height: 650px; margin: 0 auto 1.6rem; background: #fff; color: #111; box-shadow: 0 8px 40px rgba(0,0,0,.5); padding: 34px 38px; box-sizing: border-box; font-family: 'Inter', system-ui, sans-serif; }
.ex-page[hidden] { display: none; }

/* cover layout — A4 page: brand top, title below, footer pinned to the bottom */
.ex-cover { display: flex; flex-direction: column; }
.ex-cv-mid { margin: 40px 0; }
.ex-cv-foot { border-top: 1px solid #e1e1e1; padding-top: .9rem; margin-top: auto; }
.ex-pg-brand { font-size: .85rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #000; }
.ex-pg-rule { width: 34px; height: 2px; background: #000; margin-top: .55rem; }
.ex-pg-eyebrow { font-size: .62rem; letter-spacing: .14em; color: #999; font-weight: 700; margin-bottom: .5rem; }
.ex-pg-title { font-size: 2.4rem; font-weight: 800; line-height: 1.05; color: #000; letter-spacing: -.01em; }
.ex-pg-for { font-size: .95rem; color: #555; margin-top: .8rem; }
.ex-pg-addr { font-size: .8rem; color: #999; margin-top: .2rem; }
.ex-pg-meta { font-size: .78rem; color: #666; }
.ex-pg-contact { font-size: .72rem; color: #999; margin-top: .2rem; }

/* content pages */
.ex-pg-h2 { font-size: 1.4rem; font-weight: 800; color: #000; margin: 0 0 .2rem; }
.ex-pg-sub2 { font-size: .78rem; color: #999; margin: 0 0 1rem; padding-bottom: .7rem; border-bottom: 1px solid #e1e1e1; }
.ex-pg-note { font-size: .82rem; color: #555; line-height: 1.5; margin: 0 0 1.4rem; }
.ex-pg-empty { font-size: .85rem; color: #aaa; }

.ex-pg-room { margin-bottom: 1.6rem; }
.ex-pg-roomh { font-size: 1.05rem; font-weight: 800; color: #000; margin-bottom: .5rem; }
.ex-pg-cols { display: grid; grid-template-columns: 44px 1fr 90px 120px; gap: .6rem; font-size: .56rem; letter-spacing: .1em; color: #aaa; font-weight: 700; padding-bottom: .35rem; border-bottom: 1px solid #ececec; margin-bottom: .5rem; }
.ex-pg-cols span:first-child { grid-column: 2; }
.ex-pg-row { display: grid; grid-template-columns: 44px 1fr 90px 120px; gap: .6rem; align-items: center; padding: .32rem 0; }
.ex-pg-sw { width: 34px; height: 34px; flex: none; border: 1px solid #ddd; display: inline-block; }
.ex-pg-sw.sm { width: 28px; height: 28px; }
.ex-pg-rn { font-size: .85rem; font-weight: 700; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-pg-rr { font-size: .78rem; color: #555; }
.ex-pg-rc { font-size: .68rem; color: #888; font-family: var(--mono); text-align: right; }

/* moodboard */
.ex-pg-pal { margin-bottom: 1.2rem; }
.ex-pg-paln { font-size: .85rem; font-weight: 700; color: #000; margin-bottom: .4rem; }
.ex-pg-band { display: flex; height: 54px; }
.ex-pg-band span { flex: 1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px; }
.ex-pg-band b { font-size: .5rem; font-weight: 600; color: rgba(255,255,255,.85); mix-blend-mode: difference; font-family: var(--mono); }

/* shopping */
.ex-pg-shop { display: flex; align-items: center; gap: .7rem; padding: .4rem 0; border-bottom: 1px solid #f2f2f2; }
.ex-pg-sm { display: flex; flex-direction: column; min-width: 0; }
.ex-pg-sn { font-size: .85rem; font-weight: 700; color: #000; }
.ex-pg-sc { font-size: .68rem; color: #888; font-family: var(--mono); margin-top: .1rem; }

/* ---------- settings: studio branding (white-label) ---------- */
.ws-studio-card { max-width: 560px; margin-bottom: 1.4rem; }
.ws-wl-tag { font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #000; background: #fff; padding: .15rem .45rem; margin-left: .55rem; vertical-align: middle; }
.ws-studio-lead { font-size: .82rem; color: var(--muted); line-height: 1.5; margin: 0 0 1.2rem; }
.ws-logo-row { margin-bottom: 1.4rem; }
.ws-logo-prev { width: 168px; height: 78px; flex: none; border: 1px solid var(--bd-strong); display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.ws-logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ws-logo-prev span { font-size: .66rem; color: #999; letter-spacing: .04em; }
.ws-inline-form { margin: 0; }
.ws-btn-auto { width: auto; padding: .7rem 1.2rem; }
.ws-mb1 { margin-bottom: 1rem; }
.ws-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; margin-bottom: 1rem; }
.ws-contact-full { grid-column: 1 / -1; }
.ws-mt1 { margin-top: .4rem; }
@media (max-width: 520px) { .ws-contact-grid { grid-template-columns: 1fr; } }

/* ---------- settings page (clean two-column sections, full page width) ---------- */
/* top/bottom spacing comes from container pt-10 pb-4 — matches every other page */
.set-head { padding: 0 0 1.6rem; }
.set-head h1 { font-size: 2rem; font-weight: 800; margin: 0; letter-spacing: -.01em; line-height: 1.1; }
.set-head p { font-size: .85rem; color: var(--muted); margin: .35rem 0 0; }
/* aside (label) | body (form, flexible up to a readable cap) */
.set-row { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 3rem; padding: 2.4rem 0; border-top: 1px solid var(--bd-soft); }
.set-aside h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 .45rem; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.set-aside p { font-size: .82rem; color: var(--muted); line-height: 1.55; margin: 0; max-width: 250px; }
.set-body { max-width: 680px; }
.set-form { display: block; }
.set-hint { font-size: .74rem; color: var(--muted-dim); line-height: 1.45; margin: .5rem 0 0; }
.set-mt { margin-top: 1rem; }
.set-input-locked { opacity: .55; }
.set-avatar { display: flex; align-items: flex-start; gap: 1.1rem; margin-bottom: 1.8rem; }
/* upload + remove sit on one row; the hint wraps onto its own line below */
.set-avatar-ctl { display: flex; flex-flow: row wrap; gap: .6rem; align-items: center; }
.set-avatar-ctl .set-hint { flex-basis: 100%; margin-top: .2rem; }
.set-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin-bottom: 1.2rem; }
@media (max-width: 560px) { .set-grid2 { grid-template-columns: 1fr; } }
.set-plan-line { font-size: .85rem; color: var(--muted); line-height: 1.55; margin: 0 0 1.1rem; }
.set-plan-line strong { color: #fff; }
.set-link-btn { text-decoration: none; }
.set-row--danger { border-top-color: rgba(255,90,90,.35); }
.set-row--danger .set-aside h2 { color: #ff8a8a; }
@media (max-width: 760px) { .set-row { grid-template-columns: 1fr; gap: 1.1rem; padding: 1.6rem 0; } .set-aside p { max-width: none; } }

/* ---------- workspace header row: title left, action (create/search) right ---------- */
.ws-head-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.ws-head-action { display: flex; gap: .5rem; align-items: center; flex: none; }
.ws-head-action .ad-search { min-width: 260px; }
@media (max-width: 640px) { .ws-head-action { width: 100%; } .ws-head-action .ad-search { flex: 1; min-width: 0; } }

/* ---------- drag & drop paints/palettes between rooms ---------- */
.proj-paint[draggable="true"], .proj-pal-grid .ws-pal[draggable="true"] { cursor: grab; }
.proj-paint.is-dragging, .ws-pal.is-dragging { opacity: .4; }
.proj-room.drag-over { outline: 2px dashed #fff; outline-offset: -2px; background: rgba(255,255,255,.04); }
.proj-room { transition: background .12s; }
