:root {
  color-scheme: light;
  font-family: "Segoe UI Variable", Inter, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  font-size: 14px;
  color: #24324b;
  background: #f3f5fa;
  --ink: #24324b;
  --muted: #6c7890;
  --teal: #146f67;
  --accent: #ce5137;
  --line: #e0e5ef;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --navy: #172339;
  --mint: #e5f3ee;
  --shadow: 0 8px 28px #23324a08, 0 1px 3px #23324a05;
  --sidebar-width: 224px;
  --titlebar-height: 42px;
}

/* Manual Drive keeps connection settings separate from the reviewed file list. */
.driveHeader {
  align-items: center;
}
.driveIntro {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.65;
}
.driveMountStatus {
  padding: 7px 11px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
  background: #edf0f5;
  color: var(--muted);
}
.driveMountStatus.active {
  color: #136c54;
  background: #e5f3ee;
}
.driveConfig {
  margin-top: 22px;
}
.driveConfigFields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 16px;
  margin: 18px 0 10px;
}
.driveConfigFields label {
  min-width: 0;
}
.driveConfigFields input,
.driveConfigFields select {
  width: 100%;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}
.driveFolderRow {
  display: flex;
  gap: 8px;
  align-items: center;
}
.driveFolderRow button {
  flex: none;
  margin-top: 7px;
}
.driveFolderRow input {
  min-width: 0;
  text-overflow: ellipsis;
}
.driveActions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}
.driveComparison {
  margin-top: 26px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.driveComparisonHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.driveComparisonHeader h2 {
  margin: 0 0 5px;
}
.driveComparisonHeader .help {
  margin: 0;
}
.driveDetail {
  color: #43526b;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.driveError,
.driveReviewNotice {
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.driveError {
  color: #9e3437;
  background: #fff0ee;
  border: 1px solid #efd0cc;
}
.driveReviewNotice {
  color: #795214;
  background: #fff6df;
  border: 1px solid #eedfb8;
}
.driveSummary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0;
}
.driveSummary span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #56647a;
  background: var(--surface-soft);
  font-size: 11px;
}
.driveFilters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
}
.driveFilters > label:first-child {
  flex: 1 1 180px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.driveFilters input[type="search"] {
  display: block;
  width: 100%;
  max-width: 340px;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.driveFilters .checkbox {
  margin: 15px 0 0;
  font-size: 12px;
}
.driveFilters button {
  margin-top: 15px;
}
.driveTableScroll {
  overflow: auto;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.driveTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.driveTable caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.driveTable th {
  position: sticky;
  top: 0;
  text-align: left;
  background: #f5f7fb;
  color: #6a7890;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  z-index: 1;
}
.driveTable th,
.driveTable td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}
.driveTable tr:last-child td {
  border-bottom: 0;
}
.driveTable td:first-child,
.driveTable th:first-child {
  width: 52px;
  text-align: center;
}
.driveTable input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}
.driveTable code {
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: none;
  padding: 0;
}
.driveTable td:nth-child(n + 4) {
  color: var(--muted);
  white-space: nowrap;
}
.driveFileStatus {
  display: inline-block;
  font-size: 10px;
  font-weight: 650;
  padding: 4px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.driveFileStatus.synced {
  color: #176a52;
  background: #e4f3ec;
}
.driveFileStatus.local {
  color: #855c12;
  background: #fff3d6;
}
.driveFileStatus.remote,
.driveFileStatus.active {
  color: #2c608a;
  background: #e9f2fb;
}
.driveFileStatus.conflict {
  color: #a34532;
  background: #ffece5;
}
.driveEmpty {
  text-align: center;
  color: var(--muted);
  padding: 28px !important;
}
.driveTransferActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
}
.drivePagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.drivePagination > span {
  margin-right: auto;
}
.driveTransferActions > span {
  margin-right: auto;
}
.driveConfirmDialog {
  width: min(570px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 16px;
  color: var(--ink);
  box-shadow: 0 25px 100px #14233840;
}
.driveConfirmDialog::backdrop {
  background: #15253c70;
}
.driveConfirmDialog h2 {
  margin: 0 0 14px;
}
.driveConfirmDialog p {
  color: #58667d;
  line-height: 1.7;
}
.driveRiskList {
  max-height: 220px;
  overflow: auto;
  padding-left: 20px;
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .driveConfigFields {
    grid-template-columns: 1fr;
  }
  .driveConfigFields > label:last-child {
    max-width: 220px;
  }
  .driveComparison {
    padding: 18px;
  }
  .driveTable th,
  .driveTable td {
    padding: 9px 8px;
  }
}
@media (max-width: 600px) {
  .driveHeader,
  .driveComparisonHeader {
    align-items: flex-start;
    flex-direction: column;
  }
  .driveFolderRow {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }
  .driveFolderRow button {
    align-self: flex-start;
  }
  .driveTransferActions {
    align-items: stretch;
    flex-direction: column;
  }
  .driveTransferActions > span {
    margin-right: 0;
  }
  .driveTable thead {
    display: none;
  }
  .driveTable tbody,
  .driveTable tr {
    display: block;
  }
  .driveTable tr {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 10px 6px;
    border-bottom: 1px solid var(--line);
  }
  .driveTable td {
    display: block;
    border: 0;
    padding: 4px 7px;
  }
  .driveTable td:first-child {
    width: auto;
    grid-row: 1/5;
  }
  .driveTable td:nth-child(n + 2) {
    grid-column: 2;
  }
  .driveTable td[data-label]::before {
    content: attr(data-label) ": ";
  }
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
.workspaceTools label:focus-within {
  outline: 3px solid #2b9188;
  outline-offset: 3px;
}
.primary {
  padding: 12px 18px;
  color: white;
  background: var(--accent);
  box-shadow:
    0 4px 10px #ce513724,
    inset 0 1px #ffffff24;
}
.primary:not(:disabled):hover {
  background: #b9452e;
  box-shadow: 0 5px 16px #ce51372c;
}
.secondary {
  padding: 10px 15px;
  color: #41516d;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px #23324a04;
}
.secondary:not(:disabled):hover {
  background: #f1f5fa;
  border-color: #c7d1e1;
}
.quiet {
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
}
.quiet:not(:disabled):hover {
  background: #e9edf5;
  color: var(--ink);
}
.danger {
  color: #b14346;
}
.danger:not(:disabled):hover {
  color: #a02c35;
  background: #fff0f0;
}
.small {
  padding: 7px 9px;
  font-size: 11px;
}
.uiIcon,
.toolIcon {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The shell keeps a quiet workspace beside the dark navigation rail. */
.windowTitlebar {
  height: var(--titlebar-height);
  display: flex;
  align-items: center;
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
  user-select: none;
}
.windowDrag {
  height: 100%;
  padding-left: 19px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  color: #52617a;
  font-size: 11px;
  font-weight: 600;
  -webkit-app-region: drag;
  app-region: drag;
}
.windowMark {
  color: var(--accent);
  font-size: 19px;
}
.windowContext {
  margin-left: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: #8893a7;
  font-size: 10px;
  font-weight: 400;
}
.windowActions {
  display: flex;
  gap: 4px;
  padding-right: 9px;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.windowActions button {
  width: 32px;
  height: 29px;
  border-radius: 7px;
  background: transparent;
  color: #77849b;
}
.windowActions button:hover {
  background: #edf1f7;
}
.windowActions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}
.windowActions #windowClose:hover {
  background: #fbe9e6;
  color: #b84636;
}
#application {
  display: flex;
  min-height: 100vh;
  padding-top: var(--titlebar-height);
}
.sidebar {
  position: fixed;
  inset: var(--titlebar-height) auto 0 0;
  width: var(--sidebar-width);
  padding: 28px 18px 20px;
  display: flex;
  flex-direction: column;
  color: #edf1f7;
  background: linear-gradient(165deg, #1e2d46 0%, #172339 58%, #17263b 100%);
  border-right: 1px solid #152036;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.9px;
}
.brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 3px 6px #0a152330);
}
.brand span {
  display: block;
  margin-top: 3px;
  color: #8fa0ba;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.6px;
}
.roomBadge {
  margin: 28px 0 18px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #ffffff05;
  border: 1px solid #ffffff0e;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.5;
}
.statusDot {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: #73829b;
}
.connected .statusDot {
  background: #8ed3b6;
  box-shadow: 0 0 0 4px #8ed3b610;
}
.roomBadge div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.roomBadge span:not(.statusDot) {
  display: block;
  margin-top: 3px;
  color: #97a7c0;
  font-size: 10px;
}
#newCapture {
  width: 100%;
  padding: 12px 10px;
  font-size: 12px;
  flex-wrap: wrap;
}
kbd {
  margin-left: auto;
  padding: 3px 5px;
  border-radius: 5px;
  background: #ffffff1c;
  color: inherit;
  font-family: inherit;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}
.sidebar nav {
  display: grid;
  gap: 5px;
  margin-top: 24px;
}
.nav {
  width: 100%;
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid transparent;
  color: #a6b4cc;
  background: transparent;
  font-size: 12px;
}
.nav:not(:disabled):hover {
  background: #ffffff07;
  color: #fff;
}
.nav.active {
  color: #eef7f5;
  background: #ffffff0d;
  border-color: #ffffff0c;
  box-shadow: inset 3px 0 #89cbb1;
}
.nav > span:first-child {
  width: 19px;
  font-size: 19px;
  font-weight: 400;
}
.nav .uiIcon {
  color: #8e9eb9;
}
.nav.active .uiIcon {
  color: #9dd5be;
}
.count {
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 6px;
  background: #ffffff0f;
  color: #c7d5e9;
  font-size: 10px;
}
.sidebarNote {
  margin-top: auto;
  padding: 35px 8px 12px;
  color: #91a0b9;
  font-size: 11px;
  line-height: 1.65;
}
.sidebarNote b {
  color: #c6d1e2;
  font-size: 11px;
  font-weight: 600;
}
.sidebarNote p {
  color: inherit;
  margin: 7px 0 0;
}
.sidebar .quiet {
  color: #a5b4cb;
  align-self: flex-start;
  font-size: 11px;
}
.sidebar .quiet:hover {
  background: #ffffff08;
  color: #fff;
}
.sidebar footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #ffffff0c;
  color: #7e90ad;
  font-size: 9px;
  letter-spacing: 1px;
}
.sidebar footer span {
  float: right;
}
main {
  width: calc(100% - var(--sidebar-width));
  min-height: calc(100vh - var(--titlebar-height));
  margin-left: var(--sidebar-width);
  padding: 32px 32px;
  min-width: 0;
}
main:has(> #editorView:not([hidden])) {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--titlebar-height));
  min-height: 0;
  overflow-y: auto;
}
main:has(> #editorView:not([hidden])) > #notice {
  flex: none;
}

