:root {
  --outside: #f4f4f4;
  --app: #f3f3f3;
  --sidebar: #ffffff;
  --text: #000000;
  --muted: #8f8f8f;
  --line: #a5a5a5;
  --selected: #e7e7e7;
  --blue: #315f96;
  --action-black: #1d1d1f;
  --action-black-hover: #343437;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  --sidebar-width: 232px;
  --window-radius: 22px;
}

/* ESP32-S3-RLCD-4.2 live panel */
.esp-panel-workspace { display: flex; flex-direction: column; gap: 14px; padding: 16px; overflow: auto; }
.esp-panel-header-actions { display: flex; align-items: center; gap: 8px; }
.esp-panel-status-strip { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 16px; border: 1px solid #dfe5de; border-radius: 15px; background: rgba(247,249,246,.92); }
.esp-panel-page-bar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px; border: 1px solid #dfe5de; border-radius: 12px; background: rgba(245,247,244,.97); box-shadow: 0 4px 12px rgba(32,38,32,.04); }
.esp-panel-page-bar > button,.esp-panel-page-bar > div button { position: relative; min-height: 30px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: #626963; font-size: 11px; cursor: pointer; }
.esp-panel-page-bar > div { display: flex; gap: 4px; min-width: 0; overflow-x: auto; }
.esp-panel-page-bar button.active { background: #242824; color: #fff; box-shadow: 0 2px 7px rgba(25,30,25,.16); }
.esp-panel-page-bar button.device-current::after { position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: #4f8b5c; box-shadow: 0 0 0 2px rgba(79,139,92,.16); content: ""; }
.esp-panel-page-bar button.active.device-current::after { background: #aee6b9; box-shadow: none; }
.esp-panel-page-bar #espDesignerSendButton { margin-left: auto; padding: 0 12px; background: #315f96; color: #fff; font-weight: 700; }
.esp-panel-page-bar #espDesignerSendButton:disabled { background: #dfe6df; color: #667067; cursor: default; }
.esp-panel-page-bar #espDesignerShowHomeButton { padding: 0 10px; border: 1px solid #d3dad3; background: #fff; color: #4e574f; }
.esp-panel-page-bar > button[hidden] { display: none !important; }
.esp-panel-page-bar > span { padding: 0 8px; color: #737a74; font-size: 10px; white-space: nowrap; }
#espPanelHomeView[hidden],#espDesignerCard[hidden] { display: none !important; }
.esp-panel-device { display: flex; align-items: center; gap: 11px; }
.esp-panel-device div { display: grid; gap: 3px; }
.esp-panel-device strong { font-size: 13px; }
.esp-panel-device span:not(.esp-panel-dot) { color: #727873; font-size: 11px; }
.esp-panel-dot { width: 10px; height: 10px; border-radius: 50%; background: #a8ada8; box-shadow: 0 0 0 4px rgba(168,173,168,.16); }
.esp-panel-dot.online { background: #4f8b5c; box-shadow: 0 0 0 4px rgba(79,139,92,.15); }
.esp-panel-dot.waiting { background: #c59a42; box-shadow: 0 0 0 4px rgba(197,154,66,.15); }
.esp-panel-dot.offline { background: #a25252; box-shadow: 0 0 0 4px rgba(162,82,82,.15); }
.esp-panel-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(250px,.65fr); gap: 14px; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.esp-panel-card { min-width: 0; padding: 17px; border: 1px solid #e0e5df; border-radius: 17px; background: #fff; }
.esp-panel-grid > .esp-panel-card { min-height: 0; }
.esp-panel-preview-card,.esp-panel-connection-card { height: 100%; overflow-y: auto; scrollbar-width: thin; }
.esp-panel-connection-card { overscroll-behavior: contain; }
.esp-panel-card-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.esp-panel-card-heading p { margin: 0 0 3px; color: #888f88; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.esp-panel-card-heading h2 { margin: 0; font-size: 15px; }
.esp-panel-card-heading > span { color: #727873; font-size: 11px; }
.esp-screen-preview { aspect-ratio: 4/3; min-height: 300px; padding: 16px; border: 2px solid #262923; border-radius: 8px; background: #eef1df; color: #1c201a; box-shadow: inset 0 0 32px rgba(80,90,55,.08); font-family: ui-monospace,SFMono-Regular,Menlo,monospace; display: grid; grid-template-rows: auto 1fr auto; }
.esp-screen-top { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; align-items: center; padding-bottom: 11px; border-bottom: 2px solid currentColor; }
.esp-screen-top strong { grid-row: 1/3; font-size: clamp(28px,4vw,42px); line-height: 1; }
.esp-screen-top span { font-weight: 700; font-size: 13px; }
.esp-screen-top small { font-size: 9px; }
.esp-screen-body { display: grid; grid-template-columns: 1.7fr 1fr; gap: 13px; padding: 13px 0; }
.esp-screen-body > div + div { padding-left: 13px; border-left: 1px solid currentColor; }
.esp-screen-body b { display: block; margin-bottom: 9px; font-size: 10px; letter-spacing: .08em; }
.esp-preview-todos,.esp-preview-metrics { display: grid; gap: 8px; }
.esp-preview-todos span { display: grid; grid-template-columns: 12px 1fr auto; gap: 5px; align-items: center; padding-bottom: 7px; border-bottom: 1px solid rgba(28,32,26,.35); font-size: 11px; }
.esp-preview-todos span.is-done { opacity: .55; text-decoration: line-through; }
.esp-preview-todos i { font-style: normal; }
.esp-preview-todos small { font-size: 9px; }
.esp-preview-todos em { color: #62685e; font-size: 11px; font-style: normal; }
.esp-preview-metrics span { padding: 8px; border: 1px solid currentColor; border-radius: 4px; font-size: 10px; }
#espPreviewLiterature { overflow-wrap: anywhere; line-height: 1.5; }
.esp-screen-footer { display: flex; justify-content: space-between; gap: 10px; padding-top: 9px; border-top: 2px solid currentColor; font-size: 9px; font-weight: 700; }
.esp-panel-detail-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid #e6eae5; border-radius: 12px; background: #e6eae5; }
.esp-panel-detail-list > div { display: grid; gap: 5px; padding: 13px; background: #fafbfa; }
.esp-panel-detail-list span { color: #858b85; font-size: 10px; }
.esp-panel-detail-list strong { overflow-wrap: anywhere; font-size: 12px; }
.esp-panel-help { margin-top: 14px; padding: 14px; border-radius: 13px; background: #f1f4ef; }
.esp-panel-help strong { font-size: 12px; }
.esp-panel-help p { margin: 7px 0 0; color: #656b65; font-size: 11px; line-height: 1.65; }
.esp-designer-card { margin-bottom: 2px; }
.esp-designer-heading { align-items: center; }
.esp-designer-actions,.esp-designer-page-actions { display: flex; align-items: center; gap: 7px; }
.esp-designer-switch { display: flex; align-items: center; gap: 6px; color: #555d56; font-size: 11px; }
.esp-designer-switch input { accent-color: #252925; }
.esp-designer-layout { display: grid; grid-template-columns: 150px minmax(320px,1fr) 154px; gap: 13px; align-items: start; }
.esp-designer-library,.esp-designer-properties { display: grid; gap: 8px; padding: 12px; border: 1px solid #e1e6e0; border-radius: 12px; background: #f8faf8; }
.esp-designer-library > label,.esp-designer-properties label { color: #737a74; font-size: 10px; font-weight: 600; }
.esp-designer-library select,.esp-designer-library input,.esp-designer-properties input { width: 100%; height: 30px; margin-top: 4px; padding: 0 8px; border: 1px solid #d9dfd8; border-radius: 7px; background: #fff; color: #202420; font: inherit; }
.esp-designer-page-actions button,.esp-designer-component-buttons button { min-height: 29px; border: 1px solid #d9dfd8; border-radius: 7px; background: #fff; color: #343a35; font-size: 10px; cursor: pointer; }
.esp-designer-page-actions button { flex: 1; }

.day-board-actions { gap: 9px; align-items: center; }
.apple-reminders-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; border: 1px solid #d7dce5; border-radius: 10px; background: #fff; color: #33435d; font-size: 12px; font-weight: 650; cursor: pointer; }
.apple-reminders-button:hover { background: #f6f8fb; }
.apple-reminders-button:disabled { cursor: wait; opacity: .65; }
.apple-reminders-button span:first-child { color: #2f73d9; font-size: 10px; }
.apple-reminders-status { color: #858b85; font-size: 10px; }
.apple-reminders-status.is-error { color: #a25252; }
.miniapp-sync-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.miniapp-sync-actions button { min-height: 34px; }
.miniapp-pair-form { display: grid; gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid #dde4dc; border-radius: 12px; background: #f7f9f6; }
.miniapp-pair-form[hidden] { display: none; }
.miniapp-pair-form label { color: #646c65; font-size: 10px; font-weight: 700; }
.miniapp-pair-form > div { display: flex; gap: 8px; }
.miniapp-pair-form input { min-width: 0; flex: 1; height: 36px; padding: 0 10px; border: 1px solid #ccd4cc; border-radius: 9px; background: #fff; color: #252b26; font: inherit; font-size: 12px; }
.miniapp-pair-form p { margin: 0; color: #747c75; font-size: 10px; line-height: 1.55; }
.esp-panel-detail-list strong.is-error { color: #a25252; }
.timeline-source-label { display: inline-block; margin-right: 5px; padding: 0 5px; border-radius: 4px; background: rgba(255,255,255,.64); color: currentColor; font-size: 9px; font-weight: 700; line-height: 16px; vertical-align: 1px; }
.todo-source-notice { padding: 9px 11px; border: 1px solid #dce4ef; border-radius: 9px; background: #f5f8fc; color: #53657d; font-size: 11px; line-height: 1.5; }
.drawer-complete { display: none; border-color: #bfcfbe !important; background: #eff6ee !important; color: #315b35 !important; }
.drawer-complete.visible { display: inline-flex; }
.esp-designer-component-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.esp-designer-component-buttons #espDesignerImageButton { grid-column: 1/-1; }
.esp-designer-stage-wrap { min-width: 0; }
.esp-designer-stage-wrap > p { margin: 7px 0 0; color: #7b827c; font-size: 9px; text-align: center; }
.esp-designer-stage { position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden; border: 2px solid #292d28; border-radius: 7px; background-color: #eef1df; background-image: linear-gradient(rgba(30,35,28,.06) 1px, transparent 1px),linear-gradient(90deg,rgba(30,35,28,.06) 1px,transparent 1px); background-size: 5% 6.667%; color: #171b16; container-type: inline-size; }
.esp-designer-element { position: absolute; display: flex; align-items: flex-start; overflow: hidden; padding: 2px; border: 1px dashed transparent; background: transparent; color: inherit; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; line-height: 1.2; text-align: left; white-space: pre-line; cursor: grab; user-select: none; touch-action: none; }
.esp-designer-element:hover { border-color: rgba(28,32,26,.45); }
.esp-designer-element.selected { border: 2px solid #202420; background: rgba(255,255,255,.22); }
.esp-designer-resize-handle { position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 3px 0 0; background: #202420; box-shadow: 0 0 0 1px rgba(32,36,32,.3); cursor: nwse-resize; touch-action: none; }
.esp-designer-element.is-todos { flex-direction: column; gap: 2px; }
.esp-designer-element.is-todos span { display: block; width: 100%; overflow: hidden; border-bottom: 1px solid rgba(28,32,26,.35); text-overflow: ellipsis; white-space: nowrap; }
.esp-designer-element img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.esp-designer-properties > strong { min-height: 30px; font-size: 11px; }
.esp-designer-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.esp-designer-properties .esp-designer-lock-row { display: flex; align-items: center; gap: 7px; min-height: 28px; color: #4f5850; font-size: 10px; font-weight: 650; }
.esp-designer-properties .esp-designer-lock-row[hidden] { display: none; }
.esp-designer-properties .esp-designer-lock-row input { width: 15px; height: 15px; margin: 0; padding: 0; accent-color: #252925; }
.esp-designer-properties .danger-button { margin-top: 4px; }
.esp-designer-properties.is-empty label,.esp-designer-properties.is-empty button { opacity: .4; pointer-events: none; }
.literature-progress-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.literature-progress-fields[hidden] { display: none; }
@media (max-width: 1000px) {
  .esp-panel-grid { grid-template-columns: minmax(0,1.2fr) minmax(220px,.8fr); }
  .esp-screen-preview { min-height: 270px; }
  .esp-designer-layout { grid-template-columns: 132px minmax(290px,1fr); }
  .esp-designer-properties { grid-column: 1/-1; grid-template-columns: 150px repeat(3,1fr); align-items: end; }
  .esp-designer-properties .esp-designer-field-grid { display: contents; }
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--outside);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  color: var(--text);
}

button:focus,
input:focus,
textarea:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(49, 95, 150, 0.38);
  outline-offset: 2px;
}

.desktop-bg {
  height: 100vh;
  min-height: 0;
  padding: 0;
  background: var(--app);
}

.app-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--window-radius);
  background: var(--app);
  box-shadow: none;
  transition: grid-template-columns 180ms ease;
}

.app-frame.sidebar-collapsed {
  --sidebar-width: 0px;
}

.window-drag-region {
  display: none;
}

html[data-platform="darwin"] .window-drag-region {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: block;
  height: 64px;
  -webkit-app-region: drag;
}

.mind-workspace { display: grid; grid-template-columns: 160px minmax(0, 1fr); }
.mind-list-panel { min-height: 0; padding: 14px 10px; overflow-y: auto; border-right: 1px solid #e5e5e7; background: #fafafa; }
.mind-list-panel input { width: 100%; min-width: 0; padding: 8px; border: 1px solid #dedee1; border-radius: 8px; font-size: 12px; }
.mind-list-item { width: 100%; display: grid; gap: 6px; padding: 12px 10px; margin-top: 8px; text-align: left; border-radius: 10px; background: transparent; }
.mind-list-item.active { background: #e9e9eb; }
.mind-list-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mind-list-item span, .mind-list-empty { font-size: 11px; color: #777; }
.mind-list-empty { padding: 14px 4px; }
.mind-editor { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
.mind-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #ebebed; }
.mind-toolbar input { flex: 1; min-width: 100px; width: 100px; padding: 6px; font-weight: 600; font-size: 14px; border: 0; background: transparent; }
.mind-toolbar button { padding: 7px 10px; border-radius: 8px; font-size: 11px; background: #ededee; color: #252527; white-space: nowrap; }
.mind-actions { padding-top: 7px; padding-bottom: 7px; }
#mindChild { background: #1d1d1f; color: white; }
.mind-editor button:disabled { opacity: .38; cursor: default; }
.mind-canvas { position: relative; min-height: 0; overflow: hidden; background-color: #fcfcfd; background-image: radial-gradient(#dfe0e3 .8px, transparent .8px); background-size: 20px 20px; touch-action: none; cursor: grab; outline-offset: -3px; }
.mind-canvas:active { cursor: grabbing; }
.mind-scene { position: absolute; top: 0; left: 0; transform-origin: 0 0; width: 1px; height: 1px; }
#mindEdges { position: absolute; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
#mindEdges path { fill: none; stroke: #a7abb2; stroke-width: 2; }
.mind-node { position: absolute; min-width: 120px; min-height: 54px; border: 1px solid #d2d4d8; border-radius: 13px; background: #e5e7eb; color: #242426; font-size: 13px; line-height: 20px; box-shadow: 0 3px 9px #00000008; cursor: grab; user-select: none; z-index: 1; }
.mind-node.root { color: #fff; background: #1d1d1f; border-color: #1d1d1f; font-weight: 600; }
.mind-node.selected { outline: 2px solid #27272a; outline-offset: 4px; z-index: 12; }
.mind-node.editing { cursor: text; }
.mind-node-body { position: absolute; inset: 9px 11px; display: flex; flex-direction: column; justify-content: safe center; overflow: auto; scrollbar-width: thin; }
.mind-node-text { flex: 0 0 auto; min-height: 22px; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; cursor: inherit; outline: none; }
.mind-node-text[contenteditable="true"] { min-height: 30px; padding: 3px 5px; border-radius: 6px; background: rgba(255,255,255,.82); color: #1d1d1f; cursor: text; user-select: text; }
.mind-node-blocks { width: 100%; display: grid; gap: 7px; margin-top: 7px; }
.mind-node-block { position: relative; min-height: 44px; padding: 7px; border: 1px solid rgba(0,0,0,.14); border-radius: 8px; background: rgba(255,255,255,.78); color: #242426; font-weight: 400; user-select: text; }
.mind-block-remove { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0; border-radius: 6px; background: rgba(230,230,232,.92); color: #555; line-height: 18px; }
.mind-formula-preview { min-height: 25px; padding: 3px 22px 5px 2px; overflow-x: auto; font-family: "Times New Roman", "Cambria Math", serif; }
.mind-formula-source { width: 100%; min-height: 44px; padding: 5px 7px; resize: vertical; border: 1px solid #d8d8db; border-radius: 6px; background: #fff; color: #29292c; font: 11px/16px ui-monospace, SFMono-Regular, Menlo, monospace; }
.mind-node-block.image { display: grid; gap: 4px; padding: 5px; }
.mind-node-block.image img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 5px; background: #f5f5f6; }
.mind-node-block.image span { padding-right: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #777; }
.mind-reference-open { width: 100%; display: grid; gap: 2px; padding: 0 22px 0 0; text-align: left; background: transparent; color: #242426; }
.mind-reference-open span { color: #777; font-size: 9px; }
.mind-reference-open strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.mind-reference-open small { color: #737377; font-size: 9px; }
.mind-node-insert { position: absolute; left: 8px; bottom: -13px; z-index: 14; width: 25px; height: 25px; padding: 0; border: 1px solid #d3d3d6; border-radius: 50%; background: #fff; color: #252527; box-shadow: 0 2px 7px #0002; font-size: 15px; line-height: 23px; }
.mind-insert-menu { position: absolute; left: 0; top: calc(100% + 19px); z-index: 18; display: flex; gap: 4px; min-width: max-content; padding: 5px; border: 1px solid #dedee1; border-radius: 9px; background: rgba(255,255,255,.97); box-shadow: 0 8px 22px #0002; }
.mind-insert-menu button { padding: 6px 8px; border-radius: 6px; background: #efeff1; color: #252527; font-size: 10px; }
.mind-reference-picker { position: absolute; left: 0; top: calc(100% + 58px); z-index: 19; width: 230px; max-height: 190px; display: grid; gap: 3px; padding: 7px; overflow-y: auto; border: 1px solid #dedee1; border-radius: 9px; background: #fff; color: #252527; box-shadow: 0 8px 22px #0002; }
.mind-reference-picker > strong, .mind-reference-picker > span { padding: 4px 5px; font-size: 10px; }
.mind-reference-picker button { padding: 7px; overflow: hidden; border-radius: 6px; background: #f1f1f2; color: #252527; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.mind-slash-menu { position: absolute; left: 50%; top: calc(100% + 9px); z-index: 22; width: 210px; display: grid; gap: 3px; padding: 6px; transform: translateX(-50%); border: 1px solid #d8d8db; border-radius: 11px; background: rgba(255,255,255,.98); color: #252527; box-shadow: 0 10px 28px #0003; }
.mind-slash-option { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 7px; align-items: center; padding: 6px; border-radius: 7px; background: transparent; color: #252527; text-align: left; }
.mind-slash-option.active, .mind-slash-option:hover { background: #e9e9eb; }
.mind-slash-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: #f1f1f3; font-size: 12px; font-weight: 700; }
.mind-slash-option > span:last-child { min-width: 0; display: grid; }
.mind-slash-option strong { font-size: 11px; line-height: 15px; }
.mind-slash-option small { overflow: hidden; color: #77777c; font-size: 9px; line-height: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mind-resize-handle { position: absolute; z-index: 15; display: block; }
.mind-resize-handle.east { top: 15px; right: -5px; width: 10px; height: calc(100% - 30px); cursor: ew-resize; }
.mind-resize-handle.south { left: 15px; bottom: -5px; width: calc(100% - 30px); height: 10px; cursor: ns-resize; }
.mind-resize-handle.corner { right: -6px; bottom: -6px; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #2e2e31; cursor: nwse-resize; }
.mind-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 25px; text-align: center; font-size: 13px; color: #8b8b90; pointer-events: none; }
.mind-empty[hidden] { display: none; }
.mind-inspector { display: flex; gap: 10px; padding: 10px 12px; align-items: center; border-top: 1px solid #e5e5e7; font-size: 11px; }
.mind-inspector textarea { flex: 1; min-width: 0; padding: 8px; border: 1px solid #dedee1; border-radius: 8px; resize: none; height: 58px; font-size: 12px; }
.mind-color-label { display: grid; gap: 4px; }
.mind-color-label input { padding: 0; width: 30px; height: 25px; border: 0; background: none; }
.mind-footer { display: flex; gap: 8px; justify-content: space-between; padding: 6px 12px 10px; font-size: 10px; color: #888; }
@media (max-width: 1000px) { .mind-workspace { grid-template-columns: 130px minmax(0, 1fr); } .mind-footer > span:first-child { display: none; } .mind-toolbar { gap: 4px; } .mind-toolbar button { padding: 6px 8px; } }

.sidebar {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 28px;
  padding: 34px 24px 30px;
  border-radius: var(--window-radius) 0 0 var(--window-radius);
  background: var(--sidebar);
  box-shadow: 3px 0 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 2;
  transition: padding 180ms ease, box-shadow 180ms ease;
}

html[data-platform="darwin"] .sidebar {
  padding-top: 58px;
}

html[data-platform="darwin"] .app-frame,
html[data-platform="darwin"] .sidebar {
  border-radius: 0;
}

.sidebar-toggle-button {
  position: absolute;
  top: 16px;
  left: calc(var(--sidebar-width) - 40px);
  z-index: 12;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: #5c5c61;
  -webkit-app-region: no-drag;
  transition: left 180ms ease, background 120ms ease, color 120ms ease;
}

html[data-platform="darwin"] .sidebar-toggle-button {
  top: 14px;
}

.app-frame.sidebar-collapsed .sidebar-toggle-button {
  left: 18px;
}

html[data-platform="darwin"] .app-frame.sidebar-collapsed .sidebar-toggle-button {
  left: 88px;
}

.sidebar-toggle-button:hover {
  background: #ededee;
  color: #1d1d1f;
}

.sidebar-toggle-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  overflow: hidden;
  text-align: center;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  transition: opacity 120ms ease;
}

.app-frame.sidebar-collapsed .sidebar {
  width: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  min-height: 38px;
  border-radius: 12px;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-item.active {
  background: var(--selected);
}

.settings-button {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  width: max-content;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
}

.settings-button span:first-child {
  font-size: 18px;
}

.content {
  min-width: 0;
  min-height: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: var(--app);
}

.page {
  display: none;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.page.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.calendar-top {
  position: relative;
  z-index: 11;
  width: min(900px, calc(100% - 76px));
  margin: 24px auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding-left 180ms ease;
  pointer-events: none;
}

.calendar-top > * {
  pointer-events: auto;
  -webkit-app-region: no-drag;
}

.app-frame.sidebar-collapsed .calendar-top,
.app-frame.sidebar-collapsed .page-top {
  padding-left: 48px;
}

html[data-platform="darwin"] .app-frame.sidebar-collapsed .calendar-top,
html[data-platform="darwin"] .app-frame.sidebar-collapsed .page-top {
  padding-left: 118px;
}

.view-switch {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  border-radius: 10px;
  background: #e4e4e4;
}

.view-switch button {
  min-width: 29px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
}

.view-switch button.active {
  background: #ffffff;
}

.calendar {
  width: min(900px, calc(100% - 76px));
  height: calc(100% - 24px);
  min-height: 0;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: auto;
  background: #efefef;
}

.todo-view {
  display: none;
}

.todo-view.active {
  display: block;
  min-height: 0;
  overflow: hidden;
}

.weekday {
  height: 52px;
  display: grid;
  place-items: center;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--action-black);
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
}

.weekday:nth-child(7) {
  border-right: 0;
}

.day {
  position: relative;
  min-height: 101px;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: #efefef;
  text-align: left;
}

.day:nth-child(7n) {
  border-right: 0;
}

.day:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.day span {
  position: absolute;
  top: 11px;
  right: 13px;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
}

.day.muted span {
  color: #b0b0b0;
}

.day.today span {
  top: 7px;
  right: 7px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--action-black);
  color: #ffffff;
}

.day p {
  position: absolute;
  top: calc(44px + var(--event-index, 0) * 20px);
  left: 12px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}

.day.selected-day {
  background: #f8f8f8;
}

.day-board {
  --hour-height: 39px;
  position: relative;
  width: min(900px, calc(100% - 76px));
  height: calc(100% - 24px);
  min-height: 0;
  margin: 0 auto 24px;
  overflow-y: auto;
  padding: 20px 24px 24px;
  border: 1px solid #d8d8d8;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.13);
}

.day-board-actions {
  height: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.new-todo-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  background: transparent;
  color: #747474;
  font-size: 14px;
  font-weight: 500;
}

.new-todo-button:hover {
  color: var(--action-black);
}

.new-todo-button span:first-child {
  font-size: 20px;
  line-height: 14px;
  font-weight: 300;
}

.hour-timeline {
  position: relative;
  min-height: calc(var(--hour-height) * 16);
  padding: 0 10px 0 30px;
}

.hour-row {
  position: relative;
  height: var(--hour-height);
  display: grid;
  grid-template-columns: 76px 34px minmax(0, 1fr);
  align-items: start;
}

.hour-row.timeline-end-row {
  height: 1px;
}

.hour-label {
  transform: translateY(-8px);
  padding-right: 8px;
  text-align: right;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  color: #151515;
}

.hour-marker {
  position: relative;
  height: var(--hour-height);
  border-left: 2px solid #171717;
}

.hour-marker::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -5px;
  width: 7px;
  height: 7px;
  border: 2px solid #171717;
  border-radius: 50%;
  background: #ffffff;
}

.hour-row.timeline-end-row .hour-marker {
  height: 1px;
}

.hour-row.current-hour .hour-label {
  color: var(--blue);
}

.hour-row.current-hour .hour-marker::before {
  border-color: var(--blue);
  background: var(--blue);
}

.timeline-events {
  position: absolute;
  top: 0;
  right: 26px;
  bottom: 0;
  left: 140px;
  pointer-events: none;
}

.timeline-task {
  position: absolute;
  left: 0;
  width: min(430px, calc(100% - 10px));
  min-height: 34px;
  overflow: hidden;
  padding: 8px 12px;
  border-radius: 10px;
  background: #dfeee4;
  color: #173827;
  text-align: left;
  pointer-events: auto;
  transition: filter 120ms ease, transform 120ms ease;
}

.timeline-task:hover {
  filter: brightness(0.98);
  transform: translateX(2px);
}

.timeline-task.is-done {
  opacity: 0.55;
}

.timeline-task.is-done .timeline-task-title {
  text-decoration: line-through;
}

.timeline-task.event-blue {
  background: #dfe9f4;
  color: #19364f;
}

.timeline-task.event-sand {
  background: #ebe5db;
  color: #45392c;
}

.timeline-task.event-rose {
  background: #f0e0e2;
  color: #543034;
}

.timeline-task-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 17px;
  font-weight: 700;
}

.timeline-task-time {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 15px;
  font-weight: 500;
  opacity: 0.68;
}

.timeline-task.compact-event {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
}

.timeline-task.compact-event .timeline-task-title {
  min-width: 0;
  flex: 1;
  font-size: 12px;
  line-height: 16px;
}

.timeline-task.compact-event .timeline-task-time {
  flex: none;
  margin-top: 0;
  white-space: nowrap;
  font-size: 10px;
  line-height: 14px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  visibility: hidden;
  background: rgba(28, 28, 30, 0.025);
  -webkit-backdrop-filter: blur(0.5px);
  backdrop-filter: blur(0.5px);
  opacity: 0;
  cursor: default;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.todo-drawer {
  position: fixed;
  z-index: 21;
  top: var(--popover-top, 82px);
  left: var(--popover-left, calc(50vw - 180px));
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0.5px solid rgba(80, 80, 84, 0.26);
  border-radius: 18px;
  background: rgba(246, 246, 248, 0.9);
  -webkit-backdrop-filter: blur(40px) saturate(165%);
  backdrop-filter: blur(40px) saturate(165%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.17), 0 2px 5px rgba(0, 0, 0, 0.07);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px) scale(0.99);
  transform-origin: var(--popover-pointer-left, 50%) top;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 140ms ease, visibility 180ms ease;
}

.todo-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.todo-drawer::before {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(var(--popover-pointer-left, 50%) - 7px);
  width: 14px;
  height: 14px;
  border-top: 0.5px solid rgba(80, 80, 84, 0.26);
  border-left: 0.5px solid rgba(80, 80, 84, 0.26);
  background: rgba(246, 246, 248, 0.96);
  transform: rotate(45deg);
}

.todo-drawer.opens-above {
  transform-origin: var(--popover-pointer-left, 50%) bottom;
}

.todo-drawer.opens-above::before {
  top: auto;
  bottom: -7px;
  border: 0;
  border-right: 0.5px solid rgba(80, 80, 84, 0.26);
  border-bottom: 0.5px solid rgba(80, 80, 84, 0.26);
}

.drawer-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.todo-drawer form {
  position: relative;
  z-index: 1;
  max-height: min(520px, calc(100vh - 24px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: inherit;
}

.drawer-header {
  position: relative;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 40px 10px;
  border-bottom: 0.5px solid rgba(80, 80, 84, 0.2);
  text-align: center;
}

.drawer-header > div::before,
.compact-dialog header > div::before {
  content: attr(data-popover-icon);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin: 0 auto 5px;
  border-radius: 50%;
  background: rgba(208, 208, 212, 0.68);
  color: #4d4d50;
  font-size: 15px;
  line-height: 1;
  font-weight: 650;
}

.drawer-eyebrow {
  margin-bottom: 2px;
  color: #868686;
  font-size: 9px;
  font-weight: 600;
}

.drawer-header h2 {
  font-size: 15px;
}

.drawer-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(214, 214, 217, 0.72);
  color: #68686c;
  font-size: 16px;
  line-height: 21px;
  font-weight: 300;
}

.drawer-fields {
  overflow-y: auto;
  padding: 12px 14px 4px;
}

.drawer-field {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.drawer-field > span,
.color-picker legend {
  color: #565656;
  font-size: 10px;
  font-weight: 600;
}

.drawer-field input,
.drawer-field select,
.drawer-field textarea {
  width: 100%;
  border: 0.5px solid rgba(120, 120, 124, 0.34);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
  color: #111111;
  font-size: 12px;
}

.drawer-field input {
  height: 32px;
  padding: 0 9px;
}

.drawer-field select {
  height: 32px;
  padding: 0 26px 0 9px;
}

.drawer-field textarea {
  height: 76px;
  min-height: 62px;
  padding: 8px 9px;
  resize: vertical;
}

.drawer-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.color-picker {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}

.color-options {
  display: flex;
  gap: 9px;
  margin-top: 6px;
}

.color-options label {
  position: relative;
  display: block;
  cursor: pointer;
}

.color-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-swatch {
  width: 22px;
  height: 22px;
  display: block;
  border: 2px solid transparent;
  border-radius: 50%;
  background: #dfeee4;
  box-shadow: inset 0 0 0 2px #ffffff;
}

.color-swatch.blue { background: #dfe9f4; }
.color-swatch.sand { background: #ebe5db; }
.color-swatch.rose { background: #f0e0e2; }

.color-options input:checked + .color-swatch {
  border-color: var(--blue);
}

.drawer-footer {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  border-top: 0.5px solid rgba(80, 80, 84, 0.2);
  background: rgba(250, 250, 251, 0.54);
}

.drawer-footer-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.drawer-footer button {
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
}

.drawer-cancel {
  background: #ececec;
}

.drawer-save {
  min-width: 56px;
  background: var(--action-black);
  color: #ffffff;
}

.drawer-delete {
  display: none;
  padding: 0 4px !important;
  background: transparent;
  color: #c94242;
}

.drawer-delete.visible {
  display: block;
}

.year-grid {
  width: min(900px, calc(100% - 76px));
  height: calc(100% - 24px);
  min-height: 0;
  margin: 0 auto 24px;
  overflow-y: auto;
  padding: 2px 2px 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.month-card {
  min-height: 134px;
  padding: 16px;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.month-card h2 {
  font-size: 18px;
}

.month-card p {
  margin-top: 42px;
  color: #707070;
  font-size: 13px;
  font-weight: 600;
}

.blue-button {
  min-width: 116px;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--action-black);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.blue-button:hover,
.drawer-save:hover {
  background: var(--action-black-hover);
}

.blue-button:active,
.drawer-save:active {
  background: #000000;
}

.page-top {
  position: relative;
  z-index: 11;
  width: min(900px, calc(100% - 76px));
  min-height: 36px;
  margin: 24px auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: padding-left 180ms ease;
  pointer-events: none;
}

.page-top > * {
  pointer-events: auto;
  -webkit-app-region: no-drag;
}

.page-kicker,
.panel-kicker {
  margin-bottom: 2px;
  color: #858585;
  font-size: 10px;
  line-height: 12px;
  font-weight: 600;
}

.page-top h1 {
  font-size: 22px;
  line-height: 24px;
}

.workspace-board {
  width: min(900px, calc(100% - 76px));
  height: calc(100% - 24px);
  min-height: 0;
  margin: 0 auto 24px;
  overflow: hidden;
  border: 1px solid #d8d8d8;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.13);
}

.collection-workspace {
  display: grid;
  grid-template-rows: auto 1fr;
}

.workspace-toolbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px 13px;
  border-bottom: 1px solid #e5e5e5;
}

.workspace-toolbar h2 {
  font-size: 16px;
  line-height: 20px;
}

.record-count {
  display: block;
  margin-top: 2px;
  color: #8a8a8a;
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
}

.search-input {
  width: 210px;
  height: 34px;
  border: 1px solid #dedede;
  border-radius: 9px;
  background: #f7f7f7;
  padding: 0 12px;
  color: #222222;
  font-size: 12px;
}

.record-list {
  min-height: 0;
  overflow-y: auto;
  padding: 0 20px;
}

.record-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #ececec;
}

.record-accent {
  width: 4px;
  height: 32px;
  border-radius: 4px;
  background: #b9cce1;
}

.record-accent.green { background: #b9d5c2; }
.record-accent.sand { background: #d8ccba; }
.record-accent.rose { background: #dfc0c4; }

.record-main {
  min-width: 0;
  display: block;
  padding: 12px 0;
  background: transparent;
  text-align: left;
}

.record-main strong,
.setting-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 19px;
  font-weight: 700;
}

.record-main span,
.setting-row div span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #777777;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
}

.record-meta {
  color: #8a8a8a;
  font-size: 11px;
  font-weight: 500;
}

.record-action {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: #eeeeee;
  color: #555555;
  font-size: 11px;
  font-weight: 600;
}

.record-row:hover {
  background: #fafafa;
}

.planning-panel-workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.planning-list-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-right: 1px solid #e4e4e4;
  background: #fafafa;
}

.planning-list-heading {
  min-height: 68px;
  padding: 13px 14px 10px;
  border-bottom: 1px solid #e7e7e7;
}

.planning-list-heading > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.planning-list-heading h2 {
  font-size: 14px;
  line-height: 18px;
}

.planning-list-heading span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ececec;
  color: #666666;
  font-size: 10px;
  font-weight: 700;
}

.planning-list-heading select,
.planning-search-input {
  width: 100%;
  height: 31px;
  padding: 0 28px 0 9px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background: #ffffff;
  color: #555555;
  font-size: 10px;
  font-weight: 600;
}

.planning-search-input {
  width: auto;
  margin: 10px 12px 4px;
  padding-right: 9px;
  background: #f4f4f4;
}

.planning-list {
  min-height: 0;
  overflow-y: auto;
  padding: 5px 8px 12px;
}

.planning-list-item {
  width: 100%;
  min-height: 62px;
  display: block;
  margin-bottom: 4px;
  padding: 10px 11px;
  border-radius: 11px;
  background: transparent;
  text-align: left;
}

.planning-list-item:hover {
  background: #eeeeee;
}

.planning-list-item.active {
  background: #e6e9ed;
}

.planning-list-item strong,
.planning-list-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-list-item strong {
  font-size: 12px;
  line-height: 17px;
}

.planning-list-item span {
  margin-top: 4px;
  color: #858585;
  font-size: 9px;
  line-height: 13px;
  font-weight: 600;
}

.planning-list-item.is-done strong {
  color: #8a8a8a;
  text-decoration: line-through;
}

.planning-editor-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 70px;
}

.planning-editor-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 58%) minmax(0, 42%);
}

.planning-primary-column,
.planning-secondary-column {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}

.planning-primary-column {
  border-right: 1px solid #e5e5e5;
}

.planning-secondary-column {
  background: #fcfcfc;
}

.planning-link-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.planning-content-block textarea {
  width: 100%;
  min-height: 170px;
  padding: 12px;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #ffffff;
  font-size: 12px;
  line-height: 1.65;
  resize: vertical;
}

.planning-panel-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.planning-panel-field > span {
  color: #777777;
  font-size: 9px;
  line-height: 13px;
  font-weight: 600;
}

.planning-panel-field input,
.planning-panel-field select {
  width: 100%;
  height: 35px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid #dedede;
  border-radius: 9px;
  background: #ffffff;
  font-size: 11px;
}

.planning-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 9px;
}

.planning-date-field {
  grid-column: 1 / -1;
}

.planning-items-section {
  margin-top: 24px;
}

.planning-items-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.planning-items-heading strong,
.planning-items-heading span {
  display: block;
}

.planning-items-heading strong {
  font-size: 13px;
  line-height: 18px;
}

.planning-items-heading span {
  margin-top: 2px;
  color: #8a8a8a;
  font-size: 10px;
  line-height: 14px;
}

.planning-items-heading button {
  height: 29px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--action-black);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.planning-items-head,
.planning-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(60px, 0.7fr) minmax(0, 1fr) 26px;
  gap: 7px;
  align-items: center;
}

.planning-items-head {
  padding: 0 2px 5px;
  color: #8a8a8a;
  font-size: 9px;
  font-weight: 600;
}

.planning-items-list {
  display: grid;
  gap: 7px;
}

.planning-item-row input {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #ffffff;
  font-size: 11px;
}

.planning-item-row button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eeeeee;
  color: #777777;
  font-size: 16px;
  line-height: 24px;
}

.planning-action-bar {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid #dedede;
  background: #f8f8f8;
}

.planning-action-bar > span {
  overflow: hidden;
  color: #8b8b8b;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.planning-action-bar > div {
  display: flex;
  gap: 8px;
}

.planning-action-bar .secondary-button,
.planning-action-bar .blue-button {
  height: 36px;
}

#deletePlanButton {
  visibility: hidden;
}

#deletePlanButton.visible {
  visibility: visible;
}

.timeline-plan-label {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(29, 29, 31, 0.12);
  color: inherit;
  font-size: 9px;
  line-height: 13px;
  font-weight: 800;
}

.empty-state {
  min-height: 240px;
  display: grid;
  place-items: center;
  color: #969696;
  font-size: 13px;
}

.experiment-workspace {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
}

.experiment-switcher {
  height: 72px;
  display: grid;
  grid-template-columns: auto minmax(160px, 250px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  border-bottom: 1px solid #e4e4e4;
  background: #fafafa;
}

.experiment-switcher-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555555;
  font-size: 11px;
  font-weight: 600;
}

.experiment-switcher-label strong {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e9e9e9;
  color: #666666;
  font-size: 11px;
  font-weight: 700;
}

.experiment-select {
  width: 100%;
  height: 34px;
  border: 1px solid #dcdcdc;
  border-radius: 9px;
  background: #ffffff;
  padding: 0 10px;
  color: #222222;
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

.experiment-switcher-title {
  min-width: 0;
  padding-left: 4px;
}

.experiment-switcher-title h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 19px;
}

.experiment-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 42% 58%;
}

.experiment-plan-panel,
.experiment-run-panel {
  min-width: 0;
  min-height: 0;
}

.experiment-plan-panel {
  overflow-y: auto;
  border-right: 1px solid #e4e4e4;
  background: #fcfcfc;
}

.experiment-run-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #ffffff;
}

.experiment-panel-heading {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #e5e5e5;
}

.experiment-panel-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.experiment-panel-heading h2 {
  font-size: 15px;
  line-height: 19px;
}

.panel-index {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7edf4;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.compact-heading {
  min-height: 48px;
  padding: 8px 0;
  border-bottom: 0;
}

.text-danger {
  visibility: hidden;
  padding: 5px;
  background: transparent;
  color: #c94242;
  font-size: 11px;
  font-weight: 600;
}

.text-danger.visible {
  visibility: visible;
}

.experiment-form {
  display: grid;
  gap: 12px;
  padding: 15px 18px 18px;
}

.experiment-form label,
.schedule-fields label {
  display: grid;
  gap: 6px;
}

.experiment-form label > span,
.schedule-fields label > span {
  color: #4f4f4f;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
}

.experiment-form input,
.experiment-form textarea,
.schedule-fields input {
  width: 100%;
  border: 1px solid #dfdfdf;
  border-radius: 8px;
  background: #ffffff;
  color: #151515;
  font-size: 12px;
}

.experiment-form input,
.schedule-fields input {
  height: 34px;
  padding: 0 10px;
}

.experiment-form textarea {
  padding: 9px 10px;
  resize: vertical;
}

.purpose-field {
  min-height: 72px;
}

.experiment-pair-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.experiment-pair-fields textarea {
  min-height: 92px;
}

.steps-field {
  min-height: 142px;
}

.run-section {
  padding: 0 18px;
}

.time-control-section {
  padding-bottom: 14px;
}

.duration-label {
  padding: 5px 8px;
  border-radius: 8px;
  background: #e4efe7;
  color: #37704a;
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
}

.schedule-fields {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 9px;
}

.duration-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
}

.duration-presets > span {
  margin-right: 2px;
  color: #777777;
  font-size: 10px;
  font-weight: 600;
}

.duration-presets button {
  height: 27px;
  padding: 0 9px;
  border-radius: 7px;
  background: #eeeeee;
  color: #565656;
  font-size: 10px;
  font-weight: 600;
}

.duration-presets button:hover,
.duration-presets button.active {
  background: var(--action-black);
  color: #ffffff;
}

.schedule-visual {
  display: grid;
  grid-template-columns: auto minmax(30px, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  color: #707070;
  font-size: 10px;
  font-weight: 600;
}

.schedule-visual i {
  position: relative;
  height: 2px;
  border-radius: 2px;
  background: #c7d3df;
}

.schedule-visual i::before,
.schedule-visual i::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.schedule-visual i::before { left: 0; }
.schedule-visual i::after { right: 0; }

.experiment-records-section {
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid #e5e5e5;
}

.records-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.add-record-button {
  padding: 5px 0;
  background: transparent;
  color: var(--action-black);
  font-size: 10px;
  font-weight: 700;
}

.experiment-record-list {
  max-height: 278px;
  overflow-y: auto;
  padding: 2px 1px 12px 0;
}

.experiment-record-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.experiment-record-number {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--action-black);
  border-radius: 50%;
  background: var(--action-black);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

.experiment-record-row textarea {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #dddddd;
  border-radius: 0;
  background: transparent;
  color: #222222;
  font-size: 11px;
  line-height: 16px;
  resize: none;
}

.remove-record-button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eeeeee;
  color: #777777;
  font-size: 15px;
  line-height: 22px;
}

.form-button {
  min-width: 112px;
}

.editor-footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid #e5e5e5;
}

.editor-footer > span {
  color: #919191;
  font-size: 10px;
  font-weight: 500;
}

/* Experiment workspace */
[data-page-panel="experiments"] > .page-top,
[data-page-panel="experiments"] > .experiment-workspace {
  width: calc(100% - clamp(48px, 4vw, 76px));
}

.experiment-workspace {
  --experiment-list-width: 208px;
  position: relative;
  height: calc(100% - 24px);
  display: grid;
  grid-template-columns: var(--experiment-list-width) 6px minmax(0, 1fr);
  grid-template-rows: 1fr;
  transition: grid-template-columns 180ms ease;
}

.experiment-workspace.experiment-list-collapsed {
  grid-template-columns: 0 0 minmax(0, 1fr);
}

.experiment-list-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #fafafa;
  transition: opacity 140ms ease;
}

.experiment-workspace.experiment-list-collapsed .experiment-list-panel {
  opacity: 0;
  pointer-events: none;
}

.experiment-workspace.experiment-list-collapsed .workspace-split-handle {
  visibility: hidden;
  pointer-events: none;
}

.experiment-list-toggle-button {
  position: absolute;
  top: 10px;
  left: calc(var(--experiment-list-width) - 38px);
  z-index: 8;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  background: rgba(244, 244, 246, 0.94);
  color: #5c5c61;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: left 180ms ease, background 120ms ease, color 120ms ease;
}

.experiment-list-toggle-button:hover {
  background: #e7e7e9;
  color: #1d1d1f;
}

.experiment-list-toggle-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.experiment-workspace.experiment-list-collapsed .experiment-list-toggle-button {
  left: 10px;
  background: rgba(247, 247, 248, 0.96);
}

.experiment-workspace.experiment-list-collapsed .experiment-primary-column {
  padding-top: 52px;
}

.split-handle {
  position: relative;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: #ececee;
  cursor: col-resize;
  touch-action: none;
  z-index: 5;
}

.split-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 32px;
  border-radius: 2px;
  background: #c3c3c7;
  transform: translate(-50%, -50%);
  transition: height 120ms ease, background 120ms ease;
}

.split-handle:hover::after,
.split-handle:focus-visible::after,
body.resizing-columns .split-handle::after {
  height: 48px;
  background: #7f9fc2;
}

body.resizing-columns {
  cursor: col-resize;
  user-select: none;
}

.experiment-list-heading {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-bottom: 1px solid #e2e2e2;
}

.experiment-list-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding-right: 34px;
}

.experiment-list-heading h2 {
  font-size: 13px;
}

.experiment-list-title-row > span {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e7e7e7;
  color: #666666;
  font-size: 9px;
  font-weight: 700;
}

.experiment-list-tools {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 29px;
  gap: 5px;
}

.experiment-sort-compact {
  position: relative;
  width: 29px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #d3d3d7;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #f2f2f4);
  color: #67676c;
  cursor: pointer;
}

.experiment-sort-compact:hover,
.experiment-sort-compact:focus-within {
  border-color: #b8b8bd;
  background: #ededf0;
  color: #1d1d1f;
}

.experiment-sort-compact svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.experiment-sort-compact select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
  -webkit-appearance: none;
  appearance: none;
}

.experiment-sort-compact option {
  color: #313135;
}

.experiment-list-search {
  width: 100%;
  height: 27px;
  padding: 0 8px 0 26px;
  border: 1px solid #d3d3d7;
  border-radius: 7px;
  background:
    radial-gradient(circle at 10px 11px, transparent 4px, #838388 4.5px, #838388 5.5px, transparent 6px),
    linear-gradient(45deg, transparent 47%, #838388 48%, #838388 62%, transparent 63%) 15px 16px / 6px 6px no-repeat,
    #ffffff;
  color: #313135;
  font-size: 9px;
}

.experiment-list-search::placeholder {
  color: #96969b;
}

.experiment-list {
  min-height: 0;
  overflow-y: auto;
  padding: 9px;
}

.experiment-list-item {
  width: 100%;
  min-height: 55px;
  display: grid;
  align-content: center;
  gap: 3px;
  margin-bottom: 5px;
  padding: 9px 11px;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}

.experiment-list-item.active {
  background: #e5ebf2;
}

.experiment-list-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.experiment-list-item span {
  color: #858585;
  font-size: 9px;
  line-height: 13px;
}

.experiment-editor-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 62px;
  background: #ffffff;
}

.experiment-editor-grid {
  --experiment-default-primary-ratio: 0.66;
  --experiment-primary-width: 66%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--experiment-primary-width) 6px minmax(0, 1fr);
}

.experiment-primary-column,
.experiment-secondary-column {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: clip;
  padding: 18px 20px;
}

.experiment-primary-column {
  border-right: 0;
}

.experiment-secondary-column {
  --preparation-columns: 18px minmax(0, 1.4fr) minmax(0, 0.65fr) minmax(0, 0.55fr) 18px;
}

.experiment-main-field,
.experiment-time-fields {
  display: grid;
  gap: 6px;
}

.experiment-main-field > span,
.experiment-block-heading h2 {
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.experiment-main-field input,
.experiment-time-fields input,
.dynamic-row input,
.dynamic-row textarea,
.plate-well-editor input {
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background: #ffffff;
  color: #1f1f1f;
  font-size: 11px;
}

.experiment-main-field input,
.experiment-time-fields input,
.dynamic-row input,
.plate-well-editor input {
  height: 34px;
  padding: 0 10px;
}

.experiment-block {
  margin-top: 18px;
}

.experiment-block-heading {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.experiment-block-heading > span {
  color: #8b8b8b;
  font-size: 9px;
  font-weight: 600;
}

.dynamic-form-list {
  display: grid;
  gap: 8px;
}

.dynamic-row {
  display: grid;
  align-items: center;
  gap: 8px;
}

.step-row,
.result-row {
  grid-template-columns: 18px minmax(0, 1fr) 20px;
}

.step-row {
  align-items: start;
}

.step-row > .dynamic-index,
.step-row > .remove-dynamic-button {
  margin-top: 10px;
}

.item-row-editor {
  min-width: 0;
  grid-template-columns: var(--preparation-columns);
  grid-template-areas: "index name quantity location remove";
  align-items: start;
  gap: 4px;
}

.item-row-editor .dynamic-index {
  grid-area: index;
}

.item-row-editor .item-name-field {
  grid-area: name;
}

.item-row-editor .item-quantity-field {
  grid-area: quantity;
}

.item-row-editor .item-location-field {
  grid-area: location;
}

.item-row-editor .remove-dynamic-button {
  grid-area: remove;
}

.item-row-editor .experiment-detail-field {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
  font-size: 10px;
}

.group-row-editor {
  min-width: 0;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.65fr) 22px;
  align-items: start;
}

.dynamic-row .experiment-detail-field {
  min-width: 0;
  min-height: 36px;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  resize: none;
}

.item-row-editor > .dynamic-index,
.item-row-editor > .remove-dynamic-button,
.group-row-editor > .remove-dynamic-button {
  margin-top: 9px;
}

.dynamic-index {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--action-black);
  color: #ffffff;
  font-size: 7px;
  line-height: 1;
  font-weight: 700;
}

.dynamic-row textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  line-height: 16px;
  resize: vertical;
}

.step-row textarea,
.result-row textarea {
  min-height: 38px;
}

.step-row textarea {
  overflow-y: hidden;
  resize: none;
}

.step-content {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.step-linked-content {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.step-linked-table-list:empty,
.step-linked-module-list:empty,
#experimentTableList:empty,
#experimentModuleList:empty {
  display: none;
}

.step-linked-table-list,
.step-linked-module-list {
  margin-top: 4px;
}

.step-formula-preview {
  display: none;
  padding: 9px 11px;
  border: 1px solid #e0e0e3;
  border-radius: 9px;
  background: #f8f8fa;
}

.step-formula-preview.visible {
  display: block;
}

.formula-preview-label {
  display: block;
  margin-bottom: 5px;
  color: #8a8a8f;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.scientific-rich-text {
  color: #252528;
  font-size: 11px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.scientific-math-inline,
.scientific-math-display {
  font-family: "Times New Roman", "STIX Two Math", "Cambria Math", serif;
  color: #111113;
}

.scientific-math-inline {
  display: inline-flex;
  align-items: center;
  min-height: 1.4em;
  padding: 0 2px;
  font-size: 1.08em;
  white-space: nowrap;
}

.scientific-math-display {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  margin: 7px auto;
  padding: 6px 12px;
  font-size: 1.22em;
  line-height: 1.5;
  text-align: center;
}

.scientific-rich-text sub,
.scientific-rich-text sup {
  position: relative;
  font-size: 0.72em;
  line-height: 0;
}

.scientific-rich-text sub {
  bottom: -0.2em;
}

.scientific-rich-text sup {
  top: -0.35em;
}

.math-fraction {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  margin: 0 0.18em;
  vertical-align: middle;
}

.math-fraction > span {
  min-width: 1.2em;
  padding: 0 0.22em;
  line-height: 1.2;
  text-align: center;
}

.math-fraction > span:first-child {
  border-bottom: 1px solid currentColor;
}

.math-root {
  display: inline-flex;
  align-items: flex-start;
}

.math-root-sign {
  font-size: 1.28em;
  line-height: 1;
}

.math-radicand {
  padding: 0 0.15em;
  border-top: 1px solid currentColor;
}

.math-text {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 0.9em;
}

.math-space {
  display: inline-block;
  width: 0.55em;
}

.math-space.wide {
  width: 1.1em;
}

.step-rendered-view {
  display: none;
  min-height: 38px;
  padding: 7px 10px;
}

.empty-rendered-step {
  color: #a0a0a5;
}

.experiment-editor-shell.view-mode .step-content textarea,
.experiment-editor-shell.view-mode .step-formula-preview {
  display: none;
}

.experiment-editor-shell.view-mode .step-rendered-view {
  display: block;
}

.remove-dynamic-button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eeeeee;
  color: #747474;
  font-size: 12px;
  line-height: 16px;
}

.inline-actions {
  display: flex;
  gap: 8px;
  margin: 9px 0 0 28px;
}

.inline-actions button,
.small-add-button {
  padding: 4px 8px;
  border-radius: 7px;
  background: #e9e9e9;
  color: #666666;
  font-size: 9px;
  font-weight: 600;
}

.formula-input-hint {
  margin: 7px 0 0 28px;
  color: #8a8a8f;
  font-size: 7px;
  line-height: 12px;
}

.experiment-table-list {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.experiment-table-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dddddf;
  border-radius: 11px;
  background: #fbfbfc;
}

.experiment-table-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.experiment-table-title {
  min-width: 92px;
  max-width: 220px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #d8d8dc;
  border-radius: 7px;
  background: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

.experiment-table-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.experiment-table-selection-status {
  min-width: 82px;
  color: #77777c;
  font-size: 8px;
  text-align: center;
  white-space: nowrap;
}

.experiment-step-placement-select {
  max-width: 150px;
  text-overflow: ellipsis;
}

.experiment-table-toolbar select,
.experiment-table-toolbar button {
  height: 27px;
  padding: 0 7px;
  border: 1px solid #d7d7da;
  border-radius: 7px;
  background: #ffffff;
  color: #55555a;
  font-size: 8px;
  white-space: nowrap;
}

.experiment-table-toolbar button:last-child {
  color: #b64a4a;
}

.experiment-table-toolbar button:disabled {
  opacity: 0.36;
}

.experiment-data-table-scroller {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.experiment-data-table {
  width: 100%;
  min-width: calc(var(--table-columns, 3) * 76px);
  border-collapse: collapse;
  table-layout: fixed;
}

.experiment-data-table th,
.experiment-data-table td {
  position: relative;
  min-width: 72px;
  padding: 0;
  background: #ffffff;
}

.experiment-editor-shell:not(.view-mode) .experiment-data-table th.selected,
.experiment-editor-shell:not(.view-mode) .experiment-data-table td.selected {
  z-index: 1;
  background: #e9eaec;
  box-shadow: inset 0 0 0 2px #1d1d1f;
}

.experiment-editor-shell:not(.view-mode) .experiment-data-table th.selection-anchor,
.experiment-editor-shell:not(.view-mode) .experiment-data-table td.selection-anchor {
  box-shadow: inset 0 0 0 2px #1d1d1f, inset 0 0 0 4px #ffffff;
}

.experiment-editor-shell:not(.view-mode) .experiment-data-table th.selected input,
.experiment-editor-shell:not(.view-mode) .experiment-data-table td.selected input {
  background: rgba(29, 29, 31, 0.035);
}

.experiment-data-table th {
  font-weight: 700;
}

.experiment-data-table input {
  width: 100%;
  min-width: 70px;
  height: 32px;
  padding: 4px 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #28282b;
  font-size: 9px;
}

.experiment-table-cell-content {
  position: relative;
  min-width: 70px;
}

.experiment-table-clipboard-message {
  min-height: 13px;
  margin-top: 5px;
  color: #7c7c81;
  font-size: 8px;
  line-height: 13px;
}

.experiment-table-selecting,
.experiment-table-selecting * {
  cursor: crosshair !important;
  user-select: none !important;
}

.experiment-table-cell-rendered {
  display: none;
  min-height: 32px;
  padding: 5px 7px;
  font-size: 9px;
  line-height: 20px;
}

.experiment-table-cell-rendered .scientific-math-display {
  margin: 2px auto;
  padding: 2px 4px;
  font-size: 1em;
}

.table-style-normal .experiment-data-table th,
.table-style-normal .experiment-data-table td {
  border: 1px solid #cfd0d4;
}

.table-style-normal .experiment-data-table th {
  background: #f1f2f4;
}

.table-style-three-line .experiment-data-table th,
.table-style-three-line .experiment-data-table td {
  border: 0;
}

.table-style-three-line .experiment-data-table tr:first-child th {
  border-top: 2px solid #242427;
  border-bottom: 1px solid #242427;
}

.table-style-three-line .experiment-data-table tr:last-child th,
.table-style-three-line .experiment-data-table tr:last-child td {
  border-bottom: 2px solid #242427;
}

.experiment-editor-shell.view-mode .experiment-table-card {
  border-color: transparent;
  background: transparent;
}

.experiment-editor-shell.view-mode .experiment-table-title {
  border-color: transparent;
  background: transparent;
}

.experiment-editor-shell.view-mode .experiment-table-cell-content input {
  display: none;
}

.experiment-editor-shell.view-mode .experiment-table-cell-rendered {
  display: block;
}

.preparation-head {
  min-width: 0;
  display: grid;
  grid-template-columns: var(--preparation-columns);
  gap: 4px;
  margin: 0 0 5px;
  color: #858585;
  font-size: 9px;
  font-weight: 600;
}

.preparation-head span:nth-child(1) {
  grid-column: 2;
}

.preparation-head span:nth-child(2) {
  grid-column: 3;
}

.preparation-head span:nth-child(3) {
  grid-column: 4;
}

.experiment-time-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

#experimentDate {
  grid-column: 1 / -1;
}

.experiment-time-tbd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #77777c;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.experiment-time-tbd input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.experiment-time-tbd-switch {
  position: relative;
  width: 27px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d1d1d6;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.08);
  transition: background 150ms ease;
}

.experiment-time-tbd-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 150ms ease;
}

.experiment-time-tbd input:checked + .experiment-time-tbd-switch {
  background: #34c759;
}

.experiment-time-tbd input:checked + .experiment-time-tbd-switch::after {
  transform: translateX(11px);
}

.experiment-time-tbd input:focus-visible + .experiment-time-tbd-switch {
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.16);
}

.experiment-time-tbd input:disabled ~ span {
  cursor: default;
  opacity: 0.72;
}

.experiment-time-tbd-badge {
  display: none;
  grid-column: 1 / -1;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c7c7cc;
  border-radius: 10px;
  background: rgba(118, 118, 128, 0.06);
  color: #717177;
  font-size: 10px;
  font-weight: 650;
}

.experiment-time-fields.is-tbd > input {
  display: none;
}

.experiment-time-fields.is-tbd .experiment-time-tbd-badge {
  display: flex;
}

.results-block {
  padding-bottom: 8px;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0 7px 28px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 190px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #edf1f5;
  color: #526373;
  font-size: 9px;
  font-weight: 600;
}

.attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  padding: 0;
  background: transparent;
  color: #7a7a7a;
}

.step-attachment-panel {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.step-attachment-panel .attachment-list {
  margin: 0;
}

.step-attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.step-attachment-actions button {
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid #dedee1;
  border-radius: 7px;
  background: #f7f7f8;
  color: #66666b;
  font-size: 8px;
  font-weight: 650;
}

.experiment-module-list {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.plate-module {
  min-width: 0;
  max-width: 100%;
  padding: 11px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fafafa;
}

.module-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.module-heading-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.module-heading-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.module-heading-actions .experiment-step-placement-select {
  height: 27px;
  max-width: 145px;
  padding: 0 23px 0 7px;
  border: 1px solid #d7d7da;
  border-radius: 7px;
  background: #ffffff;
  color: #55555a;
  font-size: 8px;
}

.module-name-input {
  width: min(220px, 55vw);
  min-width: 110px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid #d7d7da;
  border-radius: 7px;
  background: #ffffff;
  color: #242427;
  font-size: 11px;
  font-weight: 700;
}

.module-heading span {
  margin-left: 0;
  color: #858585;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

.module-heading button {
  padding: 3px;
  background: transparent;
  color: #b64a4a;
  font-size: 9px;
}

.agar-module-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  margin-bottom: 10px;
}

.agar-module-settings label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.agar-module-settings label > span {
  color: #77777c;
  font-size: 8px;
  font-weight: 650;
}

.agar-module-settings input,
.agar-module-settings select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #d5d5d8;
  border-radius: 8px;
  background: #ffffff;
  color: #252528;
  font-size: 9px;
}

.agar-module-settings select:disabled {
  opacity: 1;
  color: #55555a;
  -webkit-text-fill-color: #55555a;
}

.agar-dish {
  position: relative;
  width: min(252px, 100%);
  aspect-ratio: 1;
  margin: 2px auto 12px;
  overflow: hidden;
  border: 2px solid rgba(123, 104, 56, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.72), transparent 24%),
    radial-gradient(circle, #f3e9b5 0%, #e9d98d 68%, #dcc66e 100%);
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.35),
    inset 0 -12px 24px rgba(113, 88, 25, 0.09),
    0 5px 14px rgba(76, 59, 20, 0.12);
}

.agar-dish::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(115, 91, 32, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.agar-dish-label {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  max-width: 86px;
  overflow: hidden;
  color: rgba(76, 62, 25, 0.48);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.agar-sample-well {
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid #7c704f;
  border-radius: 50%;
  background: var(--well-color, rgba(255, 252, 232, 0.96));
  color: #4d432a;
  transform: translate(-50%, -50%);
  overflow: visible;
}

.agar-sample-well:hover {
  filter: brightness(0.98);
}

.agar-sample-well.assigned {
  border-color: var(--blue);
  background: var(--well-color, #d8e4f0);
  color: #244a76;
}

.agar-sample-well.selected {
  outline: 2px solid rgba(49, 95, 150, 0.58);
  outline-offset: 2px;
}

.agar-sample-label {
  position: relative;
  z-index: 2;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
}

.agar-zone-ring {
  position: absolute;
  z-index: 0;
  border: 1.5px solid rgba(49, 95, 150, 0.46);
  border-radius: 50%;
  background: rgba(191, 209, 228, 0.26);
  pointer-events: none;
}

.agar-batch-row {
  grid-template-columns: minmax(0, 1.2fr) minmax(84px, 0.72fr) auto auto;
}

.experiment-editor-shell.view-mode .agar-module-settings input,
.experiment-editor-shell.view-mode .agar-module-settings select {
  border-color: transparent;
  background: transparent;
}

.plate-grid-scroller {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 2px 6px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(60, 60, 67, 0.22) transparent;
}

.plate-grid-scroller::-webkit-scrollbar {
  height: 6px;
}

.plate-grid-scroller::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(60, 60, 67, 0.22);
}

.plate-grid {
  display: grid;
  grid-template-columns: 32px repeat(var(--module-columns), minmax(13px, 1fr)) minmax(82px, 1.55fr);
  gap: 3px;
  align-items: center;
  user-select: none;
}

.plate-module[data-module-type="plate96"] .plate-grid {
  min-width: 330px;
}

.plate-module[data-module-type="cryobox81"] .plate-grid {
  min-width: 300px;
}

.plate-label {
  min-width: 0;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 5px;
  background: transparent;
  color: #555555;
  font-size: 8px;
  font-weight: 700;
}

.plate-axis-button:hover,
.plate-axis-button:focus-visible {
  background: #e6ebf1;
  color: var(--blue);
}

.module-row-annotation-title,
.module-column-annotation-title {
  color: #8a8a8e;
  font-size: 7px;
  font-weight: 650;
}

.module-annotation-cell {
  position: relative;
  min-width: 0;
  height: 100%;
  min-height: 24px;
  display: block;
  align-self: stretch;
  border-radius: 6px;
}

.module-annotation-cell input {
  width: 100%;
  height: 100%;
  min-height: 24px;
  padding: 2px 14px 2px 6px;
  border: 1px solid #d6d6da;
  border-radius: 6px;
  background: #ffffff;
  color: #3a3a3d;
  font-size: 8px;
  line-height: 12px;
  user-select: text;
}

.module-column-annotation input {
  padding: 2px 4px 8px;
  text-align: center;
  font-size: 7px;
}

.module-annotation-cell.merged input {
  border-color: #aeb9c5;
  background: #eef1f4;
  font-weight: 650;
}

.module-annotation-cell.selected input {
  outline: 2px solid rgba(49, 95, 150, 0.55);
  outline-offset: 1px;
}

.module-annotation-select {
  position: absolute;
  z-index: 2;
  top: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid #8f969e;
  border-radius: 50%;
  background: #ffffff;
}

.module-column-annotation .module-annotation-select {
  top: auto;
  right: 50%;
  bottom: 2px;
  transform: translateX(50%);
}

.module-annotation-cell.selected .module-annotation-select {
  border-color: #1d1d1f;
  background: #1d1d1f;
}

.module-annotation-toolbar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding: 5px 7px;
  border-radius: 8px;
  background: #f0f1f3;
}

.module-annotation-toolbar > span {
  color: #737379;
  font-size: 8px;
  font-weight: 600;
}

.module-annotation-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.module-annotation-toolbar button {
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  background: #e0e1e4;
  color: #58585d;
  font-size: 8px;
  font-weight: 650;
}

.module-annotation-toolbar button:disabled {
  opacity: 0.36;
}

.experiment-editor-shell.view-mode .module-annotation-cell input {
  border-color: transparent;
  background: transparent;
}

.plate-well {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 1px solid #aeb7c0;
  border-radius: 50%;
  background: var(--well-color, #ffffff);
}

.culture-cells .plate-well {
  border-radius: 7px;
}

.cryobox-cells .plate-well {
  border-radius: 4px;
}

.gel-cells .plate-well {
  height: 42px;
  aspect-ratio: auto;
  border-radius: 4px 4px 8px 8px;
}

.plate-well.assigned {
  border-color: var(--blue);
  background: var(--well-color, #bfd1e4);
}

.plate-well.selected {
  outline: 2px solid rgba(49, 95, 150, 0.58);
  outline-offset: 1px;
  background: var(--well-color, #d8e4f0);
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.18);
}

.plate-well.cut-pending,
.agar-sample-well.cut-pending {
  opacity: 0.48;
  outline-style: dashed;
}

.module-editor {
  display: grid;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #e2e2e2;
}

.module-selection-toolbar,
.factor-layout-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.module-selection-toolbar > strong {
  color: var(--blue);
  font-size: 10px;
}

.module-selection-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.module-selection-toolbar button,
.module-apply-button,
.module-clear-button {
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  background: #e7e7e9;
  color: #5e5e62;
  font-size: 9px;
  font-weight: 600;
}

.module-apply-button {
  background: var(--blue);
  color: #ffffff;
}

.module-clear-button {
  color: #a24444;
}

.module-batch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}

.module-batch-row input {
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border: 1px solid #d7d7d9;
  border-radius: 7px;
  background: #ffffff;
  font-size: 10px;
}

.module-color-editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f0f1f3;
}

.module-color-editor > strong {
  color: #65656a;
  font-size: 9px;
  white-space: nowrap;
}

.module-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.module-color-swatch {
  position: relative;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 1px solid rgba(60, 60, 67, 0.2);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #ffffff;
}

.module-color-swatch.no-color {
  background:
    linear-gradient(135deg, transparent 44%, #b94a4a 45%, #b94a4a 55%, transparent 56%),
    #ffffff;
}

.module-color-swatch.active {
  outline: 2px solid rgba(49, 95, 150, 0.55);
  outline-offset: 1px;
}

.module-custom-color {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #77777b;
  font-size: 8px;
  font-weight: 600;
}

.module-custom-color input {
  width: 24px;
  height: 22px;
  padding: 1px;
  border: 1px solid #d0d0d3;
  border-radius: 6px;
  background: #ffffff;
}

.module-selection-toolbar button:disabled {
  cursor: default;
  opacity: 0.38;
}

.module-selection-hint {
  color: #89898d;
  font-size: 8px;
  line-height: 13px;
}

.module-clipboard-status {
  margin-top: -3px;
  color: #5f6f80;
  font-size: 8px;
  line-height: 13px;
  font-weight: 600;
}

.factor-layout-panel {
  display: grid;
  gap: 7px;
  margin-top: 3px;
  padding: 10px;
  border-radius: 9px;
  background: #f0f2f5;
}

.factor-layout-panel > strong {
  font-size: 10px;
}

.factor-layout-panel > p {
  margin-top: -4px;
  color: #858589;
  font-size: 8px;
  line-height: 12px;
}

.factor-layout-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.factor-layout-fields label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.factor-layout-fields label > span {
  color: #66666a;
  font-size: 8px;
  font-weight: 600;
}

.factor-layout-fields input,
.factor-layout-fields select {
  width: 100%;
  min-width: 0;
  height: 29px;
  padding: 0 8px;
  border: 1px solid #d5d5d8;
  border-radius: 7px;
  background: #ffffff;
  color: #27272a;
  font-size: 9px;
}

.factor-layout-footer span {
  color: #747478;
  font-size: 8px;
}

.experiment-action-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid #dedede;
  background: #f2f2f4;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.04);
  z-index: 3;
}

.experiment-action-bar > div {
  display: flex;
  gap: 8px;
}

.danger-link {
  padding: 0 6px;
  background: transparent;
  color: #b94747;
  font-size: 10px;
  font-weight: 600;
}

.undo-experiment-button {
  min-width: 58px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(118, 118, 128, 0.11);
  color: #4d4d52;
  font-size: 9px;
  font-weight: 650;
}

.undo-experiment-button:hover:not(:disabled),
.undo-experiment-button:focus-visible:not(:disabled) {
  background: rgba(118, 118, 128, 0.19);
}

.undo-experiment-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.experiment-action-bar > span {
  color: #8d8d8d;
  font-size: 9px;
  text-align: right;
}

.subtle-action {
  min-width: 88px;
  background: var(--action-black);
}

.experiment-editor-shell.view-mode .edit-only {
  display: none !important;
}

.experiment-editor-shell.view-mode .experiment-edit-control,
.experiment-editor-shell.view-mode .dynamic-row input,
.experiment-editor-shell.view-mode .dynamic-row textarea,
.experiment-editor-shell.view-mode .plate-well-editor input {
  border-color: transparent;
  background: transparent;
  color: #222222;
}

.experiment-editor-shell.view-mode .remove-dynamic-button,
.experiment-editor-shell.view-mode .remove-record-button,
.experiment-editor-shell.view-mode .module-heading button {
  display: none;
}

.experiment-editor-shell.view-mode .module-name-input {
  width: auto;
  min-width: 0;
  max-width: 240px;
  padding: 0;
}

.experiment-editor-shell.view-mode .experiment-secondary-column {
  --preparation-columns: 18px minmax(0, 1.4fr) minmax(0, 0.65fr) minmax(0, 0.55fr) 0px;
}

.experiment-editor-shell.view-mode .group-row-editor {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.65fr);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: block;
  padding: 0;
  background: rgba(30, 30, 32, 0.025);
  -webkit-backdrop-filter: blur(0.5px);
  backdrop-filter: blur(0.5px);
}

.modal-backdrop::before {
  content: "";
  position: fixed;
  z-index: 1;
  top: calc(var(--popover-top, 82px) - 7px);
  left: calc(var(--popover-tip-x, 50vw) - 7px);
  width: 14px;
  height: 14px;
  border-top: 0.5px solid rgba(80, 80, 84, 0.26);
  border-left: 0.5px solid rgba(80, 80, 84, 0.26);
  background: rgba(246, 246, 248, 0.96);
  transform: rotate(45deg);
}

.modal-backdrop.centered::before {
  display: none;
}

.modal-backdrop.opens-above::before {
  top: calc(var(--popover-bottom, 640px) - 7px);
  border: 0;
  border-right: 0.5px solid rgba(80, 80, 84, 0.26);
  border-bottom: 0.5px solid rgba(80, 80, 84, 0.26);
}

.modal-backdrop[hidden] {
  display: none;
}

.compact-dialog {
  position: fixed;
  z-index: 2;
  top: var(--popover-top, 82px);
  left: var(--popover-left, calc(50vw - 170px));
  width: min(340px, 100%);
  max-width: calc(100vw - 24px);
  max-height: min(540px, calc(100vh - 24px));
  overflow-y: auto;
  padding: 12px 14px 14px;
  border: 0.5px solid rgba(80, 80, 84, 0.26);
  border-radius: 18px;
  background: rgba(246, 246, 248, 0.9);
  -webkit-backdrop-filter: blur(40px) saturate(165%);
  backdrop-filter: blur(40px) saturate(165%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.17), 0 2px 5px rgba(0, 0, 0, 0.07);
  animation: mac-popover-appear 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes mac-popover-appear {
  from { opacity: 0; transform: translateY(-5px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.compact-dialog header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 74px;
  margin: -1px 0 10px;
  padding: 1px 34px 9px;
  border-bottom: 0.5px solid rgba(80, 80, 84, 0.2);
  text-align: center;
}

.compact-dialog header p {
  margin-bottom: 1px;
  color: #858585;
  font-size: 8px;
  font-weight: 600;
}

.compact-dialog header h2 {
  font-size: 14px;
}

.compact-dialog header button {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(214, 214, 217, 0.72);
  color: #666666;
  font-size: 15px;
}

.module-option,
.method-template-item,
.export-options button {
  width: 100%;
  display: grid;
  gap: 2px;
  margin-top: 6px;
  padding: 9px 10px;
  border: 0.5px solid rgba(120, 120, 124, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.module-option:hover,
.method-template-item:hover,
.export-options button:hover {
  border-color: rgba(90, 90, 94, 0.32);
  background: rgba(255, 255, 255, 0.92);
}

.module-option:active,
.method-template-item:active,
.export-options button:active {
  transform: scale(0.992);
}

.module-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.module-option-grid .module-option {
  min-height: 58px;
  margin-top: 0;
}

#modulePickerDialog .compact-dialog {
  width: min(480px, 100%);
}

.table-picker-dialog {
  width: min(420px, 100%);
}

.word-import-dialog {
  width: min(530px, 100%);
}

.method-template-list .empty-state {
  min-height: 0;
  padding: 14px 8px 4px;
  font-size: 9px;
}

.word-import-source {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #dedee1;
  border-radius: 10px;
  background: #f7f7f8;
}

.word-import-source strong {
  overflow: hidden;
  color: #242427;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-import-source span,
.word-import-dialog small {
  color: #7d7d82;
  font-size: 8px;
  line-height: 13px;
}

.word-import-section-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.word-import-section-options label,
.word-import-split-option {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid #e1e1e3;
  border-radius: 9px;
  background: #ffffff;
  color: #343437;
  font-size: 9px;
  font-weight: 650;
}

.word-import-section-options input,
.word-import-mode input,
.word-import-split-option input {
  accent-color: #1d1d1f;
}

.word-import-section-options small {
  max-width: 110px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-import-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.word-import-mode legend {
  grid-column: 1 / -1;
  margin-bottom: 1px;
  color: #68686d;
  font-size: 9px;
  font-weight: 650;
}

.word-import-mode label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 7px;
  padding: 9px;
  border: 1px solid #dedee1;
  border-radius: 9px;
  background: #fafafa;
}

.word-import-mode label > span,
.word-import-split-option > span {
  display: grid;
  gap: 2px;
}

.word-import-mode strong,
.word-import-split-option strong {
  color: #343437;
  font-size: 9px;
}

.word-import-split-option {
  grid-template-columns: auto 1fr;
  margin-top: 12px;
}

.word-import-preview-list {
  max-height: 148px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 9px;
  border-radius: 9px;
  background: #f7f7f8;
}

.word-import-preview-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  color: #444448;
  font-size: 8px;
  line-height: 13px;
}

.word-import-preview-item b {
  color: #85858a;
  font-variant-numeric: tabular-nums;
}

.word-import-warnings {
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7efe4;
  color: #755d3b;
  font-size: 8px;
  line-height: 13px;
}

.table-picker-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.table-picker-fields label {
  display: grid;
  gap: 5px;
  color: #68686d;
  font-size: 9px;
  font-weight: 650;
}

.table-picker-fields input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
  color: #242427;
}

.table-style-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding: 0;
  border: 0;
}

.table-style-options legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: #68686d;
  font-size: 9px;
  font-weight: 650;
}

.table-style-options label {
  position: relative;
  min-width: 0;
}

.table-style-options input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.table-style-choice {
  min-height: 88px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 9px;
  border: 1px solid #dddddf;
  border-radius: 10px;
  background: #fafafa;
}

.table-style-options input:checked + .table-style-choice {
  border-color: #1d1d1f;
  box-shadow: inset 0 0 0 1px #1d1d1f;
  background: #ffffff;
}

.table-style-choice strong {
  color: #242427;
  font-size: 11px;
}

.table-style-choice small {
  color: #7d7d82;
  font-size: 8px;
  line-height: 13px;
}

.table-style-sample {
  height: 30px;
  display: block;
  margin-top: 5px;
  background:
    linear-gradient(#cfd0d4, #cfd0d4) 0 0 / 100% 1px no-repeat,
    linear-gradient(#cfd0d4, #cfd0d4) 0 50% / 100% 1px no-repeat,
    linear-gradient(#cfd0d4, #cfd0d4) 0 100% / 100% 1px no-repeat;
}

.table-style-sample.normal {
  border-right: 1px solid #cfd0d4;
  border-left: 1px solid #cfd0d4;
  background:
    linear-gradient(#cfd0d4, #cfd0d4) 0 0 / 100% 1px no-repeat,
    linear-gradient(#cfd0d4, #cfd0d4) 0 50% / 100% 1px no-repeat,
    linear-gradient(#cfd0d4, #cfd0d4) 0 100% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent 32%, #cfd0d4 32%, #cfd0d4 calc(32% + 1px), transparent calc(32% + 1px), transparent 66%, #cfd0d4 66%, #cfd0d4 calc(66% + 1px), transparent calc(66% + 1px));
}

.table-style-sample.three-line {
  background:
    linear-gradient(#242427, #242427) 0 0 / 100% 2px no-repeat,
    linear-gradient(#747478, #747478) 0 46% / 100% 1px no-repeat,
    linear-gradient(#242427, #242427) 0 100% / 100% 2px no-repeat;
}

.table-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.table-picker-actions button {
  min-width: 66px;
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  background: #ececef;
  color: #55555a;
  font-size: 9px;
  font-weight: 700;
}

.table-picker-actions .blue-button {
  background: var(--action-black);
  color: #ffffff;
}

.module-option strong,
.method-template-item strong,
.export-options strong {
  font-size: 11px;
}

.module-option span,
.method-template-item span,
.export-options span {
  color: #7b7b7b;
  font-size: 8px;
  line-height: 12px;
}

.export-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.export-options button {
  min-height: 66px;
  margin: 0;
}

.paperang-check-button {
  background: #e7e7e9;
  color: #2e2e31;
}

.paperang-workspace {
  display: grid;
  grid-template-rows: minmax(64px, auto) minmax(0, 1fr) auto;
}

.paperang-status-strip {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 16px;
  border-bottom: 1px solid #e7e7e9;
  background: #fafafa;
}

.paperang-device-status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.paperang-device-status > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.paperang-device-status strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paperang-device-status span:not(.paperang-status-dot) {
  overflow: hidden;
  color: #85858a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.paperang-status-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #a4a4a8;
  box-shadow: 0 0 0 4px rgba(120, 120, 124, 0.1);
}

.paperang-status-dot.online {
  background: #34a853;
  box-shadow: 0 0 0 4px rgba(52, 168, 83, 0.1);
}

.paperang-status-dot.offline {
  background: #d04b43;
  box-shadow: 0 0 0 4px rgba(208, 75, 67, 0.1);
}

.paperang-status-dot.checking {
  background: #d49b24;
  box-shadow: 0 0 0 4px rgba(212, 155, 36, 0.11);
}

.paperang-status-dot.warning {
  background: #d49b24;
  box-shadow: 0 0 0 4px rgba(212, 155, 36, 0.11);
}

.paperang-queue-summary {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #77777c;
  font-size: 8px;
}

.paperang-queue-summary span {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.paperang-queue-summary b {
  color: #202023;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.paperang-main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(300px, 1.08fr);
}

.paperang-compose-panel,
.paperang-preview-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.paperang-compose-panel {
  border-right: 1px solid #e7e7e9;
}

.paperang-panel-heading {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #eeeeef;
}

.paperang-panel-heading p {
  margin-bottom: 1px;
  color: #99999e;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.paperang-panel-heading h2 {
  font-size: 13px;
  line-height: 16px;
}

.paperang-panel-heading > span {
  color: #85858a;
  font-size: 8px;
}

.paperang-mode-switch {
  display: flex;
  padding: 2px;
  border-radius: 8px;
  background: #ececee;
}

.paperang-mode-switch button {
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: transparent;
  color: #747479;
  font-size: 9px;
  font-weight: 650;
}

.paperang-mode-switch button.active {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  color: #1d1d1f;
}

.paperang-text-editor {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(90px, 1fr);
  gap: 9px;
  padding: 12px 14px 14px;
}

.paperang-source-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.paperang-field,
.paperang-source-row label,
.paperang-select-options label {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #68686d;
  font-size: 8px;
  font-weight: 650;
}

.paperang-field input,
.paperang-source-row select,
.paperang-select-options select {
  width: 100%;
  height: 30px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #d5d5d8;
  border-radius: 7px;
  background: #ffffff;
  color: #242427;
  font-size: 10px;
}

.paperang-content-field {
  min-height: 0;
}

.paperang-content-field textarea {
  width: 100%;
  height: 100%;
  min-height: 90px;
  padding: 9px 10px;
  border: 1px solid #d5d5d8;
  border-radius: 9px;
  background: #ffffff;
  color: #242427;
  font-size: 11px;
  line-height: 17px;
  resize: none;
}

.paperang-field input:focus,
.paperang-field input:focus-visible,
.paperang-source-row select:focus,
.paperang-source-row select:focus-visible,
.paperang-select-options select:focus,
.paperang-select-options select:focus-visible,
.paperang-content-field textarea:focus,
.paperang-content-field textarea:focus-visible {
  outline: none;
  border-color: rgba(50, 50, 54, 0.52);
  box-shadow: 0 0 0 1px rgba(29, 29, 31, 0.1);
}

.paperang-image-editor {
  min-height: 0;
  padding: 14px;
}

.paperang-label-editor {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.paperang-label-editor iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 0;
  background: #ffffff;
}
.paperang-label-editor[hidden] { display: none !important; }

.paperang-text-editor[hidden],
.paperang-image-editor[hidden],
.paperang-image-file[hidden],
.paperang-paper-title[hidden],
.paperang-paper-content[hidden],
.paperang-paper-time[hidden],
.paperang-paper-image[hidden],
#paperangReferenceField[hidden] {
  display: none !important;
}

.paperang-image-drop {
  width: 100%;
  height: 100%;
  min-height: 150px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px dashed #c4c4c8;
  border-radius: 12px;
  background: #fafafa;
  color: #6e6e73;
}

.paperang-image-drop > span {
  font-size: 28px;
}

.paperang-image-drop strong {
  color: #2c2c2f;
  font-size: 12px;
}

.paperang-image-drop small {
  font-size: 8px;
}

.paperang-image-file {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f1f1f3;
  color: #55555a;
  font-size: 9px;
}

.paperang-image-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paperang-image-file button {
  flex: none;
  background: transparent;
  color: #55555a;
  font-size: 8px;
}

.paperang-preview-panel {
  background: #f5f5f7;
}

.paperang-paper-stage {
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: start center;
  padding: 16px;
}

.paperang-paper {
  --paperang-preview-font-size: 15px;
  width: min(288px, calc(100% - 12px));
  min-height: 240px;
  padding: 18px 20px 34px;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.paperang-paper-title {
  display: block;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 2px solid #1d1d1f;
  font-size: calc(var(--paperang-preview-font-size) + 3px);
  line-height: 1.3;
  text-align: inherit;
}

.paperang-paper.paperang-label-paper {
  min-height: 0;
  padding: 0;
}

.paperang-paper-content {
  min-height: 96px;
  color: #1d1d1f;
  font-size: var(--paperang-preview-font-size);
  line-height: 1.45;
  text-align: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.paperang-paper-time {
  display: block;
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid #c8c8ca;
  color: #55555a;
  font-size: 9px;
  text-align: inherit;
}

.paperang-paper-image {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1) contrast(1.16);
}

.paperang-options-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid #e2e2e4;
  background: #fafafa;
}

.paperang-select-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 6px;
}

.paperang-toggle-options {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 5px 10px;
}

.paperang-toggle-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #66666b;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.paperang-toggle-options input {
  width: 13px;
  height: 13px;
  accent-color: #1d1d1f;
}

.paperang-submit-area {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.paperang-submit-area > span {
  max-width: 150px;
  overflow: hidden;
  color: #89898e;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paperang-submit-area button {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 10px;
}

.paperang-confirm-dialog {
  width: min(360px, 100%);
}

.paperang-confirm-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 10px 11px;
  border: 1px solid #dedee1;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  color: #5f5f64;
  font-size: 9px;
}

.paperang-confirm-summary b {
  color: #202023;
  font-weight: 650;
  text-align: right;
}

.paperang-confirm-note {
  margin: 9px 2px 0;
  color: #7d7d82;
  font-size: 8px;
  line-height: 13px;
}

@media (max-width: 1000px) {
  .paperang-options-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .paperang-toggle-options {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
  }

  .paperang-submit-area {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

.settings-workspace {
  overflow-y: auto;
  padding: 8px 24px 24px;
}

input[type="date"],
input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  height: 32px !important;
  padding: 0 32px 0 10px !important;
  border: 1px solid #c9c9ce !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f3f3f5 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  color: #1d1d1f;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 11px !important;
  line-height: 30px;
  font-variant-numeric: tabular-nums;
  cursor: default;
}

input[type="date"] {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Crect x='1.5' y='2.5' width='11' height='10' rx='2' fill='none' stroke='%236b6b70' stroke-width='1.2'/%3E%3Cpath d='M4 1.5v2M10 1.5v2M1.8 5h10.4' fill='none' stroke='%236b6b70' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #ffffff 0%, #f3f3f5 100%) !important;
  background-position: right 10px center, 0 0 !important;
  background-repeat: no-repeat, no-repeat !important;
  background-size: 14px 14px, 100% 100% !important;
}

input[type="time"] {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='5.4' fill='none' stroke='%236b6b70' stroke-width='1.2'/%3E%3Cpath d='M7 3.8v3.5l2.35 1.35' fill='none' stroke='%236b6b70' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #ffffff 0%, #f3f3f5 100%) !important;
  background-position: right 10px center, 0 0 !important;
  background-repeat: no-repeat, no-repeat !important;
  background-size: 14px 14px, 100% 100% !important;
}

input[type="date"]:focus,
input[type="time"]:focus {
  border-color: #6f9dca !important;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.14) !important;
}

.todo-drawer input:focus,
.todo-drawer input:focus-visible,
.todo-drawer select:focus,
.todo-drawer select:focus-visible,
.todo-drawer textarea:focus,
.todo-drawer textarea:focus-visible,
.compact-dialog input:focus,
.compact-dialog input:focus-visible,
.compact-dialog select:focus,
.compact-dialog select:focus-visible,
.compact-dialog textarea:focus,
.compact-dialog textarea:focus-visible {
  outline: none !important;
  border-color: rgba(50, 50, 54, 0.52) !important;
  box-shadow: 0 0 0 1px rgba(29, 29, 31, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-text {
  color: #8e8e93;
  padding: 0 2px;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  display: none;
}

input.apple-picker-open {
  border-color: #6f9dca !important;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.experiment-editor-shell.view-mode input[type="date"],
.experiment-editor-shell.view-mode input[type="time"] {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: default;
}

.apple-picker-popover {
  --picker-pointer-left: 80%;
  position: fixed;
  z-index: 90;
  width: 252px;
  padding: 8px;
  border: 1px solid rgba(60, 60, 67, 0.2);
  border-radius: 14px;
  background: rgba(249, 249, 251, 0.96);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.17),
    0 3px 10px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  backdrop-filter: blur(28px) saturate(145%);
  color: #1d1d1f;
  transform-origin: var(--picker-pointer-left) top;
  animation: apple-picker-appear 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.apple-picker-popover[hidden] {
  display: none;
}

.apple-picker-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  left: calc(var(--picker-pointer-left) - 6px);
  width: 11px;
  height: 11px;
  border-top: 1px solid rgba(60, 60, 67, 0.16);
  border-left: 1px solid rgba(60, 60, 67, 0.16);
  background: rgba(249, 249, 251, 0.96);
  transform: rotate(45deg);
}

.apple-picker-popover.opens-above {
  transform-origin: var(--picker-pointer-left) bottom;
}

.apple-picker-popover.opens-above::before {
  top: auto;
  bottom: -6px;
  border: 0;
  border-right: 1px solid rgba(60, 60, 67, 0.16);
  border-bottom: 1px solid rgba(60, 60, 67, 0.16);
}

.apple-picker-popover button {
  margin: 0;
  border: 0;
  font-family: inherit;
}

.apple-picker-header {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 5px;
}

.apple-picker-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.apple-picker-title span,
.apple-time-header span {
  color: #8e8e93;
  font-size: 8px;
  line-height: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.apple-picker-title strong {
  font-size: 13px;
  line-height: 17px;
  font-weight: 700;
}

.apple-picker-navigation {
  display: flex;
  gap: 4px;
}

.apple-picker-chevron {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 7px;
  background: rgba(118, 118, 128, 0.1);
}

.apple-picker-chevron:hover,
.apple-picker-chevron:focus-visible {
  background: rgba(118, 118, 128, 0.18);
}

.apple-picker-chevron::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 9px;
  width: 6px;
  height: 6px;
  border-top: 1.7px solid #3a3a3c;
  border-left: 1.7px solid #3a3a3c;
  transform: rotate(-45deg);
}

.apple-picker-chevron.next::after {
  left: 7px;
  transform: rotate(135deg);
}

.apple-picker-weekdays,
.apple-picker-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.apple-picker-weekdays {
  margin: 0 0 2px;
}

.apple-picker-weekdays span {
  height: 18px;
  display: grid;
  place-items: center;
  color: #8e8e93;
  font-size: 8px;
  font-weight: 600;
}

.apple-picker-calendar {
  gap: 0;
}

.apple-picker-day {
  position: relative;
  aspect-ratio: auto;
  width: 28px;
  height: 28px;
  min-width: 0;
  min-height: 28px;
  justify-self: center;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: #1d1d1f;
  font-size: 10px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.apple-picker-day:hover,
.apple-picker-day:focus-visible {
  background: rgba(118, 118, 128, 0.12);
}

.apple-picker-day.muted {
  color: #b1b1b6;
}

.apple-picker-day.today {
  color: var(--action-black);
  font-weight: 750;
}

.apple-picker-day.today::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.apple-picker-day.selected {
  background: var(--action-black);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.apple-picker-day.selected.today::after {
  display: none;
}

.apple-picker-day.selected:hover,
.apple-picker-day.selected:focus-visible {
  background: var(--action-black-hover);
}

.apple-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(60, 60, 67, 0.12);
}

.apple-picker-text-button,
.apple-picker-primary-button,
.apple-time-done {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: transparent;
  color: var(--action-black);
  font-size: 9px;
  font-weight: 650;
}

.apple-picker-text-button:hover,
.apple-picker-text-button:focus-visible {
  background: rgba(29, 29, 31, 0.08);
}

.apple-picker-primary-button,
.apple-time-done {
  background: var(--action-black);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  color: #ffffff;
}

.apple-picker-primary-button:hover,
.apple-picker-primary-button:focus-visible,
.apple-time-done:hover,
.apple-time-done:focus-visible {
  background: var(--action-black-hover);
}

.apple-time-picker {
  width: 220px;
  padding: 9px;
}

.apple-time-header {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 0 1px 6px;
}

.apple-time-header > div {
  display: grid;
  gap: 2px;
}

.apple-time-header strong {
  font-size: 18px;
  line-height: 21px;
  font-weight: 680;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.apple-time-header strong i {
  padding: 0 2px;
  color: #8e8e93;
  font-style: normal;
}

.apple-time-done {
  align-self: center;
}

.apple-time-wheel-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.apple-time-wheel-group {
  min-width: 0;
  padding: 5px 4px 4px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 10px;
  background: rgba(118, 118, 128, 0.06);
}

.apple-time-wheel-label {
  display: block;
  padding: 0 3px 3px;
  color: #8e8e93;
  font-size: 7px;
  font-weight: 650;
  text-align: center;
}

.apple-time-wheel {
  height: 124px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 1px;
  padding: 44px 0;
  border-radius: 8px;
  scroll-snap-type: y proximity;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%);
}

.apple-time-wheel::-webkit-scrollbar {
  display: none;
}

.apple-time-choice {
  height: 28px;
  padding: 0;
  border-radius: 7px;
  background: transparent;
  color: #3a3a3c;
  font-size: 12px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  scroll-snap-align: center;
}

.apple-time-choice:hover,
.apple-time-choice:focus-visible {
  background: rgba(118, 118, 128, 0.12);
}

.apple-time-choice.selected {
  background: var(--action-black);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.09),
    0 0 0 1px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  font-weight: 750;
}

.apple-time-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(60, 60, 67, 0.12);
}

.apple-time-footer > span {
  color: #8e8e93;
  font-size: 7px;
}

@keyframes apple-picker-appear {
  from {
    opacity: 0;
    transform: translateY(-3px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

html[data-platform="darwin"] body,
html[data-platform="darwin"] button,
html[data-platform="darwin"] input,
html[data-platform="darwin"] textarea {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.day-board,
.calendar,
.year-grid,
.record-list,
.experiment-list,
.experiment-primary-column,
.experiment-secondary-column,
.planning-list,
.planning-primary-column,
.planning-secondary-column,
.settings-workspace,
.drawer-fields {
  scrollbar-width: thin;
  scrollbar-color: rgba(60, 60, 67, 0.24) transparent;
}

.day-board::-webkit-scrollbar,
.calendar::-webkit-scrollbar,
.year-grid::-webkit-scrollbar,
.record-list::-webkit-scrollbar,
.experiment-list::-webkit-scrollbar,
.experiment-primary-column::-webkit-scrollbar,
.experiment-secondary-column::-webkit-scrollbar,
.planning-list::-webkit-scrollbar,
.planning-primary-column::-webkit-scrollbar,
.planning-secondary-column::-webkit-scrollbar,
.settings-workspace::-webkit-scrollbar,
.drawer-fields::-webkit-scrollbar {
  width: 8px;
}

.day-board::-webkit-scrollbar-thumb,
.calendar::-webkit-scrollbar-thumb,
.year-grid::-webkit-scrollbar-thumb,
.record-list::-webkit-scrollbar-thumb,
.experiment-list::-webkit-scrollbar-thumb,
.experiment-primary-column::-webkit-scrollbar-thumb,
.experiment-secondary-column::-webkit-scrollbar-thumb,
.planning-list::-webkit-scrollbar-thumb,
.planning-primary-column::-webkit-scrollbar-thumb,
.planning-secondary-column::-webkit-scrollbar-thumb,
.settings-workspace::-webkit-scrollbar-thumb,
.drawer-fields::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(60, 60, 67, 0.24);
  background-clip: padding-box;
}

.settings-section {
  padding: 22px 0 10px;
}

.settings-section + .settings-section {
  border-top: 1px solid #e5e5e5;
}

.settings-section h2 {
  margin-bottom: 8px;
  color: #757575;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
}

.setting-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #ededed;
}

.setting-row > div {
  min-width: 0;
}

.status-pill {
  padding: 5px 9px;
  border-radius: 8px;
  background: #e1eee5;
  color: #34734a;
  font-size: 10px;
  font-weight: 700;
}

.setting-value {
  color: #7d7d7d;
  font-size: 11px;
  font-weight: 600;
}

.secondary-button {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: #ebebeb;
  font-size: 11px;
  font-weight: 600;
}

.record-drawer {
  z-index: 23;
}

#recordDrawerBackdrop {
  z-index: 22;
}

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 220px;
  }

  .desktop-bg {
    padding: 0;
  }

  .app-frame {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    border-radius: var(--window-radius);
  }

  .calendar-top,
  .calendar,
  .day-board,
  .year-grid,
  .page-top,
  .workspace-board {
    width: calc(100% - 48px);
  }

  .experiment-workspace {
    --experiment-list-width: 150px;
  }

  .planning-panel-workspace {
    grid-template-columns: 165px minmax(0, 1fr);
  }

  .planning-editor-grid {
    grid-template-columns: minmax(0, 56%) minmax(0, 44%);
  }

  .experiment-editor-grid {
    --experiment-default-primary-ratio: 0.64;
    --experiment-primary-width: 64%;
  }

  .experiment-primary-column,
  .experiment-secondary-column {
    padding: 16px;
  }

  .experiment-time-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .experiment-workspace {
    --experiment-list-width: 140px;
  }

  .experiment-editor-grid {
    --experiment-default-primary-ratio: 0.62;
    --experiment-primary-width: 62%;
  }

  .module-batch-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .module-clear-button {
    grid-column: 2;
  }

  .experiment-action-bar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .experiment-action-bar > span {
    display: none;
  }

  .experiment-action-bar > div:last-child {
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .apple-picker-popover,
  .apple-time-picker {
    width: calc(100vw - 24px);
    max-width: 252px;
  }

  .apple-time-picker {
    max-width: 220px;
  }

  .desktop-bg {
    padding: 0;
  }

  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-frame.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .sidebar {
    min-height: 360px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
  }

  .calendar-top {
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }

  .weekday {
    font-size: 18px;
  }

  .day {
    min-height: 90px;
  }

  .page-top {
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
    height: auto;
  }

  .experiment-workspace,
  .experiment-editor-grid,
  .planning-panel-workspace,
  .planning-editor-grid {
    grid-template-columns: 1fr;
  }

  .split-handle {
    display: none;
  }

  .experiment-workspace {
    height: auto;
  }

  .experiment-list-panel,
  .experiment-primary-column,
  .planning-list-panel,
  .planning-primary-column {
    border-right: 0;
    border-bottom: 1px solid #e4e4e4;
  }

  .experiment-list {
    max-height: 180px;
  }

  .planning-list-panel {
    max-height: 220px;
  }

  .planning-panel-workspace {
    height: auto;
  }

  .planning-editor-grid {
    min-height: 560px;
  }

  .experiment-action-bar {
    grid-template-columns: 1fr;
  }

  .experiment-action-bar > span {
    text-align: left;
  }

  .modal-backdrop {
    left: 0;
  }

  .workspace-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-input {
    width: 100%;
  }

  .drawer-backdrop {
    left: 0;
  }
}

/* Scientific data analysis workspace */
.analysis-workspace {
  display: grid;
  grid-template-columns: 148px minmax(300px, 1fr) 164px;
  min-height: 0;
}

.analysis-tool-panel,
.analysis-history-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px 10px;
  overflow: hidden;
  background: #fafafa;
}

.analysis-tool-panel {
  border-right: 1px solid #e6e6e8;
}

.analysis-history-panel {
  border-left: 1px solid #e6e6e8;
}

.analysis-panel-heading,
.analysis-section-heading,
.analysis-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.analysis-panel-heading p,
.analysis-section-heading p,
.analysis-editor-heading p {
  color: #88888d;
  font-size: 8px;
  line-height: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.analysis-panel-heading h2,
.analysis-editor-heading h2 {
  font-size: 14px;
  line-height: 18px;
}

.analysis-section-heading h3 {
  font-size: 13px;
  line-height: 17px;
}

.analysis-panel-heading > span,
#analysisResultStatus {
  padding: 3px 7px;
  border-radius: 8px;
  background: #ececee;
  color: #68686d;
  font-size: 9px;
  white-space: nowrap;
}

.analysis-tool-panel > input,
.analysis-history-panel > input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #dedee1;
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
}

.analysis-tool-list,
.analysis-history-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.analysis-tool-category {
  padding: 10px 6px 3px;
  color: #8b8b90;
  font-size: 8px;
  line-height: 11px;
  font-weight: 700;
}

.analysis-tool-list > button {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 7px;
  border-radius: 8px;
  background: transparent;
  color: #29292c;
  text-align: left;
}

.analysis-tool-list > button:hover,
.analysis-tool-list > button.active {
  background: #e8e8ea;
}

.analysis-tool-list strong {
  overflow: hidden;
  font-size: 10px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-tool-list small {
  display: -webkit-box;
  overflow: hidden;
  color: #818186;
  font-size: 8px;
  line-height: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.analysis-editor {
  min-width: 0;
  min-height: 0;
  padding: 15px 16px 18px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.analysis-editor-heading {
  margin-bottom: 13px;
}

.analysis-editor-heading > div {
  min-width: 0;
}

.analysis-editor-heading > div > span {
  display: block;
  margin-top: 3px;
  color: #77777c;
  font-size: 9px;
  line-height: 13px;
}

.analysis-help-button,
.analysis-inline-actions button,
.analysis-inline-actions select {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid #d9d9dc;
  border-radius: 7px;
  background: #f1f1f3;
  color: #363638;
  font-size: 9px;
  white-space: nowrap;
}

.analysis-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e2e2e4;
  border-radius: 11px;
  background: #fbfbfc;
}

.analysis-field {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: #616166;
  font-size: 9px;
  font-weight: 600;
}

.analysis-field.wide {
  grid-column: 1 / -1;
}

.analysis-field input,
.analysis-field select,
.analysis-field textarea,
.analysis-save-fields input,
.analysis-save-fields select,
.analysis-paste-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9d9dc;
  border-radius: 8px;
  background: #fff;
  color: #27272a;
  font: inherit;
  font-size: 10px;
  outline: none;
}

.analysis-field input,
.analysis-field select,
.analysis-save-fields input,
.analysis-save-fields select {
  height: 31px;
  padding: 0 8px;
}

.analysis-field textarea,
.analysis-paste-field textarea {
  min-height: 72px;
  padding: 8px;
  resize: vertical;
  line-height: 15px;
}

.analysis-field input:focus,
.analysis-field select:focus,
.analysis-field textarea:focus,
.analysis-save-fields input:focus,
.analysis-save-fields select:focus,
.analysis-paste-field textarea:focus {
  border-color: #68686d;
  box-shadow: 0 0 0 1px rgba(29, 29, 31, .08);
}

.analysis-field.checkbox {
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid #e1e1e3;
  border-radius: 8px;
  background: #fff;
}

.analysis-field.checkbox input {
  width: 14px;
  height: 14px;
  padding: 0;
  accent-color: #1d1d1f;
}

.analysis-calculate-button {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 110px;
  height: 32px;
  margin-top: 2px;
}

.cfu-editor {
  grid-column: 1 / -1;
  display: grid;
  min-width: 0;
  gap: 9px;
}

.cfu-editor h3, .cfu-editor p { margin: 0; }
.cfu-editor h3 { font-size: 11px; }
.cfu-editor h3 small { color: #85858a; font-size: 9px; font-weight: 500; }
.cfu-note { color: #77777c; font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
#cfuGroupsList { display: grid; min-width: 0; gap: 10px; }
.cfu-group { min-width: 0; padding: 10px; border: 1px solid #dfdfe2; border-radius: 10px; background: #fff; }
.cfu-group-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.cfu-group-heading > label { flex: 1; min-width: 0; }
.cfu-group-heading .analysis-inline-actions { flex-shrink: 0; }
.cfu-defaults { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; margin-bottom: 7px; }
.cfu-defaults > label { grid-column: span 2; }
.cfu-defaults > label:nth-child(n+4) { grid-column: span 3; }
.cfu-plate-scroll { min-width: 0; max-width: 100%; overflow-x: auto; margin: 9px 0; border: 1px solid #e7e7e9; border-radius: 7px; }
.cfu-plate-table { width: 100%; min-width: 530px; border-collapse: collapse; table-layout: fixed; font-size: 9px; }
.cfu-plate-table th { padding: 6px 4px; color: #6b6b70; text-align: left; background: #f4f4f6; }
.cfu-plate-table td { padding: 4px; border-top: 1px solid #ededee; }
.cfu-plate-table th:first-child { width: 35px; }
.cfu-plate-table th:last-child { width: 26px; }
.cfu-plate-table th:nth-child(5) { width: 105px; }
.cfu-plate-table input:not([type="checkbox"]), .cfu-plate-table select, .cfu-quick-row > input, .cfu-bulk textarea {
  min-width: 0; width: 100%; height: 29px; padding: 0 5px; font: inherit; font-size: 10px;
  border: 1px solid #dedee1; border-radius: 6px; background: #fff; color: #27272a; outline: none;
}
.cfu-plate-table input:focus, .cfu-plate-table select:focus, .cfu-quick-row > input:focus, .cfu-bulk textarea:focus { border-color: #68686d; box-shadow: 0 0 0 1px #1d1d1f14; }
.cfu-plate-table input[type="checkbox"] { width: 13px; height: 13px; accent-color: #1d1d1f; }
.cfu-plate-table button { padding: 0; width: 20px; height: 24px; border: 0; background: transparent; color: #88888d; font-size: 15px; }
.cfu-quick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cfu-quick-row > input { flex: 1 1 140px; }
.cfu-bulk { display: grid; min-width: 0; padding: 9px; border: 1px dashed #dcdcdf; border-radius: 8px; }
.cfu-bulk summary { cursor: pointer; font-size: 10px; font-weight: 600; }
.cfu-bulk textarea { display: block; height: auto; min-height: 85px; padding: 7px; margin: 7px 0; resize: vertical; line-height: 1.5; }
.cfu-bulk[open] > p { margin-top: 7px; }
.cfu-editor button:disabled { opacity: .4; cursor: default; }
.analysis-result-content h4 { margin: 6px 0 0; font-size: 10px; }
.analysis-result-content { min-width: 0; }
.analysis-output-table-wrap { min-width: 0; }

.analysis-dataset-card,
.analysis-result-card,
.analysis-chart-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e1e1e3;
  border-radius: 11px;
  background: #fff;
}

.analysis-dataset-card[hidden],
.analysis-chart-card[hidden] {
  display: none;
}

.analysis-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.analysis-paste-field {
  display: grid;
  gap: 4px;
  color: #747479;
  font-size: 9px;
}

.analysis-paste-field textarea {
  min-height: 52px;
}

.analysis-table-wrap,
.analysis-output-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid #e4e4e6;
  border-radius: 8px;
}

.analysis-table-wrap table,
.analysis-output-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.analysis-table-wrap th,
.analysis-table-wrap td,
.analysis-output-table-wrap th,
.analysis-output-table-wrap td {
  min-width: 64px;
  padding: 5px 6px;
  border-right: 1px solid #ececee;
  border-bottom: 1px solid #ececee;
  text-align: left;
  white-space: nowrap;
}

.analysis-table-wrap th,
.analysis-output-table-wrap th {
  background: #f3f3f4;
  color: #55555a;
  font-weight: 700;
}

.analysis-table-wrap input {
  width: 100%;
  min-width: 56px;
  border: 0;
  background: transparent;
  font-size: 9px;
  outline: none;
}

.analysis-table-wrap td.selected {
  background: #e2e2e5;
  box-shadow: inset 0 0 0 1px #1d1d1f;
}

.analysis-table-wrap td.selected input {
  color: #111113;
}

.analysis-table-wrap th {
  position: relative;
}

.analysis-table-wrap th > button,
.analysis-table-wrap td:last-child > button {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 5px;
  background: #e8e8ea;
  color: #68686d;
  font-size: 11px;
}

.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.analysis-metrics > div {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: #f5f5f6;
}

.analysis-metrics span {
  color: #7a7a7f;
  font-size: 8px;
}

.analysis-metrics strong {
  overflow-wrap: anywhere;
  color: #1d1d1f;
  font-size: 11px;
  line-height: 15px;
}

.analysis-result-empty,
.analysis-result-error {
  min-height: 70px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 8px;
  background: #f7f7f8;
  color: #85858a;
  text-align: center;
  font-size: 10px;
}

.analysis-result-error {
  background: #fff4f2;
  color: #9b4038;
}

.analysis-result-details,
.analysis-result-warnings {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f5f6;
  color: #626267;
  font-size: 9px;
  line-height: 14px;
}

.analysis-result-warnings {
  background: #fff8e8;
  color: #80622b;
}

.analysis-chart {
  width: 100%;
  min-height: 190px;
  overflow: hidden;
  border-radius: 9px;
  background: #fff;
}

.analysis-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.analysis-actions {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #dfdfe1;
  border-radius: 11px;
  background: #f7f7f8;
}

.analysis-save-fields {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(110px, .8fr);
  gap: 7px;
}

.analysis-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.analysis-action-buttons button {
  min-height: 29px;
  padding: 0 9px;
  font-size: 9px;
}

#analysisActionStatus {
  min-height: 13px;
  color: #6d6d72;
  font-size: 9px;
  text-align: right;
}

#analysisActionStatus.is-error {
  color: #a33f38;
}

.analysis-history-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  border-radius: 9px;
}

.analysis-history-item.active,
.analysis-history-item:hover {
  background: #e9e9eb;
}

.analysis-history-item > button:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 5px 8px 8px;
  background: transparent;
  color: #28282b;
  text-align: left;
}

.analysis-history-item strong,
.analysis-history-item span,
.analysis-history-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-history-item strong {
  font-size: 10px;
}

.analysis-history-item span,
.analysis-history-item small,
.analysis-history-empty {
  color: #7d7d82;
  font-size: 8px;
}

.analysis-history-delete {
  align-self: center;
  width: 19px;
  height: 19px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: #88888d;
}

.analysis-history-delete:hover {
  background: #d8d8da;
  color: #333;
}

.analysis-history-empty {
  padding: 14px 6px;
  line-height: 13px;
}

@media (max-width: 1000px) {
  .analysis-workspace {
    grid-template-columns: 128px minmax(280px, 1fr) 140px;
  }

  .analysis-tool-list small {
    display: none;
  }

  .analysis-editor {
    padding-right: 11px;
    padding-left: 11px;
  }

  .analysis-save-fields {
    grid-template-columns: 1fr;
  }

  .analysis-action-buttons button {
    flex: 1 1 42%;
  }
}

@media (max-width: 760px) {
  .analysis-workspace {
    height: auto;
    grid-template-columns: 1fr;
  }

  .analysis-tool-panel,
  .analysis-history-panel {
    max-height: 220px;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid #e6e6e8;
  }

  .analysis-editor {
    max-height: none;
  }

  .analysis-form,
  .analysis-metrics {
    grid-template-columns: 1fr;
  }
}
