/* ====================================================================
   style.css · 应用外壳（非预览）
   只放编辑器界面：顶栏 / 控件 / 工作区 / 编辑器 / 预览容器 / 翻页 / 响应式。
   预览卡片样式见：base.css(基础) → 当前风格 css(kinfolk.css 或 editorial.css)。
   加载顺序：style.css → base.css → themeCss(kinfolk|editorial) → debug.css
   部署测试备注：2026-07-05 11:16 — 若线上能看到本行，说明 Pages 自动部署已生效。
   ==================================================================== */
:root {
  --bg-app: #15140f;
  --panel: #1e1c16;
  --panel-2: #26241c;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f3efe6;
  --text-dim: #b6ad99;
  --accent: #c8553d;
  --radius: 14px;
  --font-serif: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-cjk: 'Noto Serif SC', 'Noto Sans SC', system-ui, sans-serif;
  --font-sans: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(200, 85, 61, 0.18), transparent 60%),
    var(--bg-app);
  color: var(--text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ---------- Topbar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; background: rgba(20, 19, 14, 0.7); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand-mark { font-family: var(--font-serif); font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }
.brand-mark span { font-family: var(--font-sans); font-size: 12px; font-weight: 400; color: var(--text-dim); margin-left: 8px; }
.controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-dim); }
.field span { letter-spacing: 1.5px; text-transform: uppercase; }
.field select, .field input { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 13px; font-family: var(--font-sans); min-width: 150px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field select:disabled, .field input:disabled { opacity: 0.4; cursor: not-allowed; }
.field-check { justify-content: flex-end; }
.field-check input { min-width: 0; width: 22px; height: 22px; margin-bottom: 8px; accent-color: var(--accent); cursor: pointer; }

/* 取色色块（风格下拉左侧）：色块 + 当前取色值 */
.swatch-box { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; min-width: 150px; }
.swatch-dot { width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--line); background: transparent; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2); }
.swatch-val { font-size: 12.5px; font-family: 'SFMono-Regular', Menlo, Consolas, monospace; color: var(--text); letter-spacing: 0.5px; }

.btn { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 9px; padding: 9px 14px; font-size: 13px; cursor: pointer; transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.btn-ghost { background: transparent; }

/* ---------- Workspace ---------- */
.workspace { flex: 1; display: grid; grid-template-columns: minmax(320px, 1fr) 1.3fr; min-height: 0; }
.editor-pane { display: flex; flex-direction: column; border-right: 1px solid var(--line); padding: 16px; min-height: 0; }
.pane-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
/* Markdown 编辑区：浅底深字（与深色外壳形成对比，长时间编辑不刺眼） */
#input { flex: 1; resize: none; background: #faf7f0; color: #1f1c16; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7; min-height: 0; }
#input::placeholder { color: #9a927f; }
#input:focus { outline: none; border-color: var(--accent); }
.hint { margin-top: 10px; font-size: 11.5px; color: var(--text-dim); line-height: 1.6; }
.hint code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- Preview ---------- */
/* 预览画布用「不是纯白的白色」背景，让深色卡片边框能看清 */
.preview-pane { display: flex; flex-direction: column; min-height: 0; background: #e9e6e0; }
.stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; min-height: 0; overflow: hidden; background: repeating-linear-gradient(45deg, rgba(0,0,0,0.022) 0 12px, transparent 12px 24px), #e9e6e0; }
.card-frame { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28); border-radius: 6px; overflow: hidden; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px; border-top: 1px solid var(--line); background: var(--panel); color: var(--text); }
.counter { font-family: var(--font-serif); font-size: 15px; letter-spacing: 1px; min-width: 80px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  body { height: auto; overflow: auto; }
  .workspace { grid-template-columns: 1fr; }
  .editor-pane { border-right: none; border-bottom: 1px solid var(--line); }
  #input { min-height: 240px; }
}
