/* ═══════════════════════════════════════════════════
   CMS module — overview + editor workspace styles
   ═══════════════════════════════════════════════════ */

/* ---------- Section header (shared across CMS screens) ---------- */
.cms-workspace { min-width: 0; }
.cms-workspace .cms-stats { min-width: 0; }
.cms-workspace table { min-width: 0; }

/* Tabs — horizontally scrollable when narrow */
.cms-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cms-tabs::-webkit-scrollbar { display: none; }
.cms-tab {
  padding: 14px 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
  background: transparent;
}
.cms-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.cms-tab .zh {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 11px;
  letter-spacing: .1em;
  margin-left: 8px;
  opacity: .7;
}
.cms-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.cms-head .title { flex: 1 1 400px; min-width: 0; }
.cms-head .tools { flex-shrink: 0; }
.cms-head .title .en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cms-head .title h1 {
  font-family: 'Noto Serif TC', serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink);
  line-height: 1.2;
}
.cms-head .title h1 .muted {
  font-size: 14px;
  font-weight: 300;
  color: var(--mute);
  letter-spacing: .05em;
  margin-left: 12px;
}
.cms-head .tools {
  display: flex; gap: 8px; align-items: center;
  flex-shrink: 0;
}
.cms-tool-btn {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .15em;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s;
}
.cms-tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.cms-tool-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.cms-tool-btn.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
.cms-tool-btn.ghost { background: transparent; border-color: transparent; color: var(--mute); }
.cms-tool-btn.ghost:hover { color: var(--ink); background: var(--surface-warm); }

/* ---------- Overview stats ---------- */
.cms-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.cms-stat {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px 20px;
  position: relative;
}
.cms-stat .lbl {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: .35em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cms-stat .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -.01em;
}
.cms-stat .num .unit {
  font-size: 13px;
  color: var(--mute);
  margin-left: 6px;
  letter-spacing: .1em;
}
.cms-stat .sub {
  font-size: 11px;
  color: var(--mute);
  margin-top: 6px;
  letter-spacing: .05em;
}
.cms-stat .stripe {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
}
.cms-stat.warn .stripe { background: var(--error); }
.cms-stat.ok .stripe { background: var(--sage); }
.cms-stat.info .stripe { background: var(--terra); }

/* ---------- Overview toolbar (filters/search) ---------- */
.cms-toolbar {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  border-bottom: none;
}
.cms-search {
  flex: 1;
  height: 36px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  background: var(--bg);
  max-width: 360px;
}
.cms-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
}
.cms-search .ic { color: var(--mute); }
.cms-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cms-chip {
  height: 28px; padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--mute);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s;
  border-radius: 14px;
}
.cms-chip:hover { color: var(--ink); border-color: var(--ink); }
.cms-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cms-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.cms-chip .c { font-family: 'Cormorant Garamond', serif; font-size: 11px; opacity: .8; }

.cms-view-toggle { display: flex; border: 1px solid var(--line); }
.cms-view-toggle button {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--mute);
  border-right: 1px solid var(--line);
}
.cms-view-toggle button:last-child { border-right: none; }
.cms-view-toggle button.active { background: var(--ink); color: #fff; }

/* ---------- Pages table ---------- */
.cms-table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
}
.cms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cms-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  background: var(--surface-warm);
  white-space: nowrap;
}
.cms-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background .15s;
  cursor: pointer;
}
.cms-table tbody tr:hover { background: var(--surface-warm); }
.cms-table tbody tr:last-child { border-bottom: none; }
.cms-table td {
  padding: 14px 16px;
  vertical-align: middle;
}
.cms-table td.t-title {
  font-family: 'Noto Serif TC', serif;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .05em;
}
.cms-table td.t-title .badge {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  color: var(--accent);
  margin-left: 6px;
  letter-spacing: .2em;
}
.cms-table td.t-path {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  color: var(--mute);
  letter-spacing: .05em;
}
.cms-table td.t-status { white-space: nowrap; }
.cms-table td.t-edited, .cms-table td.t-editor, .cms-table td.t-views {
  font-size: 12px;
  color: var(--mute);
  letter-spacing: .05em;
  white-space: nowrap;
}
.cms-table td.t-seo { width: 140px; }
.cms-table td.t-actions { width: 1px; white-space: nowrap; }