/* Shared typography and form controls. */
.eyebrow {
  margin-bottom: 9px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}
h1 {
  margin: 0 0 10px;
  color: #202d45;
  font-size: 32px;
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -1px;
}
h2 {
  margin: 0 0 18px;
  color: #30405a;
  font-size: 16px;
  line-height: 1.4;
}
p {
  color: var(--muted);
  line-height: 1.65;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #516079;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dce3ed;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input:hover,
textarea:hover,
select:hover {
  border-color: #bdc9da;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #86b8b0;
}
input::placeholder,
textarea::placeholder {
  color: #909cb0;
  font-weight: 400;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--teal);
  flex: none;
}
input[type="range"] {
  accent-color: var(--teal);
}
.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}
.formRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.help {
  font-size: 11px;
  line-height: 1.7;
}
.lead {
  max-width: 570px;
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.8;
}
.pageHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.pageHeader p {
  margin: 0;
  font-size: 12px;
}
#notice {
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid #cbe3d9;
  border-radius: 11px;
  background: #ebf6f1;
  color: #2f6d59;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
#notice.error {
  border-color: #efd0c9;
  background: #fff1ee;
  color: #a34233;
}

/* Connection, settings and the capture library. */
#loginView {
  max-width: 660px;
  margin: 38px auto;
}
.loginCard,
.settingsCard {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.loginCard h2 {
  margin-bottom: 0;
}
.loginCard .primary,
.settingsCard .primary {
  justify-self: start;
}
.steps {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 11px;
}
.steps > span {
  display: flex;
  align-items: center;
  gap: 9px;
}
.steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid #d5e8df;
  border-radius: 8px;
  background: #eaf4ef;
  color: var(--teal);
  font-size: 10px;
  font-weight: 600;
}
.settingsCard {
  max-width: 740px;
  margin: 0 0 22px;
  gap: 15px;
  padding: 24px;
}
.settingsCard h2,
.settingsCard p {
  margin: 0;
}
.settingsCard h2 {
  padding-bottom: 13px;
  border-bottom: 1px solid #edf0f6;
}
.settingsCard code {
  display: block;
  padding: 12px 14px;
  border: 1px solid #e7ecf3;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--teal);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.settingsCard button {
  justify-self: start;
}
.settingsCard pre {
  margin: 0;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.settingsCard label:has(> input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}
.libraryBar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.search {
  flex-direction: row;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 460px;
}
.search > span,
.search > .uiIcon {
  position: absolute;
  left: 14px;
  color: #8a99af;
  font-size: 20px;
  pointer-events: none;
}
.search input {
  padding: 12px 14px 12px 42px;
  font-weight: 400;
  box-shadow: 0 1px 3px #23324a04;
}
.libraryBar > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.captureGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 20px;
}
.captureCard {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.captureCard:hover {
  border-color: #c8d4e4;
  box-shadow: 0 10px 28px #23324a0d;
}
.capturePreview {
  width: 100%;
  height: 166px;
  overflow: hidden;
  border-radius: 0;
  border-bottom: 1px solid #edf0f5;
  background: #e9edf4;
}
.capturePreview:not(:disabled):hover {
  background: #e2e8f1;
}
.capturePreview img {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}
.capturePreview span {
  color: #94a4bd;
  font-size: 30px;
}
.cardBody {
  padding: 18px;
}
.cardBody h2 {
  margin: 0 0 7px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.cardBody p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
  margin: 0;
  font-size: 11px;
}
.cardMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 15px;
  color: #8491a6;
  font-size: 10px;
}
.cardActions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}
.cardActions .secondary {
  padding: 7px 11px;
  font-size: 11px;
}
.cardActions .danger {
  margin-left: auto;
}
.captureSelect {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}
.empty {
  max-width: 540px;
  margin: 62px auto;
  padding: 42px 24px;
  text-align: center;
  border: 1px dashed #d5deea;
  border-radius: 20px;
  background: #ffffff60;
}
.emptyIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 20px;
  border: 1px solid #d4e6df;
  border-radius: 23px;
  background: #eaf4ef;
  color: var(--teal);
  font-size: 42px;
  box-shadow: 0 5px 12px #1b725b08;
}
.empty h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.3px;
}
.empty p {
  margin-bottom: 23px;
  font-size: 12px;
}

