/* ==========================================================================
   STUDIO — Designer Brand & Design Asset Platform
   Phase 01 · Minimal Editorial Studio · Design System
   Shared stylesheet: Landing Page + My Space Dashboard
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-serif: "Cormorant Garamond", "Songti SC", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;

  --paper:      #F6F4EF;   /* warm white */
  --paper-2:    #F0EEE7;   /* light warm gray */
  --surface:    #FCFBF8;   /* card surface */
  --ink:        #1D1B18;   /* near-black warm */
  --ink-2:      #4C4943;   /* secondary */
  --ink-3:      #8C8880;   /* muted */
  --line:       #E4E1D8;   /* hairline */
  --line-2:     #CBC7BB;   /* hairline strong */
  --hover-bg:   #EDEAE2;

  --r-s: 2px;
  --r-m: 3px;
  --r-l: 6px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.25, .46, .45, .94);

  --t-hover: 180ms;   /* hover */
  --t-card:  260ms;   /* card move */
  --t-img:   420ms;   /* image scale */
  --t-enter: 220ms;   /* module enter */

  --head-h: 72px;
  --side-w: 264px;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: pageIn 240ms var(--ease-soft) both;
}

@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--ink); color: var(--paper); }

.container { max-width: 1320px; margin: 0 auto; padding: 0 48px; }

/* ---------- Type utilities ---------- */
.label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.serif-i { font-family: var(--font-serif); font-style: italic; }

.display {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.012em;
}

/* ---------- Arrow glyph (mask-based, inherits color) ---------- */
.arr {
  display: inline-block;
  width: 13px; height: 13px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>") center / contain no-repeat;
  transition: transform var(--t-hover) var(--ease);
}
.arr-up {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M7 17L17 7M9 7h8v8'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M7 17L17 7M9 7h8v8'/></svg>") center / contain no-repeat;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1;
  padding: 14px 24px;
  border-radius: var(--r-s);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: background var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease),
              color var(--t-hover) var(--ease), transform var(--t-hover) var(--ease);
  white-space: nowrap;
}
.btn:hover { background: #3A372F; border-color: #3A372F; }
.btn:hover .arr { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: transparent; border-color: var(--ink); }
.btn-ghost:active { transform: translateY(1px); }

.btn-sm { padding: 10px 18px; font-size: 12.5px; }
.btn-lg { padding: 17px 32px; font-size: 14px; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: color var(--t-hover) var(--ease);
}
.arrow-link .arr { width: 12px; height: 12px; }
.arrow-link:hover .arr { transform: translateX(4px); }

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; }
.lang-switch button {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: .04em;
  line-height: 1;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: var(--r-s);
  color: var(--ink-3);
  background: transparent;
  cursor: pointer;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.is-on { color: var(--ink); border-color: var(--line-2); }
.lang-switch .sep { width: 1px; height: 12px; background: var(--line-2); margin: 0 3px; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo-mark {
  width: 20px; height: 20px;
  border: 1.5px solid var(--ink);
  position: relative;
  flex: none;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--ink);
}
.logo-type {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1;
}

/* ==========================================================================
   Reveal / enter motion
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 480ms var(--ease-soft), transform 480ms var(--ease);
  transition-delay: var(--rd, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

[data-enter] { opacity: 0; transform: translateY(8px); }
[data-enter].is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-enter) var(--ease-soft), transform 260ms var(--ease);
  transition-delay: var(--rd, 0ms);
}

/* ==========================================================================
   PAGE 01 — LANDING
   ========================================================================== */

/* ---------- Header ---------- */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  border-bottom: 1px solid transparent;
  transition: background 250ms var(--ease), border-color 250ms var(--ease);
}
.site-head.is-scrolled {
  background: rgba(246, 244, 239, .94);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a {
  font-size: 13px;
  color: var(--ink-2);
  transition: color var(--t-hover) var(--ease);
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-hover) var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.head-right { display: flex; align-items: center; gap: 28px; }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--head-h) + 84px) 0 0; }
.hero-eyebrow { margin-bottom: 30px; }
.hero h1 {
  font-size: clamp(56px, 10.6vw, 152px);
  text-transform: uppercase;
}
.hero h1 .l2 { display: block; padding-left: .07em; }
.hero-lead {
  margin-top: 34px;
  max-width: 430px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.hero-cta { margin-top: 42px; display: flex; align-items: center; gap: 26px; }
.hero-note { font-size: 12.5px; color: var(--ink-3); }

/* ---------- Editorial gallery ---------- */
.gallery-band {
  margin-top: 84px;
  transform: translateY(var(--sy, 0px));
  will-change: transform;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 320px 228px 248px;
  gap: 18px;
}
.gtile {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  transform: translate3d(calc(var(--mx, 0px) * var(--d, .5)), calc(var(--my, 0px) * var(--d, .5)), 0);
  will-change: transform;
}
.gtile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-img) var(--ease);
}
.gtile:hover img { transform: scale(1.03); }

.g1 { grid-area: 1 / 1  / 2 / 6;  --d: .50; }
.g2 { grid-area: 1 / 7  / 2 / 10; --d: 1.0; margin-top: 58px; }
.g3 { grid-area: 1 / 10 / 2 / 13; --d: .70; margin-top: 22px; }
.g4 { grid-area: 2 / 2  / 3 / 6;  --d: .38; margin-top: 40px; }
.g5 { grid-area: 2 / 7  / 3 / 10; --d: .88; margin-top: -14px; }
.g6 { grid-area: 2 / 10 / 3 / 13; --d: .62; margin-top: 48px; }
.g7 { grid-area: 3 / 1  / 4 / 9;  --d: .45; margin-top: 14px; }
.g8 { grid-area: 3 / 10 / 4 / 13; --d: .80; margin-top: -10px; }

/* ---------- Asset Flow (scroll-driven) ---------- */
.flow { border-top: 1px solid var(--line); margin-top: 120px; }
.flow-track { height: 360vh; position: relative; }
.flow-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--head-h) + 26px);
  overflow: hidden;
}
.flow-head { padding: 0 48px; }
.flow-head h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin-top: 14px;
}
.flow-stage {
  position: relative;
  flex: 1;
  min-height: 0;
}
.stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  opacity: 0;
  transform: translateY(12px) scale(.985);
  transition: opacity 420ms var(--ease-soft), transform 420ms var(--ease);
  pointer-events: none;
  will-change: opacity, transform;
}
.stage.is-active { opacity: 1; transform: none; }
.stage-cap { font-size: 13px; color: var(--ink-3); letter-spacing: .02em; }
.stage-cap b { font-weight: 500; color: var(--ink-2); }

.st-frame {
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.st-asset-img {
  height: min(42vh, 400px);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px;
}
.st-asset-img img { width: 100%; height: 100%; object-fit: cover; }

/* stage 1 — collection */
.st-col { width: min(470px, 80vw); }
.st-col-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.st-col-head .t { font-family: var(--font-serif); font-size: 18px; }
.st-col-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  padding: 14px;
  aspect-ratio: 4 / 3;
}
.st-col-grid figure { overflow: hidden; background: var(--paper-2); }
.st-col-grid figure:first-child { grid-row: span 2; }
.st-col-grid img { width: 100%; height: 100%; object-fit: cover; }

/* stage 2 — project spread */
.st-proj {
  width: min(680px, 86vw);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  border: 1px solid var(--line);
  background: var(--surface);
}
.st-proj-text { padding: clamp(22px, 3.4vh, 36px); display: flex; flex-direction: column; gap: 14px; }
.st-proj-text h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(20px, 2.6vh, 27px); line-height: 1.15; }
.st-proj-text h3 em { font-style: italic; color: var(--ink-2); }
.st-proj-meta { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.st-lines { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.st-lines i { display: block; height: 5px; background: var(--paper-2); border-radius: 2px; }
.st-lines i:nth-child(1) { width: 92%; }
.st-lines i:nth-child(2) { width: 78%; }
.st-lines i:nth-child(3) { width: 60%; }
.st-proj-img { border-left: 1px solid var(--line); min-height: 220px; }
.st-proj-img img { width: 100%; height: 100%; object-fit: cover; }

/* stage 3 — brand board */
.st-brand-board {
  width: min(540px, 84vw);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 34px);
  padding: clamp(24px, 3.6vh, 38px) clamp(24px, 3.4vw, 40px);
}
.st-brand-mark {
  width: 72px; height: 72px;
  flex: none;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: .02em;
}
.st-brand-board h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(22px, 3vh, 30px); line-height: 1.1; }
.st-brand-board .tag { font-family: var(--font-serif); font-style: italic; color: var(--ink-2); font-size: 16px; margin-top: 4px; }
.st-swatches { display: flex; gap: 8px; margin-top: 16px; }
.st-swatches i { width: 20px; height: 20px; border: 1px solid var(--line-2); display: block; }

/* stage 4 — website */
.st-site {
  width: min(640px, 88vw);
  border: 1px solid var(--line-2);
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 30px 70px -40px rgba(29, 27, 24, .22);
}
.st-site-bar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.st-site-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.st-site-bar .url {
  margin-left: 10px;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 12px;
}
.st-site-body { padding: 20px 24px 24px; }
.st-site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.st-site-nav .brand { font-family: var(--font-serif); font-size: 15px; letter-spacing: .04em; }
.st-site-nav .links { font-size: 10px; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; }
.st-site-hero { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.st-site-hero img { width: 100%; height: 100%; object-fit: cover; }

/* flow steps */
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 0;
  padding: 0 24px calc(4vh + 8px);
}
.step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 clamp(12px, 2.4vw, 26px);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color 300ms var(--ease);
  white-space: nowrap;
}
.step .n {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0;
}
.step.is-active { color: var(--ink); }
.step::after {
  content: "";
  width: clamp(18px, 3vw, 40px);
  height: 1px;
  background: var(--line-2);
  margin-left: clamp(12px, 2.4vw, 26px);
}
.step:last-child::after { display: none; }

/* ---------- Asset Growth (scroll-driven) ---------- */
.growth { border-top: 1px solid var(--line); }
.growth-track { height: 330vh; position: relative; }
.growth-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
}
.growth-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  width: 100%;
}
.growth-copy h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin: 16px 0 40px;
}
.growth-num-row { display: flex; align-items: baseline; gap: 14px; }
.growth-num {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(76px, 9vw, 132px);
  line-height: .9;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.growth-unit {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(19px, 2vw, 25px);
  color: var(--ink-3);
}
.growth-ticks { display: flex; gap: 22px; margin-top: 34px; }
.gtick {
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  transition: color 300ms var(--ease);
  position: relative;
  padding-top: 12px;
}
.gtick::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--line-2);
}
.gtick::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease);
}
.gtick.is-active { color: var(--ink); }
.gtick.is-active::after { transform: scaleX(1); }

.growth-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gtile-g {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-2);
  opacity: var(--on, 0);
  transform: scale(calc(.9 + .1 * var(--on, 0)));
}
.gtile-g img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Brand / Space section ---------- */
.brand-space { border-top: 1px solid var(--line); padding: 130px 0; }
.bs-grid {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
}
.bs-copy h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: -.01em;
  margin: 18px 0 10px;
}
.bs-tag {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  color: var(--ink-2);
}
.bs-desc { margin-top: 26px; max-width: 400px; color: var(--ink-2); font-size: 15px; }
.bs-list { margin-top: 40px; border-top: 1px solid var(--line); }
.bs-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
  transition: color var(--t-hover) var(--ease), padding var(--t-card) var(--ease);
}
.bs-list a:hover { color: var(--ink); padding-left: 10px; }
.bs-list a .arr { opacity: .55; }
.bs-list a:hover .arr { transform: translateX(4px); opacity: 1; }

.bs-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(28px, 4vw, 48px);
}
.bs-card-top { display: flex; align-items: center; gap: 20px; }
.bs-card-mark {
  width: 64px; height: 64px;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 21px;
  flex: none;
}
.bs-card-top h3 { font-family: var(--font-serif); font-weight: 400; font-size: 27px; line-height: 1.1; }
.bs-card-top p { font-family: var(--font-serif); font-style: italic; color: var(--ink-2); font-size: 15.5px; }
.bs-rule { height: 1px; background: var(--line); margin: 30px 0; }
.bs-palette { display: flex; gap: 10px; }
.bs-swatch { flex: 1; }
.bs-swatch i { display: block; aspect-ratio: 1 / 1; border: 1px solid var(--line-2); }
.bs-swatch span { display: block; font-size: 9.5px; letter-spacing: .08em; color: var(--ink-3); margin-top: 8px; text-transform: uppercase; }
.bs-mini { border: 1px solid var(--line); overflow: hidden; }
.bs-mini-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.bs-mini-img { aspect-ratio: 16 / 8; overflow: hidden; }
.bs-mini-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Final CTA ---------- */
.cta-final {
  border-top: 1px solid var(--line);
  padding: clamp(110px, 16vh, 180px) 0;
  text-align: center;
}
.cta-final h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(36px, 5.6vw, 76px);
  line-height: 1.04;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 22px 0 44px;
}
.cta-sub {
  margin-top: 30px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 26px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
}
.site-foot .foot-links { display: flex; gap: 26px; }
.site-foot .foot-links a { transition: color var(--t-hover) var(--ease); }
.site-foot .foot-links a:hover { color: var(--ink); }

/* ==========================================================================
   PAGE 02 — MY SPACE / DASHBOARD
   ========================================================================== */
.dash { min-height: 100vh; }