.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--mute);
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 400;
}
.cat-tag .dot { width: 7px; height: 7px; border-radius: 50%; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  border-radius: 11px;
  border: 1px solid;
}
.status-pill .dot { width: 5px; height: 5px; border-radius: 50%; }
.status-pill.published { color: var(--sage); border-color: var(--sage); background: #f3f6f1; }
.status-pill.published .dot { background: var(--sage); }
.status-pill.draft { color: var(--mute); border-color: var(--line); background: var(--bg); }
.status-pill.draft .dot { background: var(--mute); }
.status-pill.review { color: var(--terra); border-color: var(--terra); background: #faf4ee; }
.status-pill.review .dot { background: var(--terra); }

.seo-bar {
  display: flex; align-items: center; gap: 8px;
}
.seo-bar .bar {
  flex: 1; height: 4px; background: var(--line); position: relative; max-width: 80px;
}
.seo-bar .bar .fill {
  position: absolute; top: 0; left: 0; bottom: 0; background: var(--accent);
}
.seo-bar .bar .fill.ok { background: var(--sage); }
.seo-bar .bar .fill.warn { background: var(--error); }
.seo-bar .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: .05em;
  min-width: 24px;
}

.row-action {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--mute);
  border: 1px solid transparent;
  margin-left: 4px;
}
.row-action:hover { color: var(--accent); border-color: var(--line); background: var(--card); }

/* ---------- Editor workspace ---------- */
.editor-shell {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  height: calc(100vh - 60px - 88px);
  min-height: 700px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
}
.editor-shell.preview-mode {
  grid-template-columns: 0 1fr 0;
}