/* The editor gives the image room, with tools and properties on separate surfaces. */
#editorView {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.editorHeader {
  flex: none;
  margin-bottom: 20px;
}
.editorHeader h1 {
  font-size: 27px;
}
.editorHeader .eyebrow {
  margin-bottom: 7px;
}
.editorLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 18px;
  flex: 1;
  min-height: 300px;
}
.drawingPanel {
  display: flex;
  flex-direction: column;
  align-self: start;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow);
}
#toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 10px;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
  flex: none;
}
#toolbar button {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #6f7d94;
  font-size: 20px;
  font-weight: 400;
}
#toolbar button:not(:disabled):hover {
  background: #f0f4f9;
  color: #364c69;
}
#toolbar button.active {
  border-color: #b9d9cc;
  background: #e7f3ee;
  color: #126d60;
  box-shadow: 0 1px 3px #1b725b08;
}
#toolbar .toolIcon {
  width: 20px;
  height: 20px;
}
.separator {
  width: 1px;
  margin: 5px 4px;
  background: var(--line);
}
.workspaceTools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 12px;
  border-bottom: 1px solid #e8edf4;
  background: #fafbfd;
  font-size: 11px;
  flex: none;
}
.workspaceTools button,
.editorActions .small {
  padding: 7px 10px;
  font-size: 11px;
  white-space: nowrap;
}
.workspaceTools output {
  min-width: 46px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
#libraryView > .workspaceTools {
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffffa6;
}
.workspaceTools label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
}
.workspaceTools
  input:not([type="checkbox"]):not([type="range"]):not([type="file"]) {
  width: 190px;
  max-width: 100%;
  padding: 8px 10px;
  font-size: 11px;
}
.workspaceTools select {
  width: auto;
  max-width: 100%;
  padding: 8px 10px;
  font-size: 11px;
}
.workspaceTools label:has(input[type="file"]) {
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #41516d;
}
.workspaceTools input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.canvasScroll {
  flex: 1;
  min-height: 100px;
  overflow: auto;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background-color: #e9edf4;
  background-image: radial-gradient(#bcc7d554 0.8px, transparent 0.8px);
  background-size: 12px 12px;
}
.canvasStack {
  position: relative;
  max-width: none;
  max-height: none;
  display: block;
  margin: auto;
  flex: none;
  box-shadow:
    0 8px 28px #23324a24,
    0 0 0 1px #23324a0a;
}
#artboard {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
#selectionCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.canvasStack.zoomed {
  margin: 0;
}
.canvasFooter {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #e8edf4;
  color: #7a879d;
  background: #fff;
  font-size: 9px;
  flex: none;
}
#imageDimensions {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.properties {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  max-height: 100%;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow);
}
.properties > * {
  flex-shrink: 0;
}
.properties label {
  font-size: 11px;
}
.properties input,
.properties textarea {
  padding: 9px 10px;
  font-size: 12px;
  flex-shrink: 0;
}
.properties h2 {
  margin: 0;
  color: #526078;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.properties .formRow {
  min-height: 64px;
  gap: 10px;
}
.propertyDivider {
  height: 1px;
  margin: 2px 0;
  background: #edf0f5;
}
.properties input[type="color"] {
  width: 100%;
  height: 37px;
  padding: 4px;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}
