/* Visual-only desktop workbench pass. Existing DOM, routes and scripts stay intact. */
:root {
  --color-paper: #f6f7f9;
  --color-paper-soft: #f6f7f9;
  --color-surface: #fff;
  --color-surface-raised: #fff;
  --color-glass: #fff;
  --color-ink: #1f2329;
  --color-ink-soft: #5f6670;
  --color-muted: #8a8f98;
  --color-rule: #e7e9ed;
  --color-rule-strong: #dde1e7;
  --radius-control: 6px;
  --radius-card: 8px;
  --radius-float: 8px;
  --text-caption: 14px;
  --text-body: 14px;
  --text-item: 14px;
  --text-section: 16px;
  --text-title: 22px;
  --shadow-card: none;
  --shadow-float: none;
}

html, body { background: #f6f7f9; }
body { color: #1f2329; font-size: 14px; }
.studio { max-width: 1920px; padding: 16px 20px 32px; }
.topbar {
  min-height: 48px; padding: 0 16px; border: 1px solid #e7e9ed;
  border-radius: 8px; background: #fff; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.brand { gap: 9px; font-size: 14px; }
.brand strong { font-weight: 600; }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; font-size: 14px; }
.brand-mark svg { width: 16px; height: 16px; }
.privacy-pill { color: #8a8f98; font-size: 12px; font-weight: 500; }
.privacy-pill::before { width: 6px; height: 6px; background: #7e9b8c; }

.page-navigation {
  top: 16px; gap: 0; padding: 0; min-height: 47px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.page-navigation a {
  box-sizing: border-box; min-height: 47px; padding: 0 17px;
  border-bottom: 2px solid transparent; border-radius: 0;
  color: #7a8089; font-size: 14px; font-weight: 500;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}
.page-navigation a:hover { color: #1f2329; background: #f6f7f9; }
.page-navigation a[aria-current="page"] {
  color: var(--color-accent); background: #f4f7fb;
  border-bottom-color: var(--color-accent); box-shadow: none; font-weight: 600;
}

.workspace, .jc-studio .workspace {
  display: grid; grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas: "data plot" "settings plot";
  grid-template-rows: max-content max-content;
  column-gap: 16px; row-gap: 0; margin-top: 16px; align-items: start;
  align-content: start; position: relative;
}
.workspace::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 300px;
  border: 1px solid #e7e9ed; border-radius: 8px; background: #fff;
  pointer-events: none;
}
.left-panel, .center-panel, .right-panel {
  min-width: 0; border: 1px solid #e7e9ed; background: #fff; box-shadow: none;
}
.left-panel, .right-panel { padding: 16px; }
.left-panel, .right-panel { position: relative; z-index: 1; border: 0; border-radius: 0; background: transparent; }
.left-panel { grid-area: data; padding-bottom: 10px; }
.right-panel { grid-area: settings; padding-top: 10px; }
.center-panel { grid-area: plot; padding: 20px; border-radius: 8px; }
.section-heading, .right-heading, .preview-header { margin-bottom: 14px; }
.section-heading h1, .right-heading h2 { font-size: 16px; line-height: 1.35; font-weight: 600; letter-spacing: 0; }
.preview-header h2 { font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; }
.preview-meta { color: #8a8f98; font-size: 12px; }
.right-heading { padding-top: 16px; border-top: 1px solid #e7e9ed; }
.right-heading svg { width: 16px; height: 16px; color: #8a8f98; }

.upload-card, .jc-studio .upload-card {
  padding: 14px 12px; border: 1px dashed #cdd3db;
  border-radius: 6px; background: #fafbfc;
}
.upload-card strong { font-size: 14px; font-weight: 600; }
.upload-card p { margin: 2px 0 8px; font-size: 12px; }
.upload-icon, .jc-studio .upload-icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: #edf4fb; box-shadow: none;
}
.upload-icon svg { width: 17px; height: 17px; }
.upload-button, .jc-studio .upload-button {
  width: 100%; height: 36px; min-height: 36px; padding: 0 10px;
  border-radius: 6px; box-shadow: none; font-size: 14px; font-weight: 600;
}
.text-button, .jc-studio .text-button { min-height: 28px; padding: 0 7px; font-size: 13px; font-weight: 500; }
.panel-subtitle, .jc-studio .panel-subtitle {
  margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #e7e9ed;
  color: #5f6670; font-size: 13px; font-weight: 600;
}
.file-item { padding: 7px 0; font-size: 13px; }
.help-text, .hint, .mh-hint, .mh-status, .chart-status, .point-info,
.jc-studio .help-text, .jc-studio .hint, .jc-studio .chart-status, .jc-studio .point-info {
  color: #8a8f98; font-size: 12px; line-height: 1.5;
}
.help-text { margin-top: 10px; }

.paper-stage, .jc-studio .paper-stage {
  padding: 24px; border: 1px solid #e7e9ed; border-radius: 6px;
  background: #fff; box-shadow: none;
}
.paper-sheet { max-width: 100%; border: 1px solid #e5e7eb; background: #fff; box-shadow: none; }
.chart-tools { border: 1px solid #e7e9ed; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.chart-tools button { border-radius: 6px; }
.point-info { padding: 9px 12px; }
.chart-status { margin-top: 10px; }

.control-group { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e7e9ed; }
.control-group h3, .jc-studio .control-group h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
details.control-group { margin: 0; padding: 0; }
details.control-group > summary, .jc-studio .control-group > summary {
  min-height: 43px; padding: 10px 0; font-size: 15px; line-height: 1.4; font-weight: 600;
}
details.control-group[open] { padding-bottom: 12px; }
details.control-group > summary::after { width: 7px; height: 7px; border-width: 1.5px; }
.setting, .jc-studio .setting, .mh-setting { min-width: 0; margin: 0 0 11px; gap: 5px; }
.setting-label, .setting label, .mh-setting, .jc-studio .setting { color: #5f6670; font-size: 13px; font-weight: 500; }
.mh-field-grid, .jc-size-grid { gap: 0 10px; }
.setting input, .setting select, .setting button[role="combobox"],
.mh-setting input, .mh-setting select, .right-panel input[type="text"],
.right-panel input[type="number"], .right-panel select,
.jc-studio .setting input:not([type="checkbox"]), .jc-studio .setting select {
  box-sizing: border-box; width: 100%; height: 36px; min-height: 36px;
  padding: 0 10px; border: 1px solid #dde1e7; border-radius: 6px;
  background: #fff; box-shadow: none; color: #1f2329; font-size: 14px; font-weight: 400;
}
.jc-studio .curve-style-fields input[type="color"] { padding: 3px; }
.right-panel button[role="combobox"] { min-height: 36px; border-radius: 6px; box-shadow: none; }
.right-panel input:focus-visible, .right-panel select:focus-visible,
.right-panel button:focus-visible, .upload-card button:focus-visible,
.page-navigation a:focus-visible {
  outline: 1px solid var(--color-accent); outline-offset: 1px;
  border-color: var(--color-accent);
}
.right-panel button, .export-actions button, .upload-card button {
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.export-actions button:active, .right-panel button:active { transform: none; }
.export-row button, .wide-export, .dialog-actions button,
.right-panel button[data-slot="button"], .right-panel .reset-button {
  min-height: 36px; border-radius: 6px; box-shadow: none; font-size: 14px;
}
.export-row button, .wide-export { border-color: #dde1e7; }
.reset-button { font-size: 13px; }
.shape-choices { gap: 5px; }
.shape-choices button, .jc-studio .curve-style-item .shape-choices button {
  width: 100%; height: 36px; min-height: 36px; aspect-ratio: auto;
  border-radius: 6px; box-shadow: none;
}
.shape-choices button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--color-accent); }
.curve-style-item { padding: 10px 0; }
.curve-style-name { font-size: 13px; }
.jc-studio .check-setting { flex-direction: row; gap: 7px; margin: 10px 0; }
.jc-studio .check-setting input { width: 15px; height: 15px; min-height: 0; }
dialog { border-radius: 8px; padding: 20px; box-shadow: 0 6px 24px rgba(0,0,0,.1); }
dialog textarea { border-radius: 6px; font-size: 14px; }
.dialog-actions button { border-radius: 6px; }
.site-note { margin-top: 14px; font-size: 12px; }

@media (max-width: 950px) and (min-width: 761px) {
  .workspace, .jc-studio .workspace { grid-template-columns: 270px minmax(0, 1fr); column-gap: 12px; }
  .workspace::before { width: 270px; }
  .studio { padding-inline: 14px; }
  .center-panel { padding: 14px; }
  .paper-stage, .jc-studio .paper-stage { padding: 16px; }
}
@media (max-width: 760px) {
  .studio { padding: 12px 12px 28px; }
  .topbar { min-height: 48px; padding: 0 12px; border-radius: 8px; }
  .page-navigation { min-height: 42px; margin-top: 8px; border-bottom: 1px solid #e7e9ed; }
  .page-navigation a { min-height: 42px; padding: 0 5px; }
  .workspace, .jc-studio .workspace { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
  .workspace::before { display: none; }
  .center-panel { order: 0; padding: 14px; }
  .left-panel { order: 1; padding: 14px; border: 1px solid #e7e9ed; border-radius: 8px; }
  .right-panel { order: 2; padding: 14px; border: 1px solid #e7e9ed; border-radius: 8px; }
  .right-heading { padding-top: 0; border-top: 0; }
  .paper-stage, .jc-studio .paper-stage { padding: 12px; }
}