/* ---------- Sidebar ---------- */
.dash-side {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--side-w);
  border-right: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding: 26px 16px 18px;
  z-index: 70;
  transition: transform 300ms var(--ease);
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; }
.side-ws {
  margin: 22px 6px 26px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: default;
  transition: border-color var(--t-hover) var(--ease);
}
.side-ws:hover { border-color: var(--line-2); }
.side-ws .ws-name { font-family: var(--font-serif); font-size: 17.5px; line-height: 1.2; }
.side-ws .chev { color: var(--ink-3); }

.side-group { margin-bottom: 24px; }
.side-label { padding: 0 12px 9px; }
.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-m);
  font-size: 13.5px;
  color: var(--ink-2);
  position: relative;
  transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.side-item svg { width: 16px; height: 16px; flex: none; opacity: .75; }
.side-item:hover { background: var(--hover-bg); color: var(--ink); }
.side-item:active { transform: scale(.985); }
.side-item.active { background: var(--hover-bg); color: var(--ink); font-weight: 500; }
.side-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 20%;
  width: 2px; height: 60%;
  background: var(--ink);
}
.side-item.active svg { opacity: 1; }

.side-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px 4px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--ink-2);
  flex: none;
}
.side-user .u-name { font-size: 13px; line-height: 1.3; }
.side-user .u-role { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }

.side-scrim {
  position: fixed;
  inset: 0;
  background: rgba(29, 27, 24, .18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--ease);
  z-index: 65;
}
.side-scrim.is-on { opacity: 1; pointer-events: auto; }

/* ---------- Main column ---------- */
.dash-main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }

.dash-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 16px 40px;
  background: rgba(246, 244, 239, .93);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.crumb { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumb .here { color: var(--ink); }
.crumb .sep { color: var(--line-2); }
.top-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.menu-btn {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: border-color var(--t-hover) var(--ease);
}
.menu-btn:hover { border-color: var(--ink); }
.menu-btn svg { width: 16px; height: 16px; }

/* ---------- Dashboard hero ---------- */
.dash-hero {
  display: grid;
  grid-template-columns: 1.5fr .7fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
  padding: clamp(48px, 7vh, 84px) 40px clamp(40px, 6vh, 60px);
  border-bottom: 1px solid var(--line);
}
.dash-hero h1 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(54px, 7.4vw, 104px);
  line-height: .98;
  letter-spacing: -.012em;
  text-transform: uppercase;
}
.dash-hero .lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(19px, 2vw, 24px);
  color: var(--ink-2);
  margin-top: 20px;
}
.dash-hero .sub { margin-top: 18px; max-width: 430px; font-size: 14.5px; color: var(--ink-3); }
.dash-stat { text-align: right; padding-bottom: 6px; }
.dash-stat .n {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(64px, 7vw, 96px);
  line-height: .9;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.dash-stat .cap { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: inline-block; min-width: 180px; }

/* ---------- Sections ---------- */
.sec { padding: clamp(40px, 6vh, 60px) 40px; }
.sec + .sec { padding-top: 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.sec-head h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 31px);
  letter-spacing: -.005em;
}

/* ---------- Recent assets ---------- */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.asset-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px;
  transition: border-color 260ms var(--ease);
  cursor: pointer;
}
.asset-card:hover { border-color: var(--line-2); }
.asset-fig {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-2);
}
.asset-fig img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-img) var(--ease);
}
.asset-card:hover .asset-fig img { transform: scale(1.03); }
.asset-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 6px 4px;
}
.asset-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 19.5px;
  line-height: 1.2;
  transition: transform 260ms var(--ease);
}
.asset-card:hover .asset-title { transform: translateX(3px); }
.view-cue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
  white-space: nowrap;
}
.asset-card:hover .view-cue { opacity: 1; transform: none; }
.asset-sub { padding: 2px 6px 6px; font-size: 12px; color: var(--ink-3); letter-spacing: .03em; }

/* ---------- Collections ---------- */
.coll-list { border-top: 1px solid var(--line); }
.coll-row {
  display: grid;
  grid-template-columns: 62px 1fr auto 20px;
  gap: 22px;
  align-items: center;
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  transition: background 200ms var(--ease), transform 280ms var(--ease);
  cursor: pointer;
}
.coll-row:hover { background: var(--hover-bg); transform: translateX(3px); }
.coll-thumb { width: 62px; height: 62px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.coll-thumb img { width: 100%; height: 100%; object-fit: cover; }
.coll-name { font-family: var(--font-serif); font-weight: 500; font-size: 21px; line-height: 1.2; }
.coll-count { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.coll-upd { font-size: 12px; color: var(--ink-3); letter-spacing: .03em; text-align: right; }
.coll-row .arr { color: var(--ink-3); transition: transform 260ms var(--ease), color 260ms var(--ease); }
.coll-row:hover .arr { transform: translateX(5px); color: var(--ink); }

/* ---------- Brand space card ---------- */
.brand-card {
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.bc-left { padding: clamp(28px, 4vh, 44px); border-right: 1px solid var(--line); }
.bc-left h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(26px, 3vw, 34px); line-height: 1.08; margin: 16px 0 6px; }
.bc-left .tag { font-family: var(--font-serif); font-style: italic; font-size: 17px; color: var(--ink-2); }
.bc-palette { display: flex; gap: 10px; margin-top: 28px; }
.bc-swatch { flex: 1; }
.bc-swatch i { display: block; aspect-ratio: 1 / 1; border: 1px solid var(--line-2); }
.bc-swatch span { display: block; font-size: 9.5px; letter-spacing: .08em; color: var(--ink-3); margin-top: 7px; text-transform: uppercase; }
.bc-right { padding: clamp(28px, 4vh, 44px); display: flex; flex-direction: column; }
.bc-store .n {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 33px);
  letter-spacing: -.01em;
  margin-top: 14px;
  font-variant-numeric: tabular-nums;
}
.bc-store .n span { color: var(--ink-3); font-size: .62em; }
.store-bar {
  height: 3px;
  background: var(--line);
  margin-top: 22px;
  position: relative;
  overflow: hidden;
}
.store-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 31%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms var(--ease) 250ms;
}
[data-enter].is-in .store-bar i { transform: scaleX(1); }
.bc-note { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }
.bc-note b { font-weight: 500; color: var(--ink-2); }

/* ==========================================================================
   Responsive baseline
   ========================================================================== */
@media (max-width: 1180px) {
  .gallery { grid-template-rows: 280px 200px 220px; }
  .growth-grid { grid-template-columns: 1fr .9fr; gap: 40px; }
}

@media (max-width: 1080px) {
  .dash-main { margin-left: 0; }
  .dash-side { transform: translateX(-105%); box-shadow: none; }
  .dash-side.is-open { transform: none; box-shadow: 24px 0 60px -40px rgba(29,27,24,.25); }
  .menu-btn { display: inline-flex; }
  .dash-hero { grid-template-columns: 1fr; align-items: start; }
  .dash-stat { text-align: left; }
  .dash-stat .cap { min-width: 0; }
  .assets-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-card { grid-template-columns: 1fr; }
  .bc-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .bs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .container { padding: 0 26px; }
  .site-head { padding: 0 26px; }
  .site-nav { display: none; }
  .hero { padding-top: calc(var(--head-h) + 56px); }
  .hero-cta { flex-direction: column; align-items: flex-start; gap: 18px; }
  .flow-head, .flow-steps { padding-left: 26px; padding-right: 26px; }
  .flow-track { height: 300vh; }
  .growth-track { height: 300vh; }
  .growth-grid { grid-template-columns: 1fr; gap: 36px; }
  .growth-mosaic { grid-template-columns: repeat(3, 1fr); }
  .sec, .dash-top, .dash-hero { padding-left: 24px; padding-right: 24px; }
  .site-foot { padding: 24px 26px; flex-direction: column; gap: 14px; align-items: flex-start; }
}

@media (max-width: 640px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    gap: 12px;
  }
  .gtile { grid-area: auto !important; margin-top: 0 !important; aspect-ratio: 3 / 4; }
  .g1 { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .g7 { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .gallery-band { margin-top: 56px; }
  .assets-grid { grid-template-columns: 1fr; }
  .coll-row { grid-template-columns: 48px 1fr 18px; gap: 14px; }
  .coll-thumb { width: 48px; height: 48px; }
  .coll-upd { display: none; }
  .st-proj { grid-template-columns: 1fr; }
  .st-proj-img { border-left: 0; border-top: 1px solid var(--line); aspect-ratio: 16 / 10; }
  .st-brand-board { flex-direction: column; text-align: center; gap: 16px; }
  .step { font-size: 9.5px; letter-spacing: .08em; padding: 0 8px; }
  .step .n { display: none; }
  .step::after { width: 12px; margin-left: 8px; }
  .cta-final { padding-left: 26px; padding-right: 26px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  [data-reveal], [data-enter] { opacity: 1 !important; transform: none !important; }
  .gtile-g { opacity: 1 !important; transform: none !important; }
  .gallery-band { transform: none !important; }
  .gtile { transform: none !important; }
}

/* ==========================================================================
   PHASE 2 — Collections · Projects · Design Library · Associations
   PC desktop only (1440 / 1600 / 1920). Same design language as phase 1.
   ========================================================================== */
:root { --danger: #8C4A32; }

/* ---------- sidebar: link items + soon + reset ---------- */
a.side-item { text-decoration: none; }
.side-item.is-soon { opacity: .42; cursor: default; }
.side-item.is-soon:hover { background: transparent; color: var(--ink-2); }
.side-reset {
  margin: auto 12px 22px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-3);
  text-align: left;
  padding: 6px 0;
  transition: color var(--t-hover) var(--ease);
}
.side-reset:hover { color: var(--danger); }

/* ---------- page frame ---------- */
.page { max-width: 1560px; margin: 0 auto; padding: 34px 40px 90px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: 26px; }
.page-head h1 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(38px, 3.6vw, 54px);
  line-height: 1.02;
  letter-spacing: -.012em;
}
.page-head .ph-sub { margin-top: 12px; font-size: 14.5px; color: var(--ink-3); max-width: 520px; }
.page-head .ph-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.crumb a { color: var(--ink-3); transition: color var(--t-hover) var(--ease); }
.crumb a:hover { color: var(--ink); }

/* ---------- toolbar: search / chips / view toggle ---------- */
.toolbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0 22px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.search-box { position: relative; flex: 0 1 280px; }
.search-box .input { padding-left: 34px; }
.search-box::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: 13px; height: 13px;
  transform: translateY(-50%);
  background: var(--ink-3);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-4.3-4.3'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-4.3-4.3'/></svg>") center/contain no-repeat;
}
.input, .textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 10px 13px;
  transition: border-color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .textarea:focus { outline: none; border-color: var(--ink-2); background: var(--paper); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.6; }