input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}
.stampChoices {
  display: flex;
  gap: 7px;
}
.stampChoices button {
  width: 32px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #5e708c;
}
.stampChoices button:hover {
  background: var(--mint);
  color: var(--teal);
}
.layerHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.layerHeading h2 > span {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #edf1f7;
  color: #77869d;
  font-size: 10px;
}
.layerList {
  display: grid;
  gap: 5px;
  min-height: 0;
  max-height: 150px;
  overflow: auto;
}
.layerItem {
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid #e9edf4;
  border-radius: 8px;
  background: #f8fafd;
  color: #61708a;
  font-size: 10px;
  font-weight: 400;
}
.layerItem:hover {
  background: #eef3f9;
}
.layerItem.active {
  border-color: #b4d8c8;
  background: #e8f4ee;
  color: #196b58;
}
.properties details {
  margin: 3px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.properties details summary {
  cursor: pointer;
  margin-bottom: 10px;
  color: #526078;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}
.properties details label {
  display: flex;
  margin: 10px 0;
  font-size: 11px;
}
.properties details label:has(> input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  gap: 9px;
}
.properties details textarea,
.properties details input:not([type="checkbox"]) {
  width: 100%;
}
.properties details button {
  margin-top: 7px;
  margin-right: 4px;
}
.properties .workspaceTools {
  margin: 0 -1px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: transparent;
}
#ocrText {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.7;
}
#copyOcr,
.ocrCopyAction:not(:disabled) {
  color: var(--teal);
  border-color: #c9e2d8;
  background: #f0f8f4;
}
.ocrCopyAction:disabled {
  background: #f7f9fc;
  color: #8693a8;
  opacity: 0.6;
}
.ocrActions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ocrStatus {
  margin: 8px 0 0;
  color: #58776e;
}
.editorActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  flex: none;
}
.editorActions p {
  margin: 0;
  font-size: 10px;
}
.editorActions > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.editorActions button {
  font-size: 12px;
}
.autosaveStatus {
  color: #557469;
  font-size: 10px;
}

