:root {
  font-family: Outfit, "Segoe UI", Arial, sans-serif;
  color: var(--pk-1,#c8d1e8);
  background: var(--pk-2,#121828);
  font-size: 13px;
  color-scheme: dark;
  --panel: var(--pk-3,#161e32);
  --line: var(--pk-4,#0f1421);
  --muted: var(--pk-5,#8d98b6);
  --select: var(--pk-6,#466269);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  border: 1px solid transparent;
  background: none;
  border-radius: 3px;
  cursor: pointer;
}
button:hover {
  background: var(--pk-7,#242d43);
}
button:active {
  background: var(--pk-8,#101524);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
input,
select,
textarea {
  border: 1px solid var(--pk-9,#28324b);
  background: var(--pk-10,#111625);
  border-radius: 3px;
  padding: 4px 6px;
  outline: none;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--pk-11,#8ed1e4);
  outline-offset: 1px;
}
input[type="number"] {
  width: 62px;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}
input::-webkit-inner-spin-button {
  opacity: 0.4;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
#menubar {
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--pk-12,#0c111c);
  gap: 8px;
  padding: 0 10px;
  background: var(--pk-13,#141a2c);
  position: relative;
  z-index: 30;
}
.wordmark {
  font-size: 13px;
  letter-spacing: 1.25px;
  font-weight: 700;
  color: var(--pk-14,#d6e6ea);
  margin-right: 6px;
}
#menus {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
}
details {
  position: relative;
  height: 100%;
}
summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 7px;
  height: 100%;
  white-space: nowrap;
  font-size: 12px;
}
summary::-webkit-details-marker {
  display: none;
}
summary:hover,
details[open] > summary {
  background: var(--pk-7,#242d43);
}
.menu-dropdown {
  position: absolute;
  left: 0;
  top: 31px;
  background: var(--pk-15,#151c30);
  border: 1px solid var(--pk-16,#090c14);
  box-shadow: 0 8px 20px var(--pk-17,#0008);
  padding: 5px 0;
  min-width: 260px;
  border-radius: 0 0 4px 4px;
}
.menu-dropdown button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 28px;
  width: 100%;
  padding: 7px 12px;
  border: 0;
  border-radius: 0;
  white-space: nowrap;
}
.menu-dropdown button:hover {
  background: var(--pk-18,#3f8497);
}
.menu-dropdown kbd {
  color: var(--pk-19,#acb4ca);
  font:
    11px Outfit, "Segoe UI", sans-serif;
}
.menu-dropdown hr {
  border: 0;
  border-top: 1px solid var(--pk-20,#0b0f19);
  margin: 4px 7px;
}
.version {
  margin-left: auto;
  color: var(--pk-21,#5f6d94);
  font-size: 11px;
}
.language-wrap select {
  font-size: 12px;
  padding: 2px 5px;
  border: 0;
  background: transparent;
  min-width: 77px;
}
#options {
  height: 42px;
  flex-shrink: 0;
  background: var(--pk-22,#1c2334);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-top: 1px solid var(--pk-23,#21283d);
  border-bottom: 1px solid var(--pk-24,#0d121e);
}
#option-icon {
  display: flex;
  align-items: center;
}
#tool-name {
  font-size: 12px;
  font-weight: 400;
  min-width: 100px;
}
.divider {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: var(--pk-8,#101524);
  margin: 0 2px;
}
#tool-options {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
}
#tool-options label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.option-note {
  color: var(--pk-25,#9da6c0);
}
#workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 286px;
  min-height: 0;
}
#toolbar {
  background: var(--pk-26,#171f34);
  border-right: 1px solid var(--pk-27,#0c101b);
  padding: 6px 4px;
  z-index: 4;
  overflow-y: auto;
}
#tools {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#tools button {
  height: 31px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 2px;
  color: var(--pk-28,#c1cbe5);
}
#tools button:hover {
  border-color: var(--pk-20,#0b0f19);
  background: var(--pk-29,#232b41);
}
#tools button.active {
  background: var(--pk-8,#101524);
  box-shadow: inset 0 1px 2px var(--pk-30,#090c15);
  border: 1px solid var(--pk-9,#28324b);
}
#color-chips {
  position: relative;
  width: 32px;
  height: 72px;
  margin: 18px 0 0;
}
#color-chips input[type="color"] {
  position: absolute;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--pk-31,#919bb9);
  border-radius: 0;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"]::-webkit-color-swatch {
  border: 0;
}
#foreground {
  left: 0;
  top: 0;
  z-index: 2;
}
#background {
  left: 8px;
  top: 10px;
}
#swap-colors {
  position: absolute;
  top: 36px;
  right: -2px;
  font-size: 17px;
  padding: 0;
}
#reset-colors {
  position: absolute;
  top: 37px;
  left: -2px;
  padding: 0;
  font-size: 13px;
}
#document-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--pk-32,#0e1320);
}
#document-tab {
  height: 31px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--pk-33,#080b12);
  background: var(--pk-34,#121829);
  display: flex;
  align-items: center;
  font-size: 12px;
  padding: 0 14px;
  white-space: nowrap;
  overflow: hidden;
}
#document-name {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--pk-35,#d4daec);
}
#document-details {
  color: var(--pk-36,#aab2c8);
  margin-left: 3px;
}
#stage {
  position: relative;
  flex: 1;
  overflow: auto;
  display: flex;
  padding: 40px;
  min-height: 0;
  background: var(--pk-32,#0e1320);
  overscroll-behavior: contain;
}
#canvas-wrap {
  position: relative;
  flex-shrink: 0;
  margin: auto;
  background-color: var(--pk-37,#fff);
  background-image: conic-gradient(var(--pk-38,#cfd7eb) 25%, var(--pk-37,#fff) 0 50%, var(--pk-38,#cfd7eb) 0 75%, var(--pk-37,#fff) 0);
  background-size: 16px 16px;
  box-shadow: 0 2px 15px var(--pk-39,#0009);
}
#canvas,
#overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  display: block;
  inset: 0;
}
#overlay {
  touch-action: none;
}
#statusbar {
  height: 27px;
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0 7px;
  border-top: 1px solid var(--pk-40,#0a0e17);
  background: var(--pk-41,#151b2e);
  font-size: 11px;
  white-space: nowrap;
}
#statusbar input {
  width: 39px;
  font-size: 11px;
  border: 0;
  padding: 2px;
  background: var(--pk-10,#111625);
}
#statusbar button {
  font-size: 11px;
  padding: 2px 5px;
}
#statusbar .divider {
  height: 16px;
}
#status {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--pk-42,#9ba4bf);
}
#status.error {
  color: var(--pk-43,#ffbaaa);
}
#panels {
  display: flex;
  flex-direction: column;
  background: var(--pk-15,#151c30);
  border-left: 1px solid var(--pk-44,#0a0d16);
  min-height: 0;
  overflow: hidden;
}
.panel {
  border-bottom: 1px solid var(--pk-44,#0a0d16);
  background: var(--panel);
}
.panel-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 32px;
  padding: 0 12px;
  border-bottom: 1px solid var(--pk-10,#111625);
  font-size: 12px;
  font-weight: 600;
  background: var(--pk-45,#141b2d);
}
.panel-tabs .muted {
  color: var(--pk-46,#65749c);
  font-weight: 400;
}
.color-panel {
  flex-shrink: 0;
}
.color-preview {
  height: 94px;
  margin: 10px 12px;
  border: 1px solid var(--pk-30,#090c15);
}
.hex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 12px 10px;
  font-size: 12px;
  color: var(--pk-47,#adb5cb);
}
.hex-row input {
  width: 88px;
  font-size: 12px;
  font-family: "DM Mono", Consolas, monospace;
}
#swatches {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  padding: 0 12px;
  gap: 2px;
}
#swatches button {
  min-width: 0;
  padding: 0;
  height: 14px;
  border: 1px solid var(--pk-48,#0f1422);
  border-radius: 0;
}
.properties-panel {
  flex-shrink: 0;
}
.property {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 12px;
  font-size: 12px;
}
.property span:first-child {
  color: var(--pk-49,#8b96b5);
}
.property span:last-child {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#properties {
  padding: 7px 0 9px;
}
.layer-panel {
  flex: 1;
  min-height: 140px;
  display: flex;
  flex-direction: column;
}
.layer-settings {
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  border-bottom: 1px solid var(--pk-50,#111727);
  font-size: 11px;
}
.layer-settings select {
  width: 127px;
  font-size: 11px;
}
.layer-settings label {
  display: flex;
  gap: 3px;
  align-items: center;
}
.layer-settings input {
  width: 44px;
  padding: 3px 1px;
  font-size: 11px;
}
#layers {
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.layer-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 47px;
  border-bottom: 1px solid var(--pk-50,#111727);
  padding: 5px 7px 5px 3px;
  cursor: default;
}
.layer-row.active {
  background: var(--pk-6,#466269);
}
.layer-row > button:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  width: 25px;
  height: 30px;
  flex-shrink: 0;
}
.layer-row > button:first-child svg {
  width: 17px;
  height: 17px;
}
.layer-row > button.off svg {
  opacity: 0.15;
}
.layer-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 34px;
  background: conic-gradient(var(--pk-51,#7582a7) 25%, var(--pk-38,#cfd7eb) 0 50%, var(--pk-51,#7582a7) 0 75%, var(--pk-38,#cfd7eb) 0);
  background-size: 8px 8px;
  border: 1px solid var(--pk-32,#0e1320);
  object-fit: contain;
}
.active .layer-thumb {
  outline: 1px solid var(--pk-52,#b9c9cd);
}
.layer-name {
  flex: 1;
  text-align: left;
  padding: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  min-width: 0;
}
.layer-kind {
  font:
    bold 14px Georgia,
    serif;
  color: var(--pk-19,#acb4ca);
  margin-right: 4px;
}
#layer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 5px 7px;
  border-top: 1px solid var(--pk-48,#0f1422);
  height: 34px;
}
#layer-actions button {
  padding: 3px;
  display: flex;
  align-items: center;
}
#layer-actions svg {
  width: 17px;
  height: 17px;
}
.history-panel {
  height: 174px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
#history {
  overflow: auto;
  flex: 1;
}
.history-item {
  padding: 5px 12px;
  font-size: 12px;
  color: var(--pk-53,#a1aac3);
}
.history-item.current {
  background: var(--pk-54,#424b56);
  color: var(--pk-55,#e7ebf5);
}
.hide-panels {
  grid-template-columns: 42px minmax(0, 1fr) !important;
}
.hide-panels #panels {
  display: none;
}
.busy #workspace,
.busy #options {
  pointer-events: none;
  opacity: 0.7;
}
dialog {
  width: 450px;
  max-width: calc(100vw - 30px);
  border: 1px solid var(--pk-16,#090c14);
  background: var(--pk-26,#171f34);
  padding: 0;
  color: var(--pk-56,#cfd7eb);
  border-radius: 5px;
  box-shadow: 0 16px 80px var(--pk-39,#0009);
}
dialog::backdrop {
  background: var(--pk-57,#0007);
}
#dialog-form {
  padding: 0;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--pk-58,#13192b);
  border-bottom: 1px solid var(--pk-59,#0d111d);
  padding: 10px 15px;
}
.dialog-heading h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.dialog-heading button {
  font-size: 22px;
  line-height: 20px;
  padding: 0 4px;
}
#dialog-body {
  padding: 17px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 65vh;
  overflow: auto;
}
#dialog-body p {
  margin: 0;
  line-height: 1.65;
}
.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
}
.field input,
.field select {
  width: 235px;
  min-width: 0;
  padding: 7px 9px;
}
.field input[type="color"] {
  height: 32px;
}
.field:has(textarea) {
  display: block;
}
.field textarea {
  display: block;
  width: 100%;
  resize: vertical;
  margin-top: 8px;
  min-height: 95px;
  padding: 8px;
  line-height: 1.5;
}
.dialog-note {
  color: var(--pk-19,#acb4ca);
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 4px 20px 18px;
}
.dialog-actions button {
  min-width: 86px;
  border: 1px solid var(--pk-60,#5e6c93);
  border-radius: 16px;
  padding: 5px 15px;
}
.dialog-actions button.primary {
  background: var(--pk-61,#bdc7e3);
  color: var(--pk-62,#101523);
  border-color: var(--pk-38,#cfd7eb);
  font-weight: 600;
}
.dialog-actions button.primary:hover {
  background: var(--pk-63,#e7ebf5);
}
#dialog-error {
  color: var(--pk-64,#ffc4b3);
  font-size: 12px;
  padding: 0 20px 10px;
}
.shortcuts-copy {
  white-space: pre-line;
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--pk-10,#111625);
}
::-webkit-scrollbar-thumb {
  background: var(--pk-65,#2b3550);
  border: 2px solid var(--pk-10,#111625);
  border-radius: 8px;
}
@media (max-height: 800px) {
  .color-preview {
    height: 65px;
  }
  .history-panel {
    height: 144px;
  }
  .property {
    padding-top: 3px;
    padding-bottom: 3px;
  }
  #properties {
    padding: 5px 0;
  }
  .panel-tabs {
    height: 29px;
  }
}
@media (max-width: 1080px) {
  #workspace {
    grid-template-columns: 42px minmax(0, 1fr) 245px;
  }
  .layer-settings select {
    width: 104px;
  }
  .layer-settings {
    gap: 4px;
    padding: 7px 5px;
  }
  #menubar {
    gap: 3px;
    padding: 0 5px;
  }
  summary {
    padding: 8px 5px;
    font-size: 11px;
  }
  .wordmark {
    font-size: 12px;
  }
  .option-note {
    display: none;
  }
}
@media (max-width: 780px) {
  #workspace {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  #panels {
    display: none;
  }
  #menubar {
    height: auto;
    min-height: 32px;
    flex-wrap: wrap;
    gap: 0;
  }
  .wordmark {
    padding: 6px;
  }
  #menus {
    order: 3;
    width: 100%;
    overflow: visible;
    justify-content: flex-start;
  }
  summary {
    padding: 6px 4px;
    font-size: 10px;
  }
  .menu-dropdown {
    position: fixed;
    left: 8px;
    top: 60px;
    max-width: calc(100vw - 16px);
  }
  #options {
    padding: 0 8px;
    gap: 6px;
  }
  #tool-name {
    min-width: 0;
    font-size: 11px;
  }
  #tool-options {
    gap: 7px;
  }
  #tool-options input {
    width: 44px;
  }
  #stage {
    padding: 15px;
  }
  #statusbar #status {
    display: none;
  }
  .hide-panels #panels {
    position: absolute;
    display: flex;
    right: 0;
    top: 104px;
    bottom: 27px;
    width: 245px;
    z-index: 15;
  }
  .hide-panels {
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }
}

.layer-settings input::-webkit-inner-spin-button {
  display: none;
}

/* Keep the supplied lettering: the JPEG is only positioned in its viewport.
   Inversion + screen blending makes its white paper disappear on the dark UI.
   No generated or substitute font is used for the brand wordmark. */
.brand-lockup {
  --brand-symbol-size: 27px;
  --brand-word-width: 77px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-right: 8px;
}
.brand-symbol {
  display: block;
  width: var(--brand-symbol-size);
  height: var(--brand-symbol-size);
  object-fit: contain;
}
.brand-logotype {
  display: block;
  position: relative;
  flex-shrink: 0;
  width: var(--brand-word-width);
  aspect-ratio: 1329 / 353;
  overflow: hidden;
  mix-blend-mode: screen;
}
.brand-logotype img {
  position: absolute;
  display: block;
  width: 154.10083%;
  max-width: none;
  height: auto;
  left: -29.87208%;
  top: -368.83853%;
  filter: invert(1);
}
.brand-lockup-about {
  --brand-symbol-size: 98px;
  --brand-word-width: 223px;
  align-self: center;
  gap: 15px;
  margin: 5px 0 15px;
}
@media (max-width: 780px) {
  #menubar .brand-lockup {
    --brand-symbol-size: 25px;
    --brand-word-width: 71px;
    padding: 3px 0;
  }
  .brand-lockup-about {
    --brand-symbol-size: 72px;
    --brand-word-width: 190px;
    gap: 10px;
  }
}

/* Interactive history and selection/filter controls. */
#history-controls {
  margin-left: auto;
  display: flex;
  gap: 3px;
}
#history-controls button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 4px;
}
#history-controls svg {
  width: 17px;
  height: 17px;
}
.history-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 27px;
}
.history-item:hover {
  background: var(--pk-66,#1d2436);
}
.history-item.current {
  background: var(--pk-54,#424b56);
}
.history-item.future {
  color: var(--pk-67,#546184);
  font-style: italic;
}
.history-item:focus-visible {
  outline: 1px solid var(--pk-68,#84e4ff);
  outline-offset: -2px;
}
#tool-options input[type="checkbox"],
.preview-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--pk-69,#41b7d8);
}
#tool-options .check-option {
  gap: 6px;
  white-space: nowrap;
}
#selection-mode {
  width: auto;
  max-width: 155px;
}
.preview-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.filter-progress {
  min-height: 18px;
  font-size: 12px;
  color: var(--pk-70,#a5deee);
  margin: 0;
}
.menu-dropdown {
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}