.chips { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.chip {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--ink-3);
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 20px;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.chip:hover { color: var(--ink); background: var(--hover-bg); }
.chip.is-on { color: var(--ink); border-color: var(--line-2); background: var(--surface); }
.chip-sep { width: 1px; height: 16px; background: var(--line); margin: 0 6px; }

.view-toggle { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 3px; background: var(--surface); }
.view-toggle button {
  font-size: 12px; color: var(--ink-3); padding: 6px 12px; border-radius: 2px;
  transition: color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.view-toggle button:hover { color: var(--ink); }
.view-toggle button.is-on { color: var(--paper); background: var(--ink); }

/* ---------- design cards ---------- */
.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 26px 20px;
}
.design-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px;
  position: relative;
  transition: border-color 260ms var(--ease), transform 260ms var(--ease), box-shadow 260ms var(--ease);
}
.design-card:hover { border-color: var(--line-2); }
.dc-fig { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.dc-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-img) var(--ease); }
.design-card:hover .dc-fig img { transform: scale(1.03); }
.dc-meta { display: flex; align-items: baseline; gap: 10px; padding: 14px 6px 2px; }
.dc-name { font-family: var(--font-serif); font-weight: 500; font-size: 19px; line-height: 1.2; transition: transform 260ms var(--ease); }
.dc-name a { color: inherit; }
.design-card:hover .dc-name { transform: translateX(3px); }
.dc-more {
  margin-left: auto; flex: none;
  font-size: 15px; line-height: 1; letter-spacing: 1px;
  color: var(--ink-3); padding: 2px 6px; border-radius: 2px;
  opacity: 0; transition: opacity var(--t-hover) var(--ease), color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.design-card:hover .dc-more { opacity: 1; }
.dc-more:hover { color: var(--ink); background: var(--hover-bg); }
.dc-sub { padding: 0 6px; font-size: 12px; color: var(--ink-3); letter-spacing: .03em; }
.dc-assoc { padding: 3px 6px 6px; font-size: 11.5px; color: var(--ink-3); opacity: .82; }
.design-card .view-cue { position: absolute; top: 22px; right: 20px; opacity: 0; transform: translateX(-4px); }
.design-card:hover .view-cue { opacity: 1; transform: none; }

/* drag sort */
.design-card.is-draggable { cursor: grab; }
.design-card.is-draggable:active { cursor: grabbing; }
.design-card.is-dragging { opacity: .38; transform: scale(.985); }
.design-card.drag-over { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* list view */
.design-rows { border-top: 1px solid var(--line); }
.design-row {
  display: grid;
  grid-template-columns: 64px 1fr 150px 150px 130px 28px;
  gap: 20px;
  align-items: center;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  transition: background 200ms var(--ease), transform 280ms var(--ease);
}
.design-row:hover { background: var(--hover-bg); transform: translateX(3px); }
.dr-thumb { width: 64px; height: 64px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.dr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dr-name { font-family: var(--font-serif); font-weight: 500; font-size: 19px; line-height: 1.2; }
.dr-name a { color: inherit; }
.dr-col { font-size: 12.5px; color: var(--ink-3); }
.dr-head { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
button.dr-more { color: var(--ink-3); font-size: 15px; opacity: .6; transition: opacity var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
.design-row:hover button.dr-more { opacity: 1; color: var(--ink); }

/* ---------- collections grid ---------- */
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px 26px; }
.coll-card { display: block; border: 1px solid var(--line); background: var(--surface); padding: 10px;
  transition: border-color 280ms var(--ease), transform 280ms var(--ease); }
.coll-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.cc-fig { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.cc-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-img) var(--ease); }
.coll-card:hover .cc-fig img { transform: scale(1.04); }
.cc-body { padding: 16px 8px 8px; }
.cc-top { display: flex; align-items: baseline; gap: 12px; }
.cc-name { font-family: var(--font-serif); font-weight: 500; font-size: 22px; line-height: 1.15; transition: transform 260ms var(--ease); }
.coll-card:hover .cc-name { transform: translateX(3px); }
.cc-cue { margin-left: auto; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  opacity: 0; transform: translateX(-4px); transition: opacity 260ms var(--ease), transform 260ms var(--ease); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.coll-card:hover .cc-cue { opacity: 1; transform: none; }
.cc-sub { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 10px; }
.cc-desc { margin-top: 10px; font-size: 13px; color: var(--ink-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- projects list ---------- */
.proj-list { border-top: 1px solid var(--line); }
.proj-row {
  display: grid;
  grid-template-columns: 76px 1fr 132px 120px 150px 28px;
  gap: 22px;
  align-items: center;
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
  transition: background 200ms var(--ease), transform 280ms var(--ease);
  cursor: pointer;
}
.proj-row:hover { background: var(--hover-bg); transform: translateX(3px); }
.pr-thumb { width: 76px; height: 76px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-name { font-family: var(--font-serif); font-weight: 500; font-size: 21px; line-height: 1.2; }
.pr-desc { margin-top: 5px; font-size: 12.5px; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pr-col { font-size: 12.5px; color: var(--ink-3); }
.proj-row .arr { color: var(--ink-3); transition: transform 260ms var(--ease), color 260ms var(--ease); opacity: .5; }
.proj-row:hover .arr { transform: translateX(5px); color: var(--ink); opacity: 1; }

/* ---------- status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 20px;
  border: 1px solid var(--line-2); color: var(--ink-2); background: transparent;
  white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .55; }
.pill--active { border-color: var(--ink); color: var(--ink); }
.pill--active::before { opacity: 1; }
.pill--planning { border-style: solid; border-color: var(--line-2); color: var(--ink-3); }
.pill--planning::before { opacity: .35; }
.pill--done { border-color: var(--line); color: var(--ink-2); }
.pill--done::before { background: var(--ink); opacity: .5; }
.pill--archived { border-style: dashed; border-color: var(--line-2); color: var(--ink-3); }
.pill--archived::before { display: none; }
.pill--public { border-color: var(--line-2); color: var(--ink-2); }
.pill--draft { border-style: dashed; border-color: var(--line-2); color: var(--ink-3); }
.pill--sm { font-size: 10px; padding: 4px 9px; }

/* ---------- detail: shared header ---------- */
.detail-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-3); margin-bottom: 24px;
  transition: color var(--t-hover) var(--ease);
}
.detail-back:hover { color: var(--ink); }
.detail-back .arr { transform: rotate(180deg); }
.detail-back:hover .arr { transform: rotate(180deg) translateX(3px); }

.detail-hero { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.detail-cover { aspect-ratio: 16 / 7; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-family: var(--font-serif); font-weight: 300; font-size: clamp(38px, 3.4vw, 52px); line-height: 1.03; letter-spacing: -.012em; margin-top: 26px; }
.detail-desc { margin-top: 14px; font-size: 14.5px; color: var(--ink-2); max-width: 640px; line-height: 1.7; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.meta-block { border: 1px solid var(--line); background: var(--surface); padding: 22px 24px; }
.meta-block + .meta-block { margin-top: 16px; }
.meta-rows { margin-top: 14px; }
.meta-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.meta-row:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-row dt { font-size: 12px; color: var(--ink-3); letter-spacing: .03em; }
.meta-row dd { font-size: 13.5px; color: var(--ink); text-align: right; }
.meta-row dd a { color: var(--ink); border-bottom: 1px solid var(--line-2); transition: border-color var(--t-hover) var(--ease); }
.meta-row dd a:hover { border-color: var(--ink); }

/* ---------- collection detail: designs section ---------- */
.detail-section { margin-top: 64px; }
.ds-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ds-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 30px); }
.ds-count { font-size: 12.5px; color: var(--ink-3); margin-left: 12px; }
.ds-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.sort-tabs { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 3px; background: var(--surface); }
.sort-tabs button { font-size: 12px; color: var(--ink-3); padding: 6px 13px; border-radius: 2px; transition: color var(--t-hover) var(--ease), background var(--t-hover) var(--ease); }
.sort-tabs button:hover { color: var(--ink); }
.sort-tabs button.is-on { color: var(--paper); background: var(--ink); }
.sort-hint { margin-top: 16px; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }

/* ---------- project files ---------- */
.file-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 26px; }
.file-tile {
  border: 1px dashed var(--line-2); background: transparent; min-height: 168px;
  padding: 20px; display: flex; flex-direction: column;
}
.ft-label { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.ft-count { margin-top: 6px; font-family: var(--font-serif); font-size: 26px; color: var(--ink-2); }
.ft-slots { margin-top: auto; display: flex; gap: 8px; }
.ft-slot { width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface); }
.ft-note { margin-top: 14px; font-size: 11.5px; color: var(--ink-3); }

/* ---------- empty states ---------- */
.empty-state {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 78px 40px;
  text-align: center;
  margin-top: 8px;
}
.es-mark { width: 34px; height: 34px; border: 1px solid var(--line-2); margin: 0 auto 22px; position: relative; }
.es-mark::after { content: ""; position: absolute; inset: 9px; background: var(--line-2); }
.es-title { font-family: var(--font-serif); font-weight: 400; font-size: 27px; }
.es-hint { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.es-btn { margin-top: 26px; display: inline-flex; }

/* ---------- design detail ---------- */
.dd-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 56px; align-items: start; }
.dd-fig { border: 1px solid var(--line); background: var(--surface); padding: 14px; }
.dd-fig img { width: 100%; display: block; }
.dd-side .detail-title { margin-top: 0; font-size: clamp(32px, 3vw, 44px); }
.dd-type { margin-top: 12px; font-size: 13px; color: var(--ink-3); letter-spacing: .04em; }
.info-block { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 30px; }
.info-label { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.chipset { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 20px; padding: 7px 14px;
  background: var(--surface);
  transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease), transform var(--t-hover) var(--ease);
}
.chip-link:hover { border-color: var(--ink-2); color: var(--ink); transform: translateY(-1px); }
.chip-link .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
.text-muted-note { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 14px; padding: 14px 16px;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color var(--t-hover) var(--ease);
}
.link-row:hover { border-color: var(--line-2); }
.link-row .lr-name { font-family: var(--font-serif); font-size: 19px; }
.link-row .lr-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.link-row .arr { color: var(--ink-3); }
.link-row:hover .arr { transform: translateX(4px); color: var(--ink); }

/* ---------- modal ---------- */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(29, 27, 24, .26);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms var(--ease-soft); z-index: 90;
}
.modal-scrim.is-in { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; inset: 0; z-index: 95;
  display: flex; align-items: center; justify-content: center;
  padding: 40px; pointer-events: none;
}
.modal[hidden] { display: none; }
.modal-panel {
  pointer-events: auto;
  width: 560px; max-width: 100%; max-height: calc(100vh - 80px);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r-l);
  box-shadow: 0 40px 90px -50px rgba(29, 27, 24, .38);
  display: flex; flex-direction: column;
  opacity: 0; transform: scale(.985) translateY(6px);
  transition: opacity 220ms var(--ease-soft), transform 260ms var(--ease);
  overflow: hidden;
}
.modal.is-in .modal-panel { opacity: 1; transform: none; }
.modal-panel.is-sm { width: 460px; }
.modal-panel.is-lg { width: 880px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.modal-title { font-family: var(--font-serif); font-weight: 400; font-size: 23px; }
.modal-x {
  width: 26px; height: 26px; position: relative; border-radius: 50%;
  transition: background var(--t-hover) var(--ease);
}
.modal-x::before, .modal-x::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1.4px; background: var(--ink-2); }
.modal-x::before { transform: rotate(45deg); }
.modal-x::after { transform: rotate(-45deg); }
.modal-x:hover { background: var(--hover-bg); }
.modal-body { padding: 24px 26px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 18px 26px; border-top: 1px solid var(--line); background: var(--surface); }
.modal-foot .btn { padding: 11px 20px; }
.btn.is-danger { border-color: var(--line-2); background: transparent; color: var(--danger); }
.btn.is-danger:hover { background: var(--danger); border-color: var(--danger); color: var(--paper); }
.confirm-hint { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.m-hint { margin-top: 16px; font-size: 11.5px; color: var(--ink-3); }

.field + .field { margin-top: 20px; }
.field-label { display: block; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 9px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-opt { position: relative; }
.radio-opt input { position: absolute; opacity: 0; pointer-events: none; }
.radio-opt span {
  display: inline-block; font-size: 12.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 20px; padding: 8px 15px;
  background: var(--surface); cursor: pointer;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.radio-opt span:hover { color: var(--ink); }
.radio-opt input:checked + span { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.cover-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cover-opt { position: relative; cursor: pointer; }
.cover-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cover-opt .co-fig { display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); transition: border-color var(--t-hover) var(--ease); }
.cover-opt .co-fig img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity var(--t-hover) var(--ease); }
.cover-opt:hover .co-fig img { opacity: 1; }
.cover-opt input:checked + .co-fig { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.cover-opt input:checked + .co-fig img { opacity: 1; }

/* ---------- pickers ---------- */
.pick-search { margin-bottom: 16px; }
.pick-list { border-top: 1px solid var(--line); max-height: 320px; overflow-y: auto; }
.pick-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 6px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background var(--t-hover) var(--ease);
}
.pick-row:hover { background: var(--hover-bg); }
.pick-row.is-done { opacity: .5; cursor: default; }
.pick-row input { accent-color: #191817; width: 15px; height: 15px; flex: none; }
.pick-thumb { width: 44px; height: 44px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); flex: none; }
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-name { font-family: var(--font-serif); font-size: 18px; line-height: 1.2; }
.pick-sub { font-size: 11.5px; color: var(--ink-3); }
.pick-empty { padding: 26px 4px; font-size: 13px; color: var(--ink-3); }
.pick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; max-height: 460px; overflow-y: auto; padding-top: 4px; }
.pick-cell { cursor: pointer; position: relative; }
.pick-cell input { position: absolute; top: 8px; left: 8px; width: 15px; height: 15px; accent-color: #191817; z-index: 2; opacity: 0; }
.pick-cell .pick-fig { display: block; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); transition: border-color var(--t-hover) var(--ease); }
.pick-cell .pick-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-img) var(--ease); }
.pick-cell:hover .pick-fig img { transform: scale(1.03); }
.pick-cell input:checked ~ .pick-fig { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pick-cell input:checked ~ .pick-fig::after {
  content: "✓"; position: absolute; top: 6px; left: 6px; z-index: 3;
  width: 20px; height: 20px; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-size: 11px; border-radius: 50%;
}
.pick-cell .pick-fig { position: relative; }
.pick-cell .pick-name { display: block; margin-top: 9px; font-family: var(--font-serif); font-size: 15.5px; line-height: 1.2; }
.pick-cell .pick-sub { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-3); }

/* ---------- pop menu ---------- */
.pop-menu {
  position: fixed; z-index: 120; min-width: 190px;
  background: var(--paper); border: 1px solid var(--line-2);
  border-radius: var(--r-m);
  box-shadow: 0 26px 60px -34px rgba(29, 27, 24, .34);
  padding: 6px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 180ms var(--ease-soft), transform 180ms var(--ease);
}
.pop-menu.is-in { opacity: 1; transform: none; }
.pop-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; text-align: left;
  font-size: 13px; color: var(--ink-2);
  padding: 9px 12px; border-radius: 2px;
  transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.pop-item:hover { background: var(--hover-bg); color: var(--ink); }
.pop-item.is-danger { color: var(--danger); }
.pop-item.is-danger:hover { background: #F2E9E4; }
.pop-tick { font-size: 11px; color: var(--ink); }
.pop-div { height: 1px; background: var(--line); margin: 5px 8px; }

/* ---------- toast ---------- */
.toast-wrap {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 140; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: var(--paper);
  font-size: 12.5px; letter-spacing: .02em;
  padding: 11px 20px; border-radius: 2px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 240ms var(--ease-soft), transform 240ms var(--ease);
}
.toast.is-in { opacity: 1; transform: none; }

/* ---------- dashboard: recent blocks ---------- */
.rows-project .coll-row { grid-template-columns: 62px 1fr auto auto 20px; }
.rows-project .coll-row .pill { margin-top: 2px; }

@media (max-width: 1500px) {
  .file-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1320px) {
  .detail-hero { grid-template-columns: 1fr; gap: 32px; }
  .dd-layout { grid-template-columns: 1fr; gap: 36px; }
  .pick-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- project detail: work-oriented header (no hero cover) ---------- */
.pj-head {
  display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: start;
  border-top: 1px solid var(--line); padding-top: 36px;
}
.pj-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.pj-strip .pj-cell { display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.pj-strip .pj-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-img) var(--ease); }
.pj-strip .pj-cell:hover img { transform: scale(1.04); }
.pj-strip .pj-empty { display: grid; place-items: center; aspect-ratio: 1 / 1; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 11px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.pj-label { margin-bottom: 14px; }
@media (max-width: 1320px) {
  .pj-head { grid-template-columns: 1fr; gap: 32px; }
}

/* ==========================================================================
   PHASE 3 — BRAND IDENTITY
   Brand board · identity editing · logo · colour · type · visual language · assets
   PC desktop only (1440 / 1600 / 1920). Same design language as phases 1–2.
   ========================================================================== */

/* ---------- brand module frame: left brand nav / right content ---------- */
.brand-layout {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.brand-nav {
  position: sticky;
  top: 96px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.brand-nav button {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-3);
  padding: 9px 0 9px 15px;
  border-left: 1px solid transparent;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.brand-nav button:hover { color: var(--ink); }
.brand-nav button.is-on { color: var(--ink); border-left-color: var(--ink); }
.brand-nav .bn-sep { height: 1px; background: var(--line); margin: 12px 0 10px; }

/* section head inside the module */
.brand-sec-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.brand-sec-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 30px); }
.brand-sec-head p { margin-top: 9px; font-size: 13.5px; color: var(--ink-3); max-width: 560px; }
.brand-sec-head .bsh-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- brand board (identity preview) ---------- */
.brand-board {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 46px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 52px;
  align-items: start;
}
.bb-logo { margin-bottom: 30px; min-height: 54px; display: flex; align-items: center; }
.bb-logo img { max-height: 62px; max-width: 240px; object-fit: contain; }
.bb-logo .bb-mark {
  width: 40px; height: 40px; border: 1.5px solid var(--ink); position: relative;
}
.bb-logo .bb-mark::after { content: ""; position: absolute; inset: 9px; background: var(--ink); }
.bb-name {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(34px, 3.2vw, 48px);
  line-height: 1.05;
  letter-spacing: -.012em;
}
.bb-en { margin-top: 10px; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.bb-tagline { margin-top: 22px; font-family: var(--font-serif); font-style: italic; font-size: 21px; color: var(--ink-2); }
.bb-desc { margin-top: 16px; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); max-width: 560px; }
.bb-meta { margin-top: 22px; display: flex; gap: 26px; flex-wrap: wrap; }
.bb-meta div { font-size: 11.5px; color: var(--ink-3); }
.bb-meta dt { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); opacity: .8; }
.bb-meta dd { margin-top: 3px; font-size: 13px; color: var(--ink); }
.bb-kw { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

.bb-side { border-left: 1px solid var(--line); padding-left: 40px; }
.bb-visual {
  aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2);
  display: grid; place-items: center;
}
.bb-visual img { width: 100%; height: 100%; object-fit: cover; }
.bb-visual .bb-visual-empty { font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 0 24px; line-height: 1.7; }
.bb-block { margin-top: 28px; }
.bb-block-label { font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.bb-swatches { display: flex; margin-top: 12px; border: 1px solid var(--line); }
.bb-swatch { flex: 1; height: 42px; }
.bb-swatch-names { display: flex; margin-top: 8px; }
.bb-swatch-names span { flex: 1; font-size: 10px; color: var(--ink-3); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-type { margin-top: 12px; }
.bb-type li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bb-type li:last-child { border-bottom: 0; }
.bb-type .t-role { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.bb-type .t-name { font-size: 14px; color: var(--ink); }

/* ---------- overview: set-up status ---------- */
.bp-bar {
  border: 1px solid var(--line); background: var(--surface);
  padding: 22px 26px; margin-top: 26px;
  display: flex; align-items: center; gap: 36px; flex-wrap: wrap;
}
.bp-left { flex: none; min-width: 210px; }
.bp-pct { font-family: var(--font-serif); font-size: 26px; line-height: 1; }
.bp-count { margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.bp-meter { flex: 1; min-width: 160px; height: 2px; background: var(--line); position: relative; }
.bp-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transition: width 420ms var(--ease); }
.bp-missing { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.bp-chip {
  font-size: 11.5px; color: var(--ink-3);
  border: 1px dashed var(--line-2); border-radius: 20px; padding: 6px 13px;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
button.bp-chip:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---------- info: left edit / right live preview ---------- */
.bf-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .74fr); gap: 52px; align-items: start; }
.bf-form { border-top: 1px solid var(--line); padding-top: 26px; }
.bf-note { margin-top: 22px; font-size: 11.5px; color: var(--ink-3); }
.bf-preview { position: sticky; top: 96px; }
.bf-preview-card { border: 1px solid var(--line); background: var(--surface); padding: 34px 32px; }
.bfp-label { font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.bfp-logo { margin: 22px 0 24px; min-height: 44px; display: flex; align-items: center; }
.bfp-logo img { max-height: 52px; max-width: 220px; object-fit: contain; }
.bfp-logo .bb-mark { width: 34px; height: 34px; border: 1.4px solid var(--ink); position: relative; }
.bfp-logo .bb-mark::after { content: ""; position: absolute; inset: 8px; background: var(--ink); }
.bfp-name { font-family: var(--font-serif); font-weight: 300; font-size: 33px; line-height: 1.06; letter-spacing: -.01em; }
.bfp-name.is-empty { color: var(--line-2); }
.bfp-en { margin-top: 8px; font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.bfp-tagline { margin-top: 18px; font-family: var(--font-serif); font-style: italic; font-size: 18px; color: var(--ink-2); }
.bfp-desc { margin-top: 14px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.bfp-kw { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.bfp-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); }

/* ---------- logo slots ---------- */
.logo-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.logo-slot { border: 1px solid var(--line); background: var(--surface); padding: 12px; display: flex; flex-direction: column; }
.ls-fig {
  position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--line); background: var(--paper-2);
  display: grid; place-items: center; overflow: hidden;
}
.ls-fig.is-reverse { background: var(--ink); }
.ls-fig img { max-width: 72%; max-height: 72%; object-fit: contain; }
.ls-fig.is-drop { border-color: var(--ink); background: var(--hover-bg); }
.ls-empty { text-align: center; padding: 0 18px; }
.ls-empty .ls-empty-mark { width: 30px; height: 30px; border: 1px solid var(--line-2); margin: 0 auto 12px; position: relative; }
.ls-empty .ls-empty-mark::after { content: ""; position: absolute; inset: 8px; background: var(--line-2); }
.ls-empty p { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.ls-body { padding: 14px 4px 4px; display: flex; flex-direction: column; flex: 1; }
.ls-title { font-family: var(--font-serif); font-size: 18px; line-height: 1.2; }
.ls-hint { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.ls-actions { margin-top: auto; padding-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.link-btn {
  font-size: 11.5px; color: var(--ink-3); padding: 6px 10px; border: 1px solid var(--line);
  border-radius: var(--r-s); background: var(--paper);
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.link-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.link-btn.is-danger:hover { color: var(--danger); border-color: var(--danger); }
.ls-formats { margin-top: 12px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- colour palette ---------- */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 20px; }
.swatch {
  border: 1px solid var(--line); background: var(--surface); padding: 10px; position: relative;
  transition: border-color var(--t-card) var(--ease), transform var(--t-card) var(--ease);
}
.swatch:hover { border-color: var(--line-2); transform: translateY(-2px); }
.sw-chip { height: 108px; border: 1px solid var(--line); transition: filter var(--t-hover) var(--ease); }
.swatch:hover .sw-chip { filter: brightness(1.02); }
.sw-body { padding: 13px 6px 5px; }
.sw-top { display: flex; align-items: baseline; gap: 10px; }
.sw-name { font-family: var(--font-serif); font-size: 18px; line-height: 1.2; }
.sw-role { margin-left: auto; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.sw-vals { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--ink-3); }
.sw-hex { letter-spacing: .06em; color: var(--ink-2); border-bottom: 1px solid transparent; transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
button.sw-hex:hover { color: var(--ink); border-bottom-color: var(--line-2); }
.sw-actions { position: absolute; top: 20px; right: 20px; z-index: 3; display: flex; gap: 6px; opacity: 0; transition: opacity var(--t-hover) var(--ease); }
.swatch:hover .sw-actions { opacity: 1; }
.sw-btn {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: rgba(252, 251, 248, .92); border: 1px solid var(--line-2); border-radius: 50%;
  color: var(--ink-2); font-size: 12px; line-height: 1;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.sw-btn:hover { color: var(--ink); border-color: var(--ink); }
.sw-btn.is-danger:hover { color: var(--danger); border-color: var(--danger); }
.sw-add {
  border: 1px dashed var(--line-2); background: transparent; min-height: 176px;
  display: grid; place-items: center; color: var(--ink-3); font-size: 12.5px;
  transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.sw-add:hover { border-color: var(--ink-3); color: var(--ink); background: var(--surface); }
.sw-add span { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sw-add .plus { font-family: var(--font-serif); font-size: 24px; line-height: 1; }

/* colour editor */
.color-preview-row { display: flex; align-items: center; gap: 16px; }
.color-preview { width: 84px; height: 84px; border: 1px solid var(--line-2); flex: none; }
.color-native { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-2); background: var(--paper); cursor: pointer; }

/* ---------- typography specimens ---------- */
.font-item { border-top: 1px solid var(--line); padding: 30px 0; }
.font-item:last-child { border-bottom: 1px solid var(--line); }
.fi-head { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.fi-role { font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.fi-name { margin-top: 8px; font-family: var(--font-serif); font-size: 20px; }
.fi-sample { margin-top: 18px; line-height: 1.4; color: var(--ink); transition: font-family var(--t-card) var(--ease); }
.fi-sample.is-heading { font-size: 34px; }
.fi-sample.is-body { font-size: 16.5px; line-height: 1.75; color: var(--ink-2); max-width: 700px; }
.fi-sample.is-accent { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.fi-meta { margin-top: 16px; font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 16px; }

/* ---------- visual language ---------- */
.kw-input-row { display: flex; gap: 12px; align-items: center; max-width: 560px; }
.kw-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.kw-chip {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 20px; padding: 9px 12px 9px 16px;
  background: var(--surface);
  transition: border-color var(--t-hover) var(--ease), transform var(--t-hover) var(--ease);
}
.kw-chip:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.kw-x {
  width: 16px; height: 16px; position: relative; border-radius: 50%; opacity: .5;
  transition: opacity var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.kw-x::before, .kw-x::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 1.2px; background: currentColor; }
.kw-x::before { transform: rotate(45deg); }
.kw-x::after { transform: rotate(-45deg); }
.kw-x:hover { opacity: 1; background: var(--hover-bg); }
.kw-suggest { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.kw-suggest-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kw-suggest-chip {
  font-size: 12.5px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 20px;
  padding: 7px 15px; transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.kw-suggest-chip:hover { color: var(--ink); border-color: var(--ink-3); }
.kw-suggest-chip.is-on { color: var(--line-2); border-style: solid; cursor: default; }

/* ---------- brand assets ---------- */
.upload-zone {
  border: 1px dashed var(--line-2); background: transparent;
  padding: 34px 28px; text-align: center; cursor: pointer;
  transition: border-color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.upload-zone:hover, .upload-zone.is-drop { border-color: var(--ink-2); background: var(--surface); }
.uz-title { font-size: 13.5px; color: var(--ink); }
.uz-note { margin-top: 7px; font-size: 11.5px; color: var(--ink-3); }
.uz-icon { width: 30px; height: 30px; border: 1px solid var(--line-2); margin: 0 auto 14px; position: relative; }
.uz-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.4px; background: var(--ink-3); transform: translate(-50%, -50%); }
.uz-icon::before { content: ""; position: absolute; left: 50%; top: 50%; width: 1.4px; height: 12px; background: var(--ink-3); transform: translate(-50%, -50%); }
.asset-rows { margin-top: 28px; border-top: 1px solid var(--line); }
.asset-row {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) 120px 110px 28px;
  gap: 18px; align-items: center; padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  transition: background 200ms var(--ease), transform 280ms var(--ease);
}
.asset-row:hover { background: var(--hover-bg); transform: translateX(3px); }
.ar-thumb {
  width: 54px; height: 54px; border: 1px solid var(--line); background: var(--surface);
  overflow: hidden; display: grid; place-items: center;
}
.ar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ar-thumb .ar-ext { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ar-name { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-sub { margin-top: 3px; font-size: 11px; color: var(--ink-3); }
.ar-kind { font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.ar-del { color: var(--ink-3); font-size: 15px; line-height: 1; opacity: .55; transition: opacity var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
.asset-row:hover .ar-del { opacity: 1; }
.ar-del:hover { color: var(--danger); }

/* ---------- brand content blocks (overview) ---------- */
.brand-block { margin-top: 66px; }
.brand-block-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.brand-block-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(22px, 2vw, 27px); }
.brand-block-head p { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.bb-ref-note { margin-top: 20px; font-size: 11.5px; color: var(--ink-3); }
.feat-grid { margin-top: 28px; }
.feat-empty, .feat-empty-series {
  border: 1px solid var(--line); background: var(--surface);
  padding: 52px 32px; text-align: center;
}
.feat-empty .fe-title { font-family: var(--font-serif); font-size: 23px; }
.feat-empty .fe-hint { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }
.feat-empty .fe-btn { margin-top: 24px; display: inline-flex; }
.cc-wrap { position: relative; }
.cc-remove {
  position: absolute; top: 20px; right: 20px; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(252, 251, 248, .94); border: 1px solid var(--line-2); color: var(--ink-2);
  display: grid; place-items: center; font-size: 13px; line-height: 1;
  opacity: 0; transition: opacity var(--t-hover) var(--ease), color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.cc-wrap:hover .cc-remove { opacity: 1; }
.cc-remove:hover { color: var(--danger); border-color: var(--danger); }
.design-card .dc-remove {
  position: absolute; top: 20px; right: 20px; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(252, 251, 248, .94); border: 1px solid var(--line-2); color: var(--ink-2);
  display: grid; place-items: center; font-size: 13px; line-height: 1;
  opacity: 0; transition: opacity var(--t-hover) var(--ease), color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.design-card:hover .dc-remove { opacity: 1; }
.design-card .dc-remove:hover { color: var(--danger); border-color: var(--danger); }

/* danger zone */
.brand-danger {
  margin-top: 66px; border: 1px solid var(--line); background: var(--surface);
  padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand-danger .bd-note { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; max-width: 560px; line-height: 1.65; }
.brand-danger h3 { font-family: var(--font-serif); font-weight: 400; font-size: 20px; }

@media (max-width: 1320px) {
  .brand-layout { grid-template-columns: 1fr; gap: 28px; }
  .brand-nav { position: static; }
  .bf-layout { grid-template-columns: 1fr; gap: 34px; }
  .bf-preview { position: static; }
  .brand-board { grid-template-columns: 1fr; gap: 36px; }
  .bb-side { border-left: 0; padding-left: 0; }
  .logo-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* live-preview micro-transition: text settles in as it is typed */
.bfp-name, .bfp-en, .bfp-tagline, .bfp-desc { transition: opacity 200ms var(--ease); }
.bfp-name.is-fresh, .bfp-en.is-fresh, .bfp-tagline.is-fresh, .bfp-desc.is-fresh { opacity: .42; }

/* ---------- brand module: make the content frame fill its column ----------
   .page is a flex child carrying margin:0 auto, so without an explicit width
   it sizes to its content: colour/type/asset views would collapse to a narrow
   strip. Scoped to the brand page so phases 1–2 keep their exact geometry. */
body[data-page="brand"] .page { width: 100%; }

/* ==========================================================================
   PHASE 4 — WEBSITE (platform side)
   Overview + home page editor. The *published site* has its own stylesheet
   (assets/css/site.css) so a workspace's brand system never leaks into the
   platform's design system, or vice versa.
   ========================================================================== */
body[data-page="website"] .page,
body[data-page="website-edit"] .page { width: 100%; }

/* ---------- overview ---------- */
.wh-grid { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 32px; align-items: start; }
.wh-preview { border: 1px solid var(--line); background: var(--surface); padding: 12px; }
.wh-preview-chrome { display: flex; align-items: center; gap: 6px; padding: 2px 4px 12px; }
.wpc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.wpc-url {
  margin-left: 12px; font-size: 11.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 20px; padding: 4px 14px;
}
.wh-frame-wrap {
  position: relative; overflow: hidden; background: var(--paper-2);
  border: 1px solid var(--line); height: 620px;
}
.wh-scaler { width: 1440px; height: 900px; transform-origin: top left; }
.wh-scaler iframe { width: 1440px; height: 100%; border: 0; display: block; pointer-events: none; }
.wh-preview-note { margin-top: 12px; font-size: 11.5px; color: var(--ink-3); text-align: center; }
.wh-side { display: flex; flex-direction: column; gap: 16px; }
.wh-url { margin-top: 12px; font-size: 13px; color: var(--ink); word-break: break-all; }
.wh-url-note { margin: 8px 0 14px; font-size: 11.5px; color: var(--ink-3); line-height: 1.65; }
.wh-order { margin-top: 12px; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
.wh-actions { display: flex; gap: 10px; }
.meta-row dd .pill { vertical-align: middle; }

/* ---------- editor frame ---------- */
.wpe-page { max-width: none; padding: 24px 30px 40px; }

.wpe-top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.wpe-top-l { justify-self: start; }
.wpe-top-l .detail-back { margin-bottom: 0; }
.wpe-top-c { justify-self: center; display: flex; align-items: center; gap: 14px; }
.wpe-top-r { justify-self: end; display: flex; align-items: center; gap: 10px; }
.wpe-name {
  width: 300px; text-align: center;
  font-family: var(--font-serif); font-size: 23px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid transparent;
  padding: 4px 6px;
  transition: border-color var(--t-hover) var(--ease);
}
.wpe-name:hover { border-bottom-color: var(--line-2); }
.wpe-name:focus { outline: none; border-bottom-color: var(--ink); }
.wpe-save { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.wpe-cols {
  display: grid;
  grid-template-columns: 234px minmax(0, 1fr) 330px;
  gap: 22px; align-items: start;
}

/* structure column */
.wpe-struct { border: 1px solid var(--line); background: var(--surface); padding: 18px 12px; }
.wpe-struct-head { padding: 0 8px 13px; border-bottom: 1px solid var(--line); }
.wpe-struct-home { margin-top: 9px; font-family: var(--font-serif); font-size: 19px; }
.wpe-struct-list { padding-top: 10px; }
.wpe-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  padding: 11px 10px; border: 1px solid transparent; border-radius: var(--r-s);
  transition: background var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.wpe-item:hover { background: var(--hover-bg); }
.wpe-item.is-on { background: var(--paper); border-color: var(--line-2); }
.wpe-item.is-dragging { opacity: .38; }
.wpe-item.drag-over { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.wpe-grip {
  flex: none; width: 11px; height: 15px; margin-top: 3px; opacity: .4;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' fill='%23fff'><circle cx='3' cy='3' r='1.4'/><circle cx='9' cy='3' r='1.4'/><circle cx='3' cy='8' r='1.4'/><circle cx='9' cy='8' r='1.4'/><circle cx='3' cy='13' r='1.4'/><circle cx='9' cy='13' r='1.4'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' fill='%23fff'><circle cx='3' cy='3' r='1.4'/><circle cx='9' cy='3' r='1.4'/><circle cx='3' cy='8' r='1.4'/><circle cx='9' cy='8' r='1.4'/><circle cx='3' cy='13' r='1.4'/><circle cx='9' cy='13' r='1.4'/></svg>") center / contain no-repeat;
}
.wpe-item-text { min-width: 0; }
.wpe-item-name { display: block; font-size: 13.5px; color: var(--ink); }
.wpe-item-sub {
  display: block; margin-top: 3px; font-size: 11px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 158px;
}
.wpe-drag-hint { margin: 13px 8px 0; font-size: 11px; color: var(--ink-3); line-height: 1.6; }

/* stage column */
.wpe-stage {
  border: 1px solid var(--line); background: var(--paper-2); padding: 20px;
  overflow-y: auto; overflow-x: hidden;
  max-height: calc(100vh - 232px);
}
.wpe-frame-wrap {
  position: relative; overflow: hidden; margin: 0 auto; background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 26px 60px -50px rgba(29, 27, 24, .45);
}
.wpe-scaler { width: 1440px; height: 900px; transform-origin: top left; }
.wpe-scaler iframe { width: 1440px; height: 100%; border: 0; display: block; }

/* settings column */
.wpe-settings { border: 1px solid var(--line); background: var(--surface); padding: 20px 18px; }
.wpe-set-head-main { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.wpe-set-head-main h2 { font-family: var(--font-serif); font-weight: 400; font-size: 21px; }
.wpe-set-body { padding-top: 18px; }
.wpe-set-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wpe-set-count { font-size: 12px; color: var(--ink-3); }
.wpe-empty { font-size: 12.5px; color: var(--ink-3); padding: 14px 0; }
.wpe-note { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

.wpe-work-list { border-top: 1px solid var(--line); }
.wpe-work {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) 18px; gap: 10px; align-items: center;
  padding: 9px 4px; border-bottom: 1px solid var(--line);
  transition: background 180ms var(--ease);
}
.wpe-work[draggable="true"] { cursor: grab; }
.wpe-work:hover { background: var(--hover-bg); }
.wpe-work.is-dragging { opacity: .38; }
.wpe-work.drag-over { box-shadow: inset 0 2px 0 var(--ink); }
.wpe-work-fig { width: 42px; height: 42px; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.wpe-work-fig img { width: 100%; height: 100%; object-fit: cover; }
.wpe-work-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpe-work-x { font-size: 14px; line-height: 1; color: var(--ink-3); opacity: .55;
  transition: opacity var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
.wpe-work:hover .wpe-work-x { opacity: 1; }
.wpe-work-x:hover { color: var(--danger); }

.wpe-visual {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); background: var(--paper); padding: 8px;
}
.wpe-visual-fig { width: 58px; height: 58px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.wpe-visual-fig img { width: 100%; height: 100%; object-fit: cover; }
.wpe-visual-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpe-visual-empty { font-size: 11.5px; color: var(--ink-3); padding: 9px 4px; line-height: 1.6; }
.wpe-visual-acts { display: flex; gap: 8px; margin-top: 10px; }

@media (max-width: 1500px) {
  .wpe-cols { grid-template-columns: 214px minmax(0, 1fr) 306px; gap: 18px; }
}
@media (max-width: 1320px) {
  .wh-grid { grid-template-columns: 1fr; }
  .wpe-cols { grid-template-columns: 1fr; }
  .wpe-stage { max-height: 620px; }
}

/* ==========================================================================
   PHASE 5 — CLOUD SPACE (files & folders)
   Grid / list browsing, upload queue, file detail, recycle bin.
   Same language as phases 1–4: warm paper, hairlines, generous space.
   ========================================================================== */
body[data-page="files"] .page { width: 100%; }

/* ---------- view switch ---------- */
.cl-nav { display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.cl-nav-btn {
  font-size: 13.5px; color: var(--ink-3); padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.cl-nav-btn:hover { color: var(--ink); }
.cl-nav-btn.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.cl-nav-n {
  margin-left: 7px; font-size: 10.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 20px; padding: 1px 7px;
}

/* ---------- storage capability note (honest, always visible) ---------- */
.cl-limit {
  margin-top: 24px; border: 1px solid var(--line); background: var(--surface);
  padding: 18px 22px;
}
.cl-limit-title {
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.cl-limit-body { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); line-height: 1.75; max-width: 900px; }

/* ---------- stats ---------- */
.cl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.cl-stat { border: 1px solid var(--line); background: var(--surface); padding: 20px 22px; }
.cl-stat-n { font-family: var(--font-serif); font-size: 34px; line-height: 1; color: var(--ink); }
.cl-stat-l { margin-top: 10px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.cl-stat-note { margin-top: 8px; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.cl-stat.is-wide { grid-column: span 1; }

/* ---------- blocks ---------- */
.cl-block { margin-top: 42px; }
.cl-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cl-block-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(20px, 1.8vw, 25px); }
.cl-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; }
.cl-mini-empty { margin-top: 18px; font-size: 13px; color: var(--ink-3); }

.cl-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.cl-thumb { text-align: left; display: block; }
.cl-thumb-fig {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line);
  background: var(--paper-2); display: grid; place-items: center;
}
.cl-thumb-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-img) var(--ease); }
.cl-thumb:hover .cl-thumb-fig img { transform: scale(1.035); }
.cl-thumb-name { display: block; margin-top: 10px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-thumb-sub { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-3); }

.cl-types { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.cl-type {
  border: 1px solid var(--line); background: var(--surface); padding: 14px 24px; text-align: left;
  transition: border-color var(--t-hover) var(--ease);
}
.cl-type:hover { border-color: var(--line-2); }
.cl-type-n { display: block; font-family: var(--font-serif); font-size: 24px; line-height: 1; }
.cl-type-l { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- folders ---------- */
.cl-folder-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.cl-folder {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); padding: 16px 22px; min-width: 190px;
  transition: border-color var(--t-hover) var(--ease), transform var(--t-hover) var(--ease);
}
.cl-folder:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cl-folder-name { font-family: var(--font-serif); font-size: 17px; line-height: 1.2; }
.cl-folder-sub { font-size: 11px; color: var(--ink-3); }
.cl-folder.is-new { border-style: dashed; color: var(--ink-3); justify-content: center; align-items: flex-start; }
.cl-folder.is-new:hover { color: var(--ink); }
.cl-folder-plus { font-family: var(--font-serif); font-size: 22px; line-height: 1; }

.cl-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 26px; }
.cl-folder-item {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 24px; gap: 12px; align-items: center;
  border: 1px solid var(--line); background: var(--surface); padding: 13px 14px;
  cursor: pointer; transition: border-color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.cl-folder-item:hover { border-color: var(--line-2); background: var(--paper); }
.cl-fi-icon {
  width: 26px; height: 21px; border: 1px solid var(--line-2); position: relative;
}
.cl-fi-icon::before {
  content: ""; position: absolute; left: 0; top: -4px; width: 11px; height: 4px;
  border: 1px solid var(--line-2); border-bottom: 0;
}
.cl-fi-name { display: block; font-family: var(--font-serif); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-fi-sub { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-3); }
.cl-fi-more { color: var(--ink-3); font-size: 15px; opacity: .6; transition: opacity var(--t-hover) var(--ease); }
.cl-folder-item:hover .cl-fi-more { opacity: 1; }

/* ---------- breadcrumbs + toolbar ---------- */
.cl-crumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 22px 0 4px; }
.cl-crumb { font-size: 13px; color: var(--ink-3); transition: color var(--t-hover) var(--ease); }
.cl-crumb:hover { color: var(--ink); }
.cl-crumb-sep { font-size: 12px; color: var(--line-2); }

.cl-toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 0 22px; border-top: 1px solid var(--line); margin-top: 18px;
}
.cl-sort { display: flex; align-items: center; gap: 8px; }
.select {
  font-family: var(--font-sans); font-size: 12.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 8px 11px; cursor: pointer;
  transition: border-color var(--t-hover) var(--ease);
}
.select:focus { outline: none; border-color: var(--ink-2); }
.cl-dir {
  width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-s); font-size: 13px; color: var(--ink-2);
  transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.cl-dir:hover { border-color: var(--ink-3); color: var(--ink); }

/* ---------- file grid / list ---------- */
.cl-ext {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  display: grid; place-items: center; width: 100%; height: 100%;
}
.cl-ext.is-lg { font-size: 15px; }

.cl-files.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 18px; }
.cl-card {
  position: relative; border: 1px solid var(--line); background: var(--surface); padding: 9px;
  cursor: pointer; transition: border-color var(--t-card) var(--ease), transform var(--t-card) var(--ease);
}
.cl-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cl-card.is-sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cl-card-fig {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.cl-card-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-img) var(--ease); }
.cl-card:hover .cl-card-fig img { transform: scale(1.035); }
.cl-card-body { display: block; padding: 11px 4px 2px; }
.cl-card-name { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-card-sub { display: block; margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.cl-card-time { display: block; margin-top: 2px; font-size: 10.5px; color: var(--ink-3); opacity: .8; }
.cl-card-check, .cl-row-check { position: absolute; top: 16px; left: 16px; z-index: 3; }
.cl-card-check input, .cl-row-check input { width: 15px; height: 15px; accent-color: #191817; }
.cl-card-more, .cl-row-more {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(252, 251, 248, .94); border: 1px solid var(--line-2); color: var(--ink-2);
  font-size: 14px; line-height: 1; opacity: 0;
  transition: opacity var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.cl-card:hover .cl-card-more, .cl-row:hover .cl-row-more { opacity: 1; }
.cl-card-more:hover, .cl-row-more:hover { color: var(--ink); }
.cl-card-flag {
  position: absolute; bottom: 14px; right: 16px; z-index: 3;
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px;
}

.cl-files.is-list { border-top: 1px solid var(--line); }
.cl-row {
  position: relative;
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 110px 96px 110px 28px;
  gap: 18px; align-items: center; padding: 11px 10px;
  border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background 200ms var(--ease), transform 280ms var(--ease);
}
.cl-row:hover { background: var(--hover-bg); transform: translateX(3px); }
.cl-row.is-sel { background: var(--hover-bg); box-shadow: inset 3px 0 0 var(--ink); }
.cl-row-fig {
  width: 52px; height: 52px; overflow: hidden; border: 1px solid var(--line);
  background: var(--paper-2); display: grid; place-items: center;
}
.cl-row-fig img { width: 100%; height: 100%; object-fit: cover; }
.cl-row-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-row-kind, .cl-row-size, .cl-row-time { font-size: 12px; color: var(--ink-3); }
.cl-row-acts { display: flex; gap: 8px; justify-content: flex-end; }
.cl-row-check { position: static; }

/* ---------- selection bar ---------- */
.cl-selbar {
  position: fixed; left: calc(var(--side-w) + 40px); right: 40px; bottom: 26px; z-index: 80;
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--paper);
  padding: 14px 22px; border-radius: var(--r-m);
  box-shadow: 0 26px 60px -40px rgba(29, 27, 24, .5);
  animation: selbarIn 240ms var(--ease) both;
}
@keyframes selbarIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cl-selbar-n { font-size: 13px; margin-right: auto; }
.cl-selbar .btn-ghost { color: var(--paper); border-color: rgba(246, 244, 239, .38); }
.cl-selbar .btn-ghost:hover { border-color: var(--paper); background: transparent; }
.cl-selbar .btn-ghost.is-danger { color: #E7B7A6; border-color: rgba(231, 183, 166, .45); }
.cl-selbar .link-btn { color: rgba(246, 244, 239, .7); border-color: transparent; }
.cl-selbar .link-btn:hover { color: var(--paper); }

/* ---------- recycle bin ---------- */
.cl-trash-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cl-trash-note { font-size: 12.5px; color: var(--ink-3); max-width: 720px; line-height: 1.7; }
.cl-trash-list { border-top: 1px solid var(--line); margin-top: 4px; }
.cl-trash-list .cl-row { grid-template-columns: 52px minmax(0, 1fr) 120px auto; }

/* ---------- upload queue ---------- */
.cl-upload-list { margin-top: 18px; border-top: 1px solid var(--line); }
.cl-up {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) 90px auto 60px;
  gap: 14px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line);
}
.cl-up.is-error .cl-up-name { color: var(--danger); }
.cl-up-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.cl-up-dot.is-queued { background: var(--ink-3); }
.cl-up-dot.is-working { background: var(--ink); animation: pulse 900ms var(--ease) infinite alternate; }
.cl-up-dot.is-done { background: #6E7C63; }
.cl-up-dot.is-error { background: var(--danger); }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
.cl-up-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-up-sub, .cl-up-state { font-size: 11.5px; color: var(--ink-3); }

/* ---------- file detail ---------- */
.cl-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: 34px; align-items: start; }
.cl-detail-fig { border: 1px solid var(--line); background: var(--paper-2); padding: 12px; display: grid; place-items: center; min-height: 260px; }
.cl-detail-fig img { width: 100%; display: block; }
.cl-detail-icon { text-align: center; padding: 30px 20px; }
.cl-detail-icon .cl-ext {
  width: 92px; height: 92px; margin: 0 auto 16px; border: 1px solid var(--line-2);
}
.cl-detail-nonote { font-size: 12px; color: var(--ink-3); }
.cl-detail-name { font-family: var(--font-serif); font-weight: 400; font-size: 25px; line-height: 1.2; margin-bottom: 16px; }
.cl-links { display: grid; gap: 22px; margin-top: 12px; }
.cl-link-l { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.cl-link-block + .cl-link-block { border-top: 1px solid var(--line); padding-top: 20px; }
.chipset .chip-x {
  width: 15px; height: 15px; border-radius: 50%; color: var(--ink-3); font-size: 11px; line-height: 1;
  display: grid; place-items: center; transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.chipset .chip-x:hover { background: var(--hover-bg); color: var(--danger); }
.cl-link-block .link-btn { margin-top: 12px; }

@media (max-width: 1500px) {
  .cl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-thumbs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1320px) {
  .cl-duo { grid-template-columns: 1fr; gap: 30px; }
  .cl-detail { grid-template-columns: 1fr; }
  .cl-row { grid-template-columns: 52px minmax(0, 1fr) 90px 28px; }
  .cl-row-kind, .cl-row-size { display: none; }
}

/* ---------- design detail: materials, stage, version log (phase 0 data) ---------- */
.ver-list { margin-top: 14px; border-top: 1px solid var(--line); }
.ver-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) 82px;
  gap: 14px; align-items: baseline;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.ver-tag {
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 8px; text-align: center;
}
.ver-note { font-size: 12.5px; color: var(--ink-2); }
.ver-time { font-size: 11px; color: var(--ink-3); text-align: right; }

/* neutral fallback when an image is missing */
img.is-fallback { object-fit: cover; opacity: .9; }

/* ==========================================================================
   PHASE 6 — GLOBAL SEARCH PALETTE
   A quiet overlay: one field, grouped results, keyboard driven.
   ========================================================================== */

/* ---------- entry button in the page header ---------- */
.top-search {
  display: inline-flex; align-items: center; gap: 9px;
  height: 32px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink-3);
  transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.top-search:hover { border-color: var(--line-2); color: var(--ink); }
.ts-icon {
  width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-4.3-4.3'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-4.3-4.3'/></svg>") center/contain no-repeat;
}
.ts-label { font-size: 12.5px; }
.ts-kbd {
  font-family: var(--font-sans); font-size: 10px; letter-spacing: .06em;
  color: var(--ink-3); border: 1px solid var(--line); border-radius: 3px;
  padding: 2px 5px; background: var(--paper);
}

/* ---------- overlay ---------- */
.sp { position: fixed; inset: 0; z-index: 150; }
.sp[hidden] { display: none; }
.sp-scrim {
  position: absolute; inset: 0; background: rgba(29, 27, 24, .28);
  opacity: 0; transition: opacity 200ms var(--ease-soft);
}
.sp.is-in .sp-scrim { opacity: 1; }
.sp-panel {
  position: relative; margin: 12vh auto 0;
  width: 680px; max-width: calc(100vw - 80px);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-l);
  box-shadow: 0 40px 100px -50px rgba(29, 27, 24, .5);
  display: flex; flex-direction: column;
  max-height: 72vh;
  opacity: 0; transform: translateY(-8px) scale(.995);
  transition: opacity 200ms var(--ease-soft), transform 240ms var(--ease);
}
.sp.is-in .sp-panel { opacity: 1; transform: none; }

.sp-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.sp-glass {
  width: 15px; height: 15px; flex: none; background: var(--ink-3);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-4.3-4.3'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-4.3-4.3'/></svg>") center/contain no-repeat;
}
.sp-input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  font-family: var(--font-sans); font-size: 15px; color: var(--ink); outline: none;
}
.sp-input::placeholder { color: var(--ink-3); }
.sp-kbd, .sp-foot kbd {
  font-family: var(--font-sans); font-size: 10px; letter-spacing: .06em;
  color: var(--ink-3); border: 1px solid var(--line); border-radius: 3px;
  padding: 2px 5px; background: var(--surface);
}

.sp-body { overflow-y: auto; padding: 8px 8px 14px; }
.sp-group + .sp-group { margin-top: 6px; }
.sp-group-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); padding: 12px 12px 6px;
}
.sp-clear {
  font-size: 10.5px; letter-spacing: .04em; color: var(--ink-3);
  border-bottom: 1px solid transparent; transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.sp-clear:hover { color: var(--danger); border-bottom-color: var(--danger); }

.sp-item {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center;
  width: 100%; text-align: left; padding: 8px 12px; border-radius: var(--r-s);
  transition: background 140ms var(--ease);
}
.sp-item:hover, .sp-item.is-on { background: var(--hover-bg); }
.sp-item.is-on { box-shadow: inset 2px 0 0 var(--ink); }
.sp-thumb {
  width: 38px; height: 38px; overflow: hidden; border: 1px solid var(--line);
  background: var(--paper-2); display: grid; place-items: center;
}
.sp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-thumb-mark {
  font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
  text-align: center; line-height: 1.2; padding: 0 2px;
}
.sp-main { min-width: 0; }
.sp-title {
  display: block; font-size: 13.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-title mark { background: transparent; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.sp-sub {
  display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.sp-term { display: flex; align-items: center; padding: 0 6px; }
.sp-term-go {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-radius: var(--r-s); font-size: 13px; color: var(--ink-2);
  text-align: left; transition: background 140ms var(--ease), color 140ms var(--ease);
}
.sp-term:hover .sp-term-go { background: var(--hover-bg); color: var(--ink); }
.sp-term-icon {
  width: 11px; height: 11px; border: 1px solid var(--line-2); border-radius: 50%; flex: none;
}
.sp-term-x {
  width: 24px; height: 24px; border-radius: 50%; color: var(--ink-3); font-size: 13px;
  opacity: 0; transition: opacity var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.sp-term:hover .sp-term-x { opacity: .6; }
.sp-term-x:hover { opacity: 1 !important; color: var(--danger); }

.sp-quicks { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 12px 10px; }
.sp-quick {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 20px; padding: 7px 14px 7px 8px;
  transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.sp-quick:hover { border-color: var(--line-2); color: var(--ink); }
.sp-quick-mark {
  font-size: 9px; letter-spacing: .06em; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 6px;
}

.sp-empty { padding: 40px 20px 46px; text-align: center; }
.sp-empty-title { font-family: var(--font-serif); font-size: 21px; color: var(--ink); }
.sp-empty-hint { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

.sp-foot {
  display: flex; align-items: center; gap: 20px;
  padding: 10px 18px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--ink-3); background: var(--surface);
}
.sp-foot span { display: inline-flex; align-items: center; gap: 5px; }

body.sp-open { overflow: hidden; }

/* ---------- design library: filter panel + active conditions (phase 6) ---------- */
.lib-count { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.filter-n {
  margin-left: 7px; min-width: 16px; height: 16px; padding: 0 5px;
  display: inline-grid; place-items: center;
  font-size: 10px; color: var(--paper); background: var(--ink); border-radius: 20px;
}
.lib-active { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 18px; }
.lib-active:empty { display: none; }
.af-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 20px; padding: 6px 10px 6px 14px;
  background: var(--surface);
  transition: border-color var(--t-hover) var(--ease);
}
.af-chip:hover { border-color: var(--ink-3); }
.af-x { color: var(--ink-3); font-size: 13px; line-height: 1; }
.af-chip:hover .af-x { color: var(--danger); }
.af-clear {
  font-size: 12px; color: var(--ink-3); padding: 6px 6px;
  border-bottom: 1px solid transparent;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.af-clear:hover { color: var(--danger); border-bottom-color: var(--danger); }

.fp { max-height: 56vh; }
.fp-hint { font-size: 12px; color: var(--ink-3); margin-bottom: 20px; line-height: 1.6; }
.fp-group + .fp-group { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.fp-label {
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 11px;
}
.fp-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-opt {
  font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 20px; padding: 7px 14px;
  background: var(--surface);
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.fp-opt:hover { border-color: var(--line-2); color: var(--ink); }
.fp-opt.is-on { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.fp-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- relation blocks on design detail ---------- */
.dd-link-label {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin: 14px 0 10px;
}
.dd-link-label:first-of-type { margin-top: 0; }
a.wpe-work-name { color: var(--ink-2); text-decoration: none; }
a.wpe-work-name:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }

/* ==========================================================================
   PHASE 7 — TAGS & CLASSIFICATION
   Tag management (list + detail), classification options, bulk selection,
   completeness marks and the asset edit dialog.
   ========================================================================== */
body[data-page="tags"] .page { width: 100%; }

/* ---------- stats ---------- */
.tg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.tg-stat { border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; }
.tg-stat-n { font-family: var(--font-serif); font-size: 30px; line-height: 1; color: var(--ink); }
.tg-stat-l { margin-top: 9px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- layout ---------- */
.tags-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 44px; align-items: start; margin-top: 40px; }
.tags-side { position: sticky; top: 96px; }
.tags-side-tools { display: grid; grid-template-columns: 1fr; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tags-side-tools .select { width: 100%; }
.tg-list { padding-top: 8px; max-height: calc(100vh - 260px); overflow-y: auto; }
.tg-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 9px 12px;
  border-left: 1px solid transparent;
  color: var(--ink-2); transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.tg-item:hover { color: var(--ink); background: var(--hover-bg); }
.tg-item.is-on { color: var(--ink); border-left-color: var(--ink); background: var(--surface); }
.tg-item-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-item-n { font-size: 11px; color: var(--ink-3); flex: none; }
.tg-item-n.is-zero { color: var(--line-2); }
.tg-sep { height: 1px; background: var(--line); margin: 8px 0; }
.tg-list-empty { padding: 16px 12px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

/* ---------- detail ---------- */
.tags-main { min-width: 0; }
.tg-detail-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.tg-detail-head .label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.tg-detail-name { margin-top: 8px; font-family: var(--font-serif); font-weight: 400; font-size: 34px; line-height: 1.1; }
.tg-detail-meta { margin-top: 9px; font-size: 12.5px; color: var(--ink-3); max-width: 620px; line-height: 1.7; }
.tg-detail-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.tg-grid { margin-top: 30px; }
.tg-empty { margin-top: 30px; }
.tg-danger {
  margin-top: 48px; border-top: 1px solid var(--line); padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.tg-danger-t { font-size: 13px; color: var(--ink); }
.tg-danger-h { margin-top: 5px; font-size: 12px; color: var(--ink-3); max-width: 620px; line-height: 1.7; }

/* ---------- classification ---------- */
.tx-block { margin-top: 72px; border-top: 1px solid var(--line); padding-top: 34px; }
.tx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tx-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(22px, 2vw, 27px); }
.tx-head p { margin-top: 9px; font-size: 12.5px; color: var(--ink-3); max-width: 720px; line-height: 1.7; }
.tx-dims { margin-top: 26px; border-top: 1px solid var(--line); }
.tx-dim { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 28px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.tx-dim-head h3 { font-family: var(--font-serif); font-weight: 400; font-size: 18px; }
.tx-dim-head span { display: block; margin-top: 5px; font-size: 11px; color: var(--ink-3); }
.tx-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.tx-opt {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 20px; padding: 6px 8px 6px 14px;
  background: var(--surface);
  transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.tx-opt:hover { border-color: var(--ink-3); color: var(--ink); }
.tx-opt i {
  font-style: normal; font-size: 10px; color: var(--ink-3);
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 1px 6px;
}
.tx-add {
  font-size: 12.5px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 20px; padding: 7px 14px;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.tx-add:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---------- bulk selection on design cards ---------- */
.design-card { position: relative; }
.dc-check {
  position: absolute; top: 14px; left: 14px; z-index: 4;
  width: 24px; height: 24px; display: grid; place-items: center;
  background: rgba(252, 251, 248, .94); border: 1px solid var(--line-2); border-radius: 50%;
  opacity: 0; transition: opacity var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.design-card:hover .dc-check, .design-card.is-sel .dc-check { opacity: 1; }
.dc-check input { width: 13px; height: 13px; accent-color: #191817; cursor: pointer; }
.design-card.is-sel { outline: 1px solid var(--ink); outline-offset: 2px; }

.lib-selbar { left: calc(var(--side-w) + 40px); }
.lib-selbar .sel-act {
  font-size: 12.5px; color: rgba(246, 244, 239, .82);
  padding: 7px 12px; border: 1px solid rgba(246, 244, 239, .3); border-radius: var(--r-s);
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.lib-selbar .sel-act:hover { color: var(--paper); border-color: var(--paper); }
.lib-selbar .sel-act.is-danger { color: #E7B7A6; border-color: rgba(231, 183, 166, .42); }
.lib-selbar .sel-count { font-size: 13px; margin-right: 4px; }
.lib-selbar .sel-x { font-size: 12px; color: rgba(246, 244, 239, .6); margin-left: 4px; }
.lib-selbar .sel-x:hover { color: var(--paper); }

/* ---------- completeness mark ---------- */
.cp-pill {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  font-size: 9.5px; letter-spacing: .08em;
  border-radius: 20px; padding: 3px 9px;
  background: rgba(252, 251, 248, .94); border: 1px solid var(--line);
  color: var(--ink-3); opacity: 0;
  transition: opacity var(--t-hover) var(--ease);
}
.design-card:hover .cp-pill { opacity: 1; }
.cp-pill.is-warn { color: #8A6A3F; border-color: #D9C7A9; }
.cp-pill.is-ok { color: #5F7060; border-color: #BFCDBF; }

/* ---------- tag chips (detail / editor) ---------- */
.tagchip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 20px; padding: 5px 11px;
  background: var(--surface);
}
.tagchip.is-muted { color: var(--ink-3); border-color: var(--line); }
.tagchip .tc-x { color: var(--ink-3); font-size: 13px; line-height: 1; }
.tagchip .tc-x:hover { color: var(--danger); }
button.tagchip { transition: border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
button.tagchip:hover { border-color: var(--ink-3); color: var(--ink); }

/* ---------- asset edit dialog ---------- */
.de-field + .de-field { margin-top: 20px; }
.de-label {
  display: block; font-size: 10.5px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}
.de-tagbox {
  border: 1px solid var(--line); background: var(--paper); padding: 10px;
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center; min-height: 46px;
}
.de-tagbox input {
  flex: 1; min-width: 140px; border: 0; background: transparent;
  font-family: var(--font-sans); font-size: 12.5px; color: var(--ink); outline: none; padding: 4px;
}
.de-suggest { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.de-suggest button {
  font-size: 11.5px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 20px; padding: 4px 10px;
}
.de-suggest button:hover { color: var(--ink); border-color: var(--ink-3); }
.de-class { display: grid; gap: 12px; }
.de-class-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
.de-class-row > span { font-size: 11.5px; color: var(--ink-3); padding-top: 6px; }
.de-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.de-opt {
  font-size: 12px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 20px; padding: 5px 11px;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.de-opt:hover { border-color: var(--line-2); color: var(--ink); }
.de-opt.is-on { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.de-note { margin-top: 14px; font-size: 11.5px; color: var(--ink-3); line-height: 1.65; }
.de-section + .de-section { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }

/* bulk classification dialog */
.bc-dim + .bc-dim { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.bc-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 9px; }
.bc-opts { display: flex; flex-wrap: wrap; gap: 7px; }

/* bulk tag picker */
.pt-hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; margin-bottom: 14px; }
.pt-new { display: flex; gap: 8px; margin: 10px 0 4px; }
.pt-new .input { flex: 1; }
.pt-list { max-height: 300px; overflow-y: auto; }
.pt-thumb { font-family: var(--font-serif); font-size: 15px; color: var(--ink-2); }

@media (max-width: 1500px) {
  .tags-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 32px; }
  .tx-dim { grid-template-columns: 132px minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 1320px) {
  .tags-layout { grid-template-columns: 1fr; gap: 26px; }
  .tags-side { position: static; }
  .tg-list { max-height: 260px; }
  .tg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tx-dim { grid-template-columns: 1fr; gap: 12px; }
}

/* phase 7 — list-view selection + completeness inline mark */
.dr-thumb { position: relative; }
.dr-check {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(252, 251, 248, .72);
}
.dr-check input { width: 15px; height: 15px; accent-color: #191817; cursor: pointer; }
.dr-cp { color: #8A6A3F; }
.fp-scroll { max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.lib-selbar { flex-wrap: wrap; }

/* phase 7 — library toolbar: scope chips get their own row */
.lib-scopes { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 16px; }
.toolbar { flex-wrap: wrap; }
.af-chip + .af-chip { margin-left: 0; }
/* classification chips: selected is a quiet outline, not a black block */
.de-opt.is-on {
  color: var(--ink);
  background: var(--paper-2);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.de-opt.is-on::before { content: "· "; }

/* a hidden selection bar must actually be hidden (author display beats [hidden]) */
.cl-selbar[hidden] { display: none; }

/* the floating selection bar yields to dialogs and the search palette */
body.modal-open .cl-selbar,
body.sp-open .cl-selbar { display: none; }

/* phase 7 — five actions on a detail page: keep them on one line */
.detail-actions { gap: 8px; row-gap: 10px; }
.detail-actions .btn { padding: 8px 13px; font-size: 12px; }

/* ==========================================================================
   PHASE 8 — VERSIONS & CHANGE HISTORY
   Version block inside the design detail, version dialogs, compare view.
   ========================================================================== */
.ver-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ver-sum { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.ver-head-acts { display: flex; align-items: center; gap: 10px; }

.ver-current {
  display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 22px;
  border: 1px solid var(--line-2); background: var(--surface); padding: 14px; margin-top: 18px;
  cursor: pointer; transition: border-color var(--t-card) var(--ease);
}
.ver-current:hover { border-color: var(--ink-3); }
.ver-cur-fig {
  aspect-ratio: 4 / 3; border: 1px solid var(--line); background: var(--paper-2);
  overflow: hidden; display: grid; place-items: center;
}
.ver-cur-fig img { width: 100%; height: 100%; object-fit: cover; }
.ver-noimg { font-size: 10.5px; color: var(--ink-3); text-align: center; padding: 0 12px; line-height: 1.6; }
.ver-cur-body { min-width: 0; }
.ver-cur-kicker { font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.ver-cur-name { margin-top: 6px; font-family: var(--font-serif); font-size: 21px; line-height: 1.3; }
.ver-no { font-size: 11px; letter-spacing: .08em; color: var(--ink-3); }
.ver-cur-meta { margin-top: 9px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.ver-cur-notes { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.ver-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.ver-tl { margin-top: 6px; padding-left: 7px; border-left: 1px solid var(--line); }
.ver-item { position: relative; padding: 16px 0 16px 22px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ver-item:last-child { border-bottom: 0; }
.ver-dot {
  position: absolute; left: -3.5px; top: 23px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--line-2); transition: background var(--t-hover) var(--ease);
}
.ver-item:hover .ver-dot { background: var(--ink-3); }
.ver-item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ver-name { font-size: 14px; color: var(--ink); }
.ver-date { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.ver-notes { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.ver-filemeta { margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.ver-item .ver-acts { margin-top: 10px; opacity: .55; transition: opacity var(--t-hover) var(--ease); }
.ver-item:hover .ver-acts { opacity: 1; }
.ver-empty { border: 1px solid var(--line); background: var(--surface); padding: 44px 30px; text-align: center; margin-top: 18px; }

/* change log */
.ev-list { margin-top: 14px; }
.ev-row {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 12px;
  align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line);
}
.ev-row:last-child { border-bottom: 0; }
.ev-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); margin-top: 6px; }
.ev-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.ev-time { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

/* version dialog */
.vr-detail-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.vr-detail-name { font-family: var(--font-serif); font-weight: 400; font-size: 22px; }
.vr-detail-meta { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }
.vr-detail-notes { margin-top: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.vr-detail-notes.is-empty { color: var(--ink-3); }
.vr-files { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vr-file {
  border: 1px solid var(--line); background: var(--surface); padding: 6px;
  transition: border-color var(--t-hover) var(--ease);
}
.vr-file:hover { border-color: var(--line-2); }
.vr-file-fig {
  display: grid; place-items: center; aspect-ratio: 1; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line);
}
.vr-file-fig img { width: 100%; height: 100%; object-fit: cover; }
.vr-file-name {
  display: block; margin-top: 6px; font-size: 11px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vr-file-sub { display: block; margin-top: 2px; font-size: 10px; color: var(--ink-3); }
.vr-picked {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  border: 1px solid var(--line); background: var(--paper); padding: 9px; min-height: 42px;
}
.vr-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  font-size: 11.5px; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 20px; padding: 4px 9px;
}
.vr-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.vr-file-acts { display: flex; gap: 8px; margin-top: 10px; }

/* ---------------- compare view ---------------- */
body.cmp { background: var(--paper); }
.cmp-top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 20px 40px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.cmp-top-c { text-align: center; }
.cmp-kicker { font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.cmp-name { margin-top: 6px; font-family: var(--font-serif); font-weight: 400; font-size: 24px; }
.cmp-top-r { justify-self: end; }
.cmp-main { padding: 24px 40px 60px; max-width: 1920px; margin: 0 auto; }
.cmp-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 16px; flex-wrap: wrap; }
.cmp-zoom { display: flex; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.cmp-zoom button {
  font-size: 11.5px; padding: 7px 15px; color: var(--ink-3); background: var(--surface);
  transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.cmp-zoom button + button { border-left: 1px solid var(--line); }
.cmp-zoom button.is-on { background: var(--ink); color: var(--paper); }
.cmp-hint { font-size: 11.5px; color: var(--ink-3); }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.cmp-col { border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.cmp-col-head { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmp-select { width: 100%; }
.cmp-col-meta { margin-top: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cmp-vno { font-size: 11px; letter-spacing: .08em; color: var(--ink-3); }
.cmp-vname { font-family: var(--font-serif); font-size: 19px; }
.cmp-col-time { margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.cmp-col-notes { margin-top: 8px; font-size: 12px; color: var(--ink-2); line-height: 1.65; }
.cmp-fig {
  position: relative;
  height: calc(100vh - 440px); min-height: 340px;
  overflow: auto; padding: 18px;
  background: var(--paper-2);
}
/* Fit mode: the image box is pinned to the frame so `contain` really contains.
   A percentage height on a grid/flex item resolves against an auto-sized area
   and silently falls back to auto — which is what cropped the artwork before. */
.cmp-fig img {
  position: absolute; top: 18px; left: 18px;
  width: calc(100% - 36px); height: calc(100% - 36px);
  object-fit: contain; display: block;
}
.cmp-fig.is-actual img, .cmp-fig.is-zoom img {
  position: static; width: auto; height: auto;
  max-width: none; max-height: none; object-fit: none;
}
.cmp-fig.is-zoom img { zoom: 1.5; }
.cmp-files { padding: 10px 18px; font-size: 11px; color: var(--ink-3); border-top: 1px solid var(--line); }
.cmp-noimg { font-size: 12px; color: var(--ink-3); text-align: center; padding: 0 30px; line-height: 1.7; }
.cmp-empty { text-align: center; padding: 110px 20px; }
.cmp-empty-t { font-family: var(--font-serif); font-size: 26px; }
.cmp-empty-h { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.cmp-empty .btn { margin-top: 26px; display: inline-flex; }

@media (max-width: 1500px) {
  .ver-current { grid-template-columns: 168px minmax(0, 1fr); gap: 18px; }
  .cmp-main { padding: 22px 28px 50px; }
  .cmp-grid { gap: 20px; }
}
@media (max-width: 1320px) {
  .ver-current { grid-template-columns: 1fr; }
  .cmp-grid { grid-template-columns: 1fr; }
  .cmp-fig { height: 460px; }
}

/* ==========================================================================
   PHASE 9 — SAFETY: trash, delete dialogs, workspace switcher
   ========================================================================== */
body[data-page="trash"] .page { width: 100%; }

/* sidebar workspace switcher (button, not a div) */
.side-ws {
  width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 10px 12px; cursor: pointer;
}
.side-ws .ws-name { font-family: var(--font-serif); font-size: 17.5px; line-height: 1.2; color: var(--ink); }
.side-ws .chev { color: var(--ink-3); flex: none; }

/* trash page */
.tr-meta { margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.tr-group { margin-top: 34px; }
.tr-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.tr-group-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 21px; }
.tr-group-head span { font-size: 11.5px; color: var(--ink-3); }
.tr-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 190px auto;
  gap: 20px; align-items: center; padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 180ms var(--ease);
}
.tr-row:hover { background: var(--hover-bg); }
.tr-main { min-width: 0; }
.tr-name {
  display: block; font-size: 13.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tr-sub { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-3); }
.tr-time { font-size: 11.5px; color: var(--ink-3); }
.tr-acts { display: flex; gap: 8px; justify-content: flex-end; }
.tr-acts .link-btn { background: transparent; }

/* delete dialog */
.del-dialog { font-size: 13px; }
.del-hint { color: var(--ink-2); line-height: 1.7; }
.del-lead {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.del-usage { margin-top: 10px; display: grid; gap: 8px; }
.del-usage > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
.del-usage dt { font-size: 12px; color: var(--ink-3); }
.del-usage dd { font-size: 12.5px; color: var(--ink); line-height: 1.6; }
.del-note { margin-top: 14px; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }

/* in-page danger zone */
.detail-danger {
  margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
}
.dd-danger-t { font-size: 13px; color: var(--ink); }
.dd-danger-h { margin-top: 5px; font-size: 11.5px; color: var(--ink-3); line-height: 1.65; max-width: 380px; }

/* save / error toast states */
.toast.is-error { border-color: #D8B7A8; }
.toast .toast-act {
  margin-left: 10px; font-size: 11.5px; color: var(--ink); border-bottom: 1px solid var(--line-2);
}

@media (max-width: 1320px) {
  .tr-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tr-time { display: none; }
}

/* website overview — quiet delete link */
.wh-danger { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }

/* author display rules beat the [hidden] attribute — restore it explicitly */
.filter-n[hidden] { display: none; }
.wh-danger { display: flex; justify-content: flex-end; }

/* ==========================================================================
   PHASE 10 — QA pass: creation form, status strip, version recovery,
   honest dashboard blocks. Same tokens, no new visual language.
   ========================================================================== */

/* ---- design creation / edit cover ---- */
.df { display: flex; flex-direction: column; gap: 16px; }
.df-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.df-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.df-span { grid-column: 1 / -1; }
.df .de-label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.df .select { width: 100%; }
.df-cover { display: flex; gap: 14px; align-items: flex-start; padding: 11px; border: 1px solid var(--line); background: var(--paper-2); }
.df-cover-fig { width: 74px; height: 92px; flex: none; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.df-cover-fig img { width: 100%; height: 100%; object-fit: cover; }
.df-cover-empty { font-size: 11px; color: var(--ink-3); text-align: center; padding: 0 8px; line-height: 1.5; }
.df-cover-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; }
.df-checks { display: flex; flex-wrap: wrap; gap: 6px 8px; max-height: 108px; overflow: auto; padding: 2px 0; }
.df-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); border: 1px solid var(--line); padding: 7px 10px; cursor: pointer; transition: border-color var(--t-hover) var(--ease), background var(--t-hover) var(--ease); }
.df-check:hover { border-color: var(--line-2); background: var(--hover-bg); }
.df-check input { margin: 0; accent-color: var(--ink); }
.df-check i { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.df-check:has(input:checked) { border-color: var(--ink); background: var(--surface); }

/* cover block inside the edit dialog */
.de-cover { display: flex; gap: 16px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); background: var(--paper-2); }
.de-cover-fig { width: 84px; height: 105px; flex: none; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.de-cover-fig img { width: 100%; height: 100%; object-fit: cover; }
.de-cover-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.de-cover-acts .link-btn[hidden] { display: none; }

/* ---- detail status strip ---- */
.dd-status { display: flex; flex-wrap: wrap; gap: 0; margin: 20px 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dd-status-i { display: flex; flex-direction: column; gap: 3px; padding: 11px 18px 11px 0; margin-right: 18px; min-width: 0; max-width: 220px; }
.dd-status-i + .dd-status-i { border-left: 1px solid var(--line); padding-left: 18px; }
.dd-status-i i { font-style: normal; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.dd-status-i b { font-weight: 500; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-flag { color: var(--ink-3); }

/* ---- deleted versions ---- */
.ver-gone { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 14px; }
.ver-gone-head { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.ver-gone-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.ver-gone-row .ver-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver-gone-row .ver-date { font-size: 11px; }

/* ---- dashboard empties + honest storage ---- */
.dash-empty { border: 1px dashed var(--line); padding: 30px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dash-empty p { font-size: 13px; color: var(--ink-3); }
.bc-cta { margin-top: 16px; }
.bc-store .link-btn { margin-top: 12px; display: inline-block; }
.bc-store .bc-note { max-width: 300px; line-height: 1.7; }

/* ---- project related files ---- */
.pj-files { margin-top: 20px; border-top: 1px solid var(--line); }
.pj-file { display: flex; align-items: center; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: inherit; transition: background var(--t-hover) var(--ease); }
.pj-file:hover { background: var(--hover-bg); }
.pj-file-name { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-file-meta { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

@media (max-width: 1320px) {
  .df-grid { grid-template-columns: 1fr; }
  .dd-status-i { max-width: 160px; }
}

/* long titles: two lines then ellipsis — the card height stays stable */
.dc-name a, .asset-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dash-stat .n { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }

/* preview frame loading state (site iframe is the only async surface) */
.frame-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--paper-2); color: var(--ink-3); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; z-index: 2; transition: opacity 240ms var(--ease);
}
.frame-loading.is-off { opacity: 0; pointer-events: none; }
.assets-grid .dash-empty { grid-column: 1 / -1; }

/* ==========================================================================
   PHASE 11 — auth, settings, plans, usage
   Same tokens, same editorial restraint: no dashboards, no control panels.
   ========================================================================== */

/* ---- login / register ---- */
body.auth { background: var(--paper); min-height: 100vh; }
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 72px 24px 90px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); margin-bottom: 42px; }
.auth-card { border: 1px solid var(--line); background: var(--surface); padding: 34px 32px 30px; }
.auth-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.auth-tabs button {
  font-size: 12.5px; letter-spacing: .1em; color: var(--ink-3);
  padding-bottom: 12px; border-bottom: 1px solid transparent; margin-bottom: -1px;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.auth-tabs button.is-on { color: var(--ink); border-color: var(--ink); }
.auth-title { font-family: var(--font-serif); font-weight: 400; font-size: 30px; }
.auth-sub { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); line-height: 1.7; }
.auth-card .field + .field { margin-top: 18px; }
.auth-card form { margin-top: 30px; }
.auth-submit { width: 100%; justify-content: center; margin-top: 26px; }
.auth-error {
  margin-top: 18px; padding: 11px 14px; border: 1px solid #D8B7A8;
  background: rgba(216, 183, 168, .1); font-size: 12.5px; color: var(--danger);
}
.auth-note { margin-top: 18px; text-align: center; }
.auth-unsupported { margin-top: 14px; font-size: 11.5px; color: var(--ink-3); text-align: center; line-height: 1.7; }
.auth-foot {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 11.5px; color: var(--ink-3);
}

/* ---- settings ---- */
.set-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.set-tabs button {
  font-size: 12.5px; letter-spacing: .1em; color: var(--ink-3); padding-bottom: 13px;
  border-bottom: 1px solid transparent; margin-bottom: -1px;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.set-tabs button.is-on { color: var(--ink); border-color: var(--ink); }
.set-body { max-width: 720px; }
.set-block { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 34px; }
.set-block:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.set-block.is-danger .set-h2 { color: var(--danger); }
.set-h2 { font-family: var(--font-serif); font-weight: 400; font-size: 22px; }
.set-head-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.set-note { margin-top: 12px; font-size: 13px; color: var(--ink-3); line-height: 1.75; }
.set-warn {
  margin-top: 20px; padding: 12px 15px; border: 1px solid var(--line-2);
  background: var(--paper-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.7;
}
.set-block .field { margin-top: 20px; max-width: 420px; }
.set-acts { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.ws-list { margin-top: 20px; border-top: 1px solid var(--line); }
.ws-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.ws-row.is-on .ws-row-name { color: var(--ink); }
.ws-row-name { font-size: 14px; }
.ws-row-sub { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.ws-logo-row { display: flex; align-items: flex-start; gap: 16px; }
.ws-logo-fig { width: 64px; height: 64px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ws-logo-fig img { width: 100%; height: 100%; object-fit: cover; }

/* usage meters */
.use-list { margin-top: 22px; }
.use-row + .use-row { margin-top: 22px; }
.use-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 12.5px; color: var(--ink-3); }
.use-head b { font-weight: 500; color: var(--ink); font-size: 13px; }
.use-bar { margin-top: 9px; height: 3px; background: var(--line); }
.use-bar i { display: block; height: 100%; background: var(--ink); transition: width 320ms var(--ease); }
.ent-list { margin-top: 18px; border-top: 1px solid var(--line); }
.ent-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.ent-row b { font-weight: 500; color: var(--ink); }

/* ---- plans ---- */
.plan-note { margin-top: -8px; font-size: 12px; color: var(--ink-3); }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.plan-card { border: 1px solid var(--line); background: var(--surface); padding: 28px 24px 26px; display: flex; flex-direction: column; }
.plan-card.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pc-name { font-family: var(--font-serif); font-size: 26px; }
.pc-price { margin-top: 12px; font-size: 22px; color: var(--ink); }
.pc-price i { font-style: normal; font-size: 12px; color: var(--ink-3); margin-left: 8px; }
.pc-tag { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; min-height: 44px; }
.pc-list { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.pc-list li { font-size: 12.5px; color: var(--ink-2); padding: 7px 0; }
.plan-card .btn { margin-top: auto; align-self: flex-start; }
.pc-cur { margin-top: auto; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.plan-foot { display: flex; align-items: center; gap: 20px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }

/* plan picker inside the modal */
.plan-pick { margin-top: 16px; border-top: 1px solid var(--line); }
.plan-opt { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.plan-opt input { align-self: center; accent-color: var(--ink); }
.plan-opt.is-on { background: var(--hover-bg); }
.po-name { font-family: var(--font-serif); font-size: 20px; }
.po-price { grid-column: 2; font-size: 12.5px; color: var(--ink-2); }
.po-price i { font-style: normal; color: var(--ink-3); }
.po-tag { grid-column: 2; font-size: 11.5px; color: var(--ink-3); }

/* sidebar account block */
.side-user { display: flex; align-items: center; gap: 11px; padding: 14px 10px 6px; border-top: 1px solid var(--line); }
.side-user .u-name { font-size: 12.5px; line-height: 1.3; }
.side-user .u-role { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; word-break: break-all; }
.side-logout {
  margin-left: auto; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); border-radius: 50%; transition: color var(--t-hover) var(--ease), background var(--t-hover) var(--ease);
}
.side-logout svg { width: 15px; height: 15px; }
.side-logout:hover { color: var(--danger); background: var(--hover-bg); }

@media (max-width: 1320px) {
  .plan-grid { grid-template-columns: 1fr; }
}
.web-lock {
  margin-bottom: 22px; padding: 13px 16px; border: 1px solid var(--line-2);
  background: var(--paper-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.7;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