/* Additional workspace views use the same cards and controls. */
.compareDialog {
  width: min(1000px, 90vw);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafd;
  color: var(--ink);
  box-shadow: 0 20px 80px #17233940;
}
.compareDialog::backdrop {
  background: #172339bb;
  backdrop-filter: blur(4px);
}
.compareImages {
  position: relative;
}
.compareImages img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}
.compareImages img + img {
  position: absolute;
  inset: 0;
  height: 100%;
}
.compareImages canvas {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}
.compareDialog input {
  width: 100%;
  margin: 16px 0;
}
.discussionItem {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.discussionItem p {
  white-space: pre-wrap;
}
.discussionItem small {
  display: block;
  margin-bottom: 8px;
  color: #72839a;
}
.recordPreview {
  position: relative;
  max-width: 600px;
  margin: 15px 0;
  border-radius: 10px;
  overflow: hidden;
}
.recordPreview canvas {
  display: block;
  width: 100%;
  height: auto;
}
.recordPreview canvas + canvas {
  position: absolute;
  inset: 0;
  height: 100%;
  touch-action: none;
}
.commentPins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.commentPin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  pointer-events: auto;
  font-size: 11px;
  box-shadow: 0 2px 6px #23324a40;
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: #bec9da;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #98a9c1;
}
.sidebar::-webkit-scrollbar-thumb {
  background-color: #60718b;
}