.editor-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  height: 52px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  background: var(--surface-warm);
  gap: 12px;
}
.editor-back {
  height: 30px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--mute); font-size: 12px; letter-spacing: .1em;
  border: 1px solid transparent;
}
.editor-back:hover { color: var(--ink); border-color: var(--line); }
.editor-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink);
}
.editor-title .path {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  color: var(--mute);
  margin-left: 12px;
  letter-spacing: .05em;
}
.editor-head .spacer { flex: 1; }
.editor-viewport-switch {
  display: flex; border: 1px solid var(--line); background: var(--card);
}
.editor-viewport-switch button {
  width: 36px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--mute);
  border-right: 1px solid var(--line);
}
.editor-viewport-switch button:last-child { border-right: none; }
.editor-viewport-switch button.active { background: var(--ink); color: #fff; }

/* ---------- Left: outline ---------- */
.editor-outline {
  grid-row: 2;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.eo-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.eo-head .t {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: .35em;
  color: var(--mute);
  text-transform: uppercase;
}
.eo-list { flex: 1; overflow-y: auto; padding: 8px; }
.eo-item {
  padding: 10px 12px;
  margin-bottom: 4px;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.eo-item:hover { background: var(--surface-warm); }
.eo-item.active { background: var(--surface-warm); border-left-color: var(--accent); }
.eo-item .row1 {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Noto Serif TC', serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .05em;
}
.eo-item .type {
  font-family: 'Cormorant Garamond', serif;
  font-size: 9px;
  letter-spacing: .25em;
  color: var(--accent);
  text-transform: uppercase;
  width: 56px;
}
.eo-item .desc {
  font-size: 11px;
  color: var(--mute);
  margin-top: 4px;
  margin-left: 64px;
  line-height: 1.5;
}
.eo-item .lock { color: var(--mute); }
.eo-item .hide-btn { margin-left: auto; color: var(--mute); opacity: 0; transition: opacity .15s; }
.eo-item:hover .hide-btn { opacity: 1; }
.eo-item .note {
  font-family: 'Cormorant Garamond', serif;
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--terra);
  text-transform: uppercase;
  margin-top: 4px;
  margin-left: 64px;
}

.eo-add {
  margin: 8px;
  height: 36px;
  border: 1px dashed var(--line);
  color: var(--mute);
  font-size: 11px;
  letter-spacing: .2em;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s;
}
.eo-add:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Center: preview iframe ---------- */
.editor-stage {
  grid-row: 2;
  display: flex; flex-direction: column;
  background: #dcd8d0;
  overflow: hidden;
  position: relative;
}
.stage-toolbar {
  height: 42px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-warm);
  display: flex; align-items: center; padding: 0 14px; gap: 10px;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: .1em;
}
.stage-toolbar .url {
  flex: 1;
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  height: 26px;
  padding: 0 10px;
  display: flex; align-items: center;
  letter-spacing: .05em;
}
.stage-toolbar .url .lock { color: var(--sage); margin-right: 6px; }
.stage-canvas {
  flex: 1;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px;
  overflow: auto;
  background: linear-gradient(135deg, #e6e0d4 25%, transparent 25%) -20px 0/40px 40px,
              linear-gradient(225deg, #e6e0d4 25%, transparent 25%) -20px 0/40px 40px,
              linear-gradient(315deg, #e6e0d4 25%, transparent 25%) 0 0/40px 40px,
              linear-gradient(45deg,  #e6e0d4 25%, transparent 25%) 0 0/40px 40px,
              #f0eae0;
}
.stage-frame {
  background: var(--card);
  box-shadow: 0 20px 50px rgba(0,0,0,.1);
  transition: width .3s var(--ease-out);
  position: relative;
  width: 100%;
  max-width: 1200px;
  min-height: 680px;
}
.stage-frame.size-mobile { max-width: 390px; border: 8px solid #1c1b18; border-radius: 28px; overflow: hidden; }
.stage-frame.size-mobile .fake-hero { padding: 60px 24px 48px; height: auto; min-height: 560px; }
.stage-frame.size-mobile .fake-hero h1 { font-size: 38px; line-height: 1.15; margin-bottom: 16px; }
.stage-frame.size-mobile .fake-hero .sub {
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.8;
  padding: 10px 14px;
  max-width: 100%;
  word-break: keep-all;
  text-wrap: balance;
}
.stage-frame.size-mobile .fake-hero .cta { flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.stage-frame.size-mobile .fake-hero .cta .b { height: 38px; padding: 0 18px; font-size: 12px; }
.stage-frame.size-tablet { max-width: 768px; }

/* Placeholder site preview (fake iframe render) */
.fake-site {
  font-family: 'Noto Serif TC', serif;
  color: var(--ink);
}
.fake-nav {
  height: 64px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 32px;
  justify-content: space-between;
}
.fake-nav .logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: .4em;
  font-weight: 500;
}
.fake-nav .nav-items {
  display: flex; gap: 28px;
  font-size: 12px; letter-spacing: .2em; color: var(--mute);
  font-family: 'Noto Sans TC', sans-serif; font-weight: 400;
}
.fake-hero {
  position: relative;
  height: 520px;
  background: linear-gradient(135deg, #2a2620 0%, #3a3228 50%, #4a3d2e 100%);
  color: #fff;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: 0 32px;
  overflow: hidden;
}
.fake-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at top left, rgba(154,132,86,.25), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(160,120,90,.2), transparent 60%);
}
.fake-hero .brand-sm {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: .5em;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  margin-bottom: 16px;
  position: relative;
}
.fake-hero h1 {
  font-family: 'Noto Serif TC', serif;
  font-size: 56px;
  font-weight: 400;
  letter-spacing: .15em;
  line-height: 1.2;
  position: relative;
  margin-bottom: 20px;
}
.fake-hero .sub {
  font-size: 14px;
  letter-spacing: .15em;
  color: rgba(255,255,255,.7);
  max-width: 480px;
  position: relative;
  line-height: 1.9;
}
.fake-hero .cta {
  margin-top: 32px;
  display: flex; gap: 12px;
  position: relative;
}
.fake-hero .cta .b {
  height: 42px; padding: 0 24px;
  border: 1px solid rgba(255,255,255,.5);
  color: #fff;
  font-size: 12px;
  letter-spacing: .25em;
  display: inline-flex; align-items: center;
  background: transparent;
}
.fake-hero .cta .b.filled { background: var(--accent); border-color: var(--accent); }

.fake-sec {
  padding: 72px 32px;
  border-bottom: 1px solid var(--line);
}
.fake-sec.dark { background: var(--dark); color: #fff; }
.fake-sec .sec-head { text-align: center; margin-bottom: 40px; }
.fake-sec .sec-head .en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: .5em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.fake-sec .sec-head h2 {
  font-family: 'Noto Serif TC', serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: .15em;
}
.fake-sec .brands-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
  max-width: 960px; margin: 0 auto;
}
.fake-sec .brand-c {
  aspect-ratio: 3/4;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
  transition: all .2s;
}
.fake-sec .brand-c:hover { background: var(--card); transform: translateY(-4px); }
.fake-sec .brand-c .n {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: .3em;
  font-weight: 500;
  margin-bottom: 6px;
}
.fake-sec .brand-c .k {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: .15em;
}
.fake-sec .cases-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  max-width: 960px; margin: 0 auto;
}
.fake-sec .case-c {
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, #b09a6a, #7a6a42);
  display: flex; align-items: flex-end; padding: 20px;
  color: #fff;
  font-family: 'Noto Serif TC', serif;
  font-size: 14px;
  letter-spacing: .1em;
  position: relative;
}
.fake-sec .case-c::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent 60%);
}
.fake-sec .case-c span { position: relative; }
.fake-sec .case-c:nth-child(2) { background: linear-gradient(135deg, #8a9484, #5a6450); }
.fake-sec .case-c:nth-child(3) { background: linear-gradient(135deg, #a0785a, #6a4832); }

.fake-sec .inspo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  max-width: 960px; margin: 0 auto;
}
.fake-sec .inspo-c {
  aspect-ratio: 1/1;
  background: var(--surface-warm);
  position: relative;
  overflow: hidden;
}
.fake-sec .inspo-c .lbl {
  position: absolute; bottom: 16px; left: 16px;
  color: #fff;
  font-family: 'Noto Serif TC', serif;
  font-size: 13px;
  letter-spacing: .15em;
  z-index: 2;
}
.fake-sec .inspo-c::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(42,38,32,.2), rgba(42,38,32,.7));
  z-index: 1;
}
.fake-sec .inspo-c:nth-child(1) { background: linear-gradient(135deg, #8a9484 0%, #3a4038 100%); }
.fake-sec .inspo-c:nth-child(2) { background: linear-gradient(135deg, #a0785a 0%, #4a3828 100%); }
.fake-sec .inspo-c:nth-child(3) { background: linear-gradient(135deg, #9a8456 0%, #3a3020 100%); }
.fake-sec .inspo-c:nth-child(4) { background: linear-gradient(135deg, #2a2620 0%, #1c1b18 100%); }
.fake-sec .inspo-c:nth-child(5) { background: linear-gradient(135deg, #b09a6a 0%, #5a4830 100%); }
.fake-sec .inspo-c:nth-child(6) { background: linear-gradient(135deg, #7b6b52 0%, #3a3020 100%); }

.fake-cta {
  padding: 80px 32px;
  background: var(--dark); color: #fff;
  text-align: center;
}
.fake-cta h3 {
  font-family: 'Noto Serif TC', serif;
  font-size: 32px; letter-spacing: .2em;
  margin-bottom: 14px;
}
.fake-cta p {
  font-size: 13px; color: rgba(255,255,255,.6); letter-spacing: .15em;
  margin-bottom: 24px;
}
.fake-footer {
  background: #1c1b18; color: rgba(255,255,255,.5);
  padding: 40px 32px 28px;
  font-size: 11px; letter-spacing: .15em;
  text-align: center;
}
.fake-footer .tag { color: var(--accent); font-family: 'Cormorant Garamond', serif; font-size: 14px; letter-spacing: .3em; margin-bottom: 8px; }

/* Editable overlay — highlight when editable */
.fake-site .editable {
  cursor: pointer;
  transition: outline-color .15s, background .15s;
  outline: 1px dashed transparent;
  outline-offset: 4px;
}
.edit-highlights .fake-site .editable { outline-color: rgba(154,132,86,.4); }
.edit-highlights .fake-site .editable:hover { outline-color: var(--accent); background: rgba(154,132,86,.08); }
.fake-site .editable.selected {
  outline: 2px solid var(--accent) !important;
  outline-offset: 4px;
  background: rgba(154,132,86,.1);
}
.fake-site .editable.selected::after {
  content: attr(data-edit-label);
  position: absolute;
  top: -22px; left: 0;
  background: var(--accent);
  color: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: .25em;
  padding: 2px 8px;
  text-transform: uppercase;
  z-index: 10;
}
.fake-site .editable { position: relative; }

/* ---------- Right: inspector ---------- */
.editor-inspector {
  grid-row: 2;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ei-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.ei-head .t {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: .35em;
  color: var(--mute);
  text-transform: uppercase;
}
.ei-head .h {
  font-family: 'Noto Serif TC', serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .08em;
  margin-top: 4px;
}
.ei-body { flex: 1; overflow-y: auto; padding: 16px; }
.ei-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--mute);
}
.ei-empty .ic { margin: 0 auto 14px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.ei-empty .t {
  font-family: 'Noto Serif TC', serif;
  font-size: 13px; color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: .1em;
}
.ei-empty .d { font-size: 11px; line-height: 1.8; letter-spacing: .05em; }

.ei-section { margin-bottom: 22px; }
.ei-section .lbl {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ei-input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
  resize: vertical;
}
.ei-input:focus { border-color: var(--accent); background: var(--card); }
.ei-input.area { min-height: 80px; line-height: 1.7; }
.ei-hint {
  font-size: 10px; color: var(--mute); margin-top: 4px; letter-spacing: .05em;
}

.ei-swatches {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
.ei-swatch {
  aspect-ratio: 1/1;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .15s;
}
.ei-swatch:hover { transform: scale(1.08); border-color: var(--ink); }
.ei-swatch.active { border: 2px solid var(--ink); }

.ei-media {
  border: 1px dashed var(--line);
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 8px;
}
.ei-media .thumb {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #b09a6a, #7a6a42);
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: .3em;
  font-size: 11px;
}
.ei-media .filename {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: .05em;
  margin-bottom: 8px;
  word-break: break-all;
}
.ei-media-btns { display: flex; gap: 6px; justify-content: center; }
.ei-media-btns button {
  height: 28px; padding: 0 12px;
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink);
  background: var(--card);
}
.ei-media-btns button:hover { border-color: var(--accent); color: var(--accent); }

.ei-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  margin-top: -16px;
  margin-left: -16px;
  margin-right: -16px;
  padding: 0 16px;
}
.ei-tabs button {
  padding: 12px 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--mute);
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.ei-tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Save bar (bottom) ---------- */
.save-bar {
  position: absolute;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 40px;
  padding: 10px 10px 10px 22px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
  display: flex; align-items: center; gap: 16px;
  font-size: 12px;
  letter-spacing: .1em;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.save-bar.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.save-bar .dot-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.save-bar button {
  height: 32px; padding: 0 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.save-bar .discard { color: rgba(255,255,255,.5); }
.save-bar .save {
  background: var(--accent); color: #fff; border-radius: 20px;
}

/* ---------- Blog list ---------- */
.blog-list {
  background: var(--card); border: 1px solid var(--line);
}
.blog-row {
  display: grid;
  grid-template-columns: 80px 1fr 130px 120px 100px 120px;
  gap: 16px; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s;
}
.blog-row:hover { background: var(--surface-warm); }
.blog-row:last-child { border-bottom: none; }
.blog-thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #b09a6a, #7a6a42);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px; letter-spacing: .2em;
}
.blog-thumb.c1 { background: linear-gradient(135deg, #8a9484, #5a6450); }
.blog-thumb.c2 { background: linear-gradient(135deg, #a0785a, #6a4832); }
.blog-thumb.c3 { background: linear-gradient(135deg, #9a8456, #5a4830); }
.blog-thumb.c4 { background: linear-gradient(135deg, #7b6b52, #3a3020); }
.blog-thumb.c5 { background: linear-gradient(135deg, #2a2620, #4a3d2e); }
.blog-row .b-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 14px; font-weight: 500;
  color: var(--ink); letter-spacing: .05em;
  line-height: 1.4;
}
.blog-row .b-meta {
  font-size: 11px; color: var(--mute);
  margin-top: 4px; letter-spacing: .05em;
  display: flex; gap: 10px;
}
.blog-row .b-tag {
  display: inline-flex;
  height: 22px; padding: 0 10px;
  align-items: center;
  background: var(--surface-warm);
  font-size: 10px; letter-spacing: .2em;
  color: var(--mute);
}
.blog-row .badge-new {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px; color: var(--accent);
  letter-spacing: .2em;
  margin-left: 8px;
}

/* ---------- FAQ editor ---------- */
.faq-wrap { background: var(--card); border: 1px solid var(--line); }
.faq-item {
  display: grid;
  grid-template-columns: 36px 36px 1fr 100px 80px 40px;
  gap: 12px; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  transition: background .15s;
}
.faq-item:hover { background: var(--surface-warm); }
.faq-item.dragging { opacity: .4; background: var(--surface-warm); }
.faq-item .drag {
  color: var(--mute);
  display: flex; align-items: center; justify-content: center;
}
.faq-item .ord {
  font-family: 'Cormorant Garamond', serif;
  color: var(--accent);
  font-size: 16px;
  text-align: center;
}
.faq-item .q {
  font-family: 'Noto Serif TC', serif;
  font-size: 14px; font-weight: 500;
  color: var(--ink); letter-spacing: .05em;
}
.faq-item .cat {
  font-size: 11px; color: var(--mute); letter-spacing: .1em;
}
.faq-item .views {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px; color: var(--mute);
  letter-spacing: .05em;
}

/* ---------- Global settings ---------- */
.gs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.gs-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px 20px;
}
.gs-card .lbl-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.gs-card .lbl {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px; letter-spacing: .3em;
  color: var(--mute); text-transform: uppercase;
}
.gs-card .uses {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: .15em;
  font-family: 'Cormorant Garamond', serif;
}
.gs-card .val {
  font-family: 'Noto Serif TC', serif;
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: .05em;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.gs-card .key {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: .1em;
  margin-top: 6px;
}

/* ---------- Mobile CMS adjustments ---------- */
@media (max-width: 1100px) {
  .editor-shell { grid-template-columns: 240px 1fr 280px; }
}
@media (max-width: 900px) {
  .editor-shell { grid-template-columns: 1fr; }
  .editor-outline, .editor-inspector { display: none; }
  .cms-stats { grid-template-columns: repeat(2, 1fr); }
  .gs-grid { grid-template-columns: 1fr; }
}
