.cg-studio {
  --cg-ink: #18232e;
  --cg-line: #d8ddd7;
  --cg-lime: #d1f952;
  --cg-paper: #fcfcf8;
  color: var(--cg-ink);
  max-width: 1536px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4.5vw, 76px) 64px;
  font:
    400 16px/1.5 'DM Sans',
    Arial,
    sans-serif;
}
.cg-studio * {
  box-sizing: border-box;
}
.cg-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.cg-heading h1 {
  margin: 7px 0 9px;
  color: var(--cg-ink);
  font:
    800 clamp(43px, 6vw, 84px)/0.98 'Barlow Condensed',
    'Arial Narrow',
    Arial,
    sans-serif;
  letter-spacing: -0.015em;
}
.cg-heading h1 span {
  color: #79960e;
}
.cg-heading p {
  margin: 0;
  max-width: 56ch;
  color: #43505a;
}
.cg-heading .cg-breadcrumb {
  font-size: 0.8rem;
}
.cg-breadcrumb a {
  text-decoration: underline;
}
.cg-breadcrumb span {
  margin: 0 6px;
}
.cg-studio a {
  color: var(--cg-ink);
  text-underline-offset: 3px;
}
.cg-plain-link {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}
.cg-workspace {
  display: grid;
  grid-template-columns: minmax(188px, 0.83fr) minmax(0, 2.85fr) minmax(185px, 0.84fr);
  border: 1px solid var(--cg-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cg-paper);
  box-shadow: 0 3px 24px #13251d08;
}
.cg-editor-side {
  padding: 19px 15px;
  background: #fff;
}
.cg-side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 15px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--cg-line);
}
.cg-side-heading span {
  font-size: 19px;
}
.cg-side-heading h2,
.cg-editor-side h3 {
  font:
    750 16px/1.3 'DM Sans',
    Arial,
    sans-serif;
  margin: 0;
  letter-spacing: -0.025em;
  color: var(--cg-ink);
}
.cg-editor-side h3 {
  margin: 20px 0 8px;
  font-size: 0.9rem;
}
.cg-label,
.cg-range,
.cg-color-line,
.cg-two label,
.cg-palette legend {
  display: block;
  margin: 10px 0 4px;
  font:
    650 13px/1.35 'DM Sans',
    Arial,
    sans-serif;
  color: var(--cg-ink);
}
.cg-studio
  :is(
    input:not([type='range']):not([type='checkbox']):not([type='color']):not([type='file']),
    select
  ) {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #aab6af;
  border-radius: 6px;
  color: var(--cg-ink);
  background: #fff;
  font:
    400 14px/1.35 'DM Sans',
    Arial,
    sans-serif;
}
.cg-studio input[type='range'] {
  width: 100%;
  padding: 3px 0;
  margin: 0;
  accent-color: #3148b9;
}
.cg-studio input[type='color'] {
  width: 32px;
  height: 30px;
  padding: 2px;
  border: 1px solid #9ca8a7;
  background: white;
  border-radius: 4px;
  cursor: pointer;
}
.cg-studio button,
.cg-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #a6b0ae;
  border-radius: 6px;
  color: var(--cg-ink);
  background: white;
  font:
    650 13px/1.3 'DM Sans',
    Arial,
    sans-serif;
  cursor: pointer;
  text-align: center;
}
.cg-studio button:hover:not(:disabled),
.cg-file-label:hover {
  border-color: var(--cg-ink);
  background: #f4f5eb;
}
.cg-studio button:disabled {
  opacity: 0.42;
  cursor: default;
}
.cg-studio :focus-visible {
  outline: 3px solid #293ed7;
  outline-offset: 2px;
}
.cg-studio .cg-primary {
  background: var(--cg-ink);
  color: #fff;
  border-color: var(--cg-ink);
}
.cg-studio .cg-primary:hover:not(:disabled) {
  background: #324450;
  color: white;
}
.cg-primary span {
  color: var(--cg-lime);
}
.cg-studio #cg-apply {
  width: 100%;
  margin-top: 5px;
}
.cg-palette {
  border: 0;
  margin: 16px 0 0;
  padding: 0;
}
.cg-palette legend {
  margin: 0 0 5px;
}
.cg-palette #cg-swatches {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cg-studio .cg-swatch {
  border-radius: 50%;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #acb4af;
}
.cg-studio .cg-swatch[aria-pressed='true'] {
  box-shadow: 0 0 0 2px var(--cg-ink);
}
.cg-color-line,
.cg-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.cg-range output {
  font-weight: 400;
}
.cg-add,
.cg-layer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cg-studio .cg-file {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.cg-add:has(.cg-file:focus-visible) .cg-file-label {
  outline: 3px solid #293ed7;
}
.cg-editor-side small,
.cg-quality {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #4c5963;
}
.cg-quality:not(:empty) {
  margin-top: 8px;
}
.cg-artboard {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-inline: 1px solid var(--cg-line);
}
.cg-bar,
.cg-stage-legend,
.cg-work-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
}
.cg-bar {
  background: #f6f7f2;
  border-bottom: 1px solid var(--cg-line);
  font-size: 14px;
}
.cg-bar div {
  display: flex;
  gap: 4px;
}
.cg-bar button {
  min-width: 31px;
  min-height: 31px;
  padding: 2px 6px;
  font-size: 20px;
}
.cg-stage {
  flex: 1;
  display: grid;
  align-items: center;
  min-height: 230px;
  overflow: hidden;
  background-color: #edf0e8;
  background-image: radial-gradient(#bbc3b9 1px, transparent 1px);
  background-size: 12px 12px;
}
.cg-stage #cg-canvas {
  display: block;
  height: auto;
  fill: black;
  stroke: none;
  stroke-width: 1;
  width: 100%;
  max-height: 590px;
  touch-action: none;
  user-select: none;
}
.cg-stage-legend {
  border-block: 1px solid var(--cg-line);
  font-size: 0.76rem;
  color: #45545c;
}
.cg-stage-legend label {
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
}
.cg-stage-legend input {
  accent-color: #3148b9;
}
.cg-work-actions {
  justify-content: flex-start;
  padding-top: 13px;
}
.cg-artboard #cg-status {
  margin: 0 14px 12px;
  font-size: 0.81rem;
  min-height: 1.3em;
}
.cg-artboard #cg-status[data-error='true'],
.cg-quality[data-error='true'] {
  color: #9b1623;
}
.cg-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cg-two label {
  font-size: 0.73rem;
}
.cg-two input {
  margin-top: 4px !important;
}
.cg-layer-actions {
  margin-top: 10px;
}
.cg-layer-actions button {
  font-size: 0.73rem;
}
.cg-inspector #cg-no-layer {
  font-size: 0.85rem;
}
.cg-help {
  border-bottom: 1px solid var(--cg-line);
  margin-top: 15px;
  padding: 8px 0 11px;
}
.cg-help summary {
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}
.cg-help p {
  font-size: 0.9rem;
  max-width: 90ch;
}
.cg-studio [hidden] {
  display: none !important;
}
@media (max-width: 1050px) {
  .cg-workspace {
    grid-template-columns: minmax(180px, 0.8fr) minmax(0, 2.5fr);
  }
  .cg-inspector {
    grid-column: 1 / -1;
    border-top: 1px solid var(--cg-line);
  }
  .cg-inspector #cg-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 15px;
    align-items: center;
  }
  .cg-inspector #cg-controls :is(.cg-range, .cg-color-line, .cg-two label) {
    margin: 5px 0;
  }
  .cg-inspector #cg-controls .cg-range {
    align-self: end;
  }
  .cg-inspector #cg-controls input[type='range'] {
    grid-column: span 2;
  }
  .cg-inspector #cg-layers {
    max-width: 330px;
  }
  .cg-inspector #cg-text-controls {
    grid-column: span 2;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    align-items: center;
  }
  .cg-artboard {
    border-right: 0;
  }
}
@media (max-width: 700px) {
  .cg-studio {
    padding-top: 20px;
  }
  .cg-heading {
    display: block;
    margin-bottom: 17px;
  }
  .cg-plain-link {
    display: inline-block;
    margin-top: 10px;
  }
  .cg-workspace {
    display: flex;
    flex-direction: column;
  }
  .cg-artboard {
    order: -1;
    border-inline: 0;
    border-bottom: 1px solid var(--cg-line);
  }
  .cg-stage {
    min-height: 184px;
  }
  .cg-stage #cg-canvas {
    max-height: 46vh;
  }
  .cg-editor-side {
    padding: 14px;
  }
  .cg-inspector {
    display: block;
  }
  .cg-inspector #cg-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .cg-inspector #cg-layer-color, .cg-inspector #cg-graphic-controls {
    grid-column: 1 / -1;
  }
  .cg-inspector #cg-controls input[type='range'] {
    grid-column: auto;
  }
  .cg-inspector #cg-controls .cg-two,
  .cg-inspector #cg-controls .cg-layer-actions {
    grid-column: span 2;
  }
  .cg-studio button,
  .cg-file-label {
    min-height: 42px;
  }
  .cg-studio .cg-swatch {
    width: 32px;
    height: 32px;
  }
  .cg-bar,
  .cg-work-actions,
  .cg-stage-legend {
    padding: 8px 11px;
  }
  .cg-work-actions {
    gap: 5px;
  }
  .cg-work-actions button {
    padding: 7px 8px;
    font-size: 12px;
  }
  .cg-artboard #cg-status {
    margin-bottom: 7px;
  }
  .cg-inspector #cg-layers {
    max-width: 100%;
  }
}

.cg-guide-key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cg-guide-key i {
  width: 14px;
  border-top: 2px dashed #57645c;
}
.cg-guide-key i:nth-of-type(2) {
  border-top: 2px dotted #a34e32;
  margin-left: 4px;
}

.cg-configure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  background: var(--cg-lime);
  border: 1px solid #a0b54b;
  border-radius: 6px;
  color: var(--cg-ink);
  font:
    700 13px/1.3 'DM Sans',
    Arial,
    sans-serif;
  text-decoration: none;
}
.cg-configure:hover {
  border-color: var(--cg-ink);
}
@media (max-width: 700px) {
  .cg-configure {
    min-height: 42px;
    font-size: 12px;
  }
}