@media (max-width: 1120px) {
  :root {
    --sidebar-width: 204px;
  }
  .sidebar {
    padding: 24px 15px 18px;
  }
  main {
    padding: 26px 24px;
  }
  .editorLayout {
    grid-template-columns: minmax(0, 1fr) 232px;
    gap: 13px;
  }
  .properties {
    padding: 15px;
  }
  .editorActions {
    align-items: flex-start;
  }
  .editorActions #saveHint {
    display: none;
  }
}
@media (max-width: 900px) {
  :root {
    --sidebar-width: 184px;
  }
  .sidebar {
    padding: 22px 12px 16px;
  }
  .brand {
    gap: 9px;
    font-size: 22px;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  .brand span {
    font-size: 8px;
    letter-spacing: 1.1px;
  }
  #newCapture {
    gap: 6px;
  }
  #shortcutLabel {
    width: 100%;
    margin: 0 13px;
  }
  main {
    padding: 24px 18px;
  }
  .editorLayout {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 10px;
  }
  .properties {
    padding: 13px;
  }
  .canvasScroll {
    padding: 18px;
  }
  .canvasFooter > span:last-child {
    display: none;
  }
  .editorActions > div {
    gap: 6px;
  }
  .editorActions button {
    padding: 9px 12px;
    font-size: 11px;
  }
}
@media (max-height: 800px) {
  .sidebarNote {
    padding-top: 20px;
  }
  #loginView {
    margin: 12px auto;
  }
  .pageHeader {
    margin-bottom: 20px;
  }
  .pageHeader h1 {
    font-size: 27px;
  }
  .editorHeader {
    margin-bottom: 15px;
  }
  .editorHeader h1 {
    font-size: 25px;
  }
}
@media (max-width: 760px) {
  #application {
    flex-direction: column;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 13px 16px;
    border-right: 0;
  }
  .brand {
    grid-column: 1;
  }
  .roomBadge {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  #newCapture {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    width: auto;
    padding: 11px 14px;
  }
  #shortcutLabel {
    display: none;
  }
  .sidebar nav {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
  }
  .nav {
    width: auto;
    flex: 1;
    padding: 9px 11px;
  }
  .sidebarNote,
  .sidebar footer {
    display: none;
  }
  .sidebar #logout {
    grid-column: 1 / -1;
    padding: 0;
  }
  main {
    width: 100%;
    margin-left: 0;
    padding: 24px 18px;
  }
  main:has(> #editorView:not([hidden])) {
    display: block;
    height: auto;
    overflow: visible;
  }
  h1 {
    font-size: 28px;
  }
  #loginView {
    margin: 12px auto;
  }
  .loginCard,
  .settingsCard {
    padding: 21px;
  }
  #editorView {
    height: auto;
    min-height: 0;
    flex: none;
  }
  .editorLayout {
    grid-template-columns: minmax(0, 1fr);
    flex: none;
  }
  .drawingPanel {
    height: min(560px, 65vh);
    min-height: 320px;
  }
  .properties {
    max-height: 460px;
  }
  .editorActions {
    align-items: stretch;
  }
  .editorActions > div {
    width: 100%;
  }
  .editorActions #copySave {
    margin-left: auto;
  }
  .pageHeader {
    gap: 12px;
  }
  .pageHeader > button {
    flex-shrink: 0;
  }
  .steps {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px;
  }
}
@media (max-width: 420px) {
  .sidebar {
    padding: 15px 12px;
    gap: 11px;
  }
  .brand {
    font-size: 20px;
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  #newCapture {
    font-size: 11px;
    padding: 10px;
  }
  main {
    padding: 22px 12px;
  }
  .formRow {
    grid-template-columns: minmax(0, 1fr);
  }
  .properties .formRow {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .pageHeader {
    align-items: flex-start;
  }
  .pageHeader h1 {
    font-size: 24px;
  }
  .libraryBar {
    flex-wrap: wrap;
    gap: 9px;
  }
  .libraryBar > span {
    margin-left: 0;
  }
  .empty {
    padding: 30px 14px;
    margin: 24px auto;
  }
}
.webStudio .windowTitlebar {
  display: none !important;
}
.webStudio .sidebar {
  top: 0;
}
.webStudio #application {
  padding-top: 0;
}
.webStudio main {
  min-height: 100vh;
}
.webStudio main:has(> #editorView:not([hidden])) {
  height: 100vh;
  min-height: 0;
}
@media (max-width: 760px) {
  .webStudio main:has(> #editorView:not([hidden])) {
    height: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
