:root {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #0c0c0d;
  color: #ddd;
  font:
    12px -apple-system,
    BlinkMacSystemFont,
    system-ui,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #72a9ff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sample-notice {
  position: sticky;
  left: 0;
  padding: 8px 18px;
  background: #18181a;
  color: #a4a4aa;
  font-size: 10px;
  border-bottom: 1px solid #252527;
  min-width: 740px;
}
.sample-notice span {
  float: right;
  color: #727279;
}
.studio-app {
  position: relative;
  min-width: 740px;
  background: #0e0e10;
  min-height: 555px;
}
.grabber {
  width: 38px;
  height: 5px;
  background: #555;
  border-radius: 5px;
  margin: 10px auto 9px;
}
header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 12px;
}
.studio-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #bd4cf2, #487dff);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 20px;
}
.title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.title strong {
  font-size: 14px;
  font-family:
    ui-rounded,
    -apple-system,
    system-ui;
  font-weight: 700;
}
.title small {
  font-size: 10px;
  color: #888;
}
.studio-app button {
  border: 0;
  background: transparent;
  padding: 6px;
  color: #ddd;
}
.studio-app button.save {
  background: #0784ff;
  border-radius: 25px;
  height: 32px;
  padding: 0 15px;
  color: white;
  font-weight: 700;
}
.studio-app button.circle {
  background: #ffffff10;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  line-height: 1;
}
#image-menu {
  position: absolute;
  right: 85px;
  top: 40px;
  z-index: 4;
  padding: 6px;
  background: #29292b;
  border: 1px solid #444;
  border-radius: 10px;
  box-shadow: 0 10px 30px #0008;
}
#image-menu button {
  font-size: 11px;
  padding: 8px;
  color: #ff8c8c;
}
.expanded-editor {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  background: #0b0b0c;
  min-height: 500px;
}
aside {
  padding: 20px;
  border-right: 1px solid #28282a;
}
.control-group + .control-group {
  margin-top: 20px;
}
h2 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #89898d;
  margin: 0 0 10px;
}
select {
  border: 0;
  border-radius: 6px;
  color: #ddd;
  background: #242426;
  padding: 5px 8px;
  font-size: 11px;
  max-width: 100%;
}
.padding-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  font-size: 11px;
  color: #bbb;
}
.padding-control input {
  width: 100%;
  min-width: 0;
  accent-color: #ddd;
  height: 13px;
}
.padding-control output {
  font:
    10px ui-monospace,
    monospace;
  color: #aaa;
  min-width: 25px;
  text-align: right;
}
.gradient-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.gradient-grid button {
  padding: 0;
  text-align: left;
}
.gradient-grid button span {
  display: block;
  height: 38px;
  border-radius: 11px;
  border: 2px solid transparent;
  margin-bottom: 5px;
}
.gradient-grid button[aria-pressed="true"] span {
  border-color: white;
  box-shadow: 0 0 0 1px #fffc;
}
.gradient-grid button small {
  font-size: 9px;
  color: #aaa;
  font-weight: 500;
  white-space: nowrap;
}
.headline-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
}
.headline-toggle input {
  appearance: none;
  width: 40px;
  height: 23px;
  background: #2a2a2c;
  border-radius: 20px;
  position: relative;
  margin: 0;
  cursor: pointer;
}
.headline-toggle input:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ddd;
  transition: transform 0.2s;
}
.headline-toggle input:checked {
  background: #007cff;
}
.headline-toggle input:checked:before {
  transform: translateX(17px);
}
#headline {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid #414145;
  border-radius: 6px;
  background: #242426;
  color: #ddd;
  font-size: 10px;
}
#redact {
  display: block;
  width: 100%;
  padding: 10px;
  background: #202022;
  border-radius: 10px;
  font-weight: 600;
  font-size: 11px;
}
#redact[aria-pressed="true"] {
  background: #2855a0;
  color: white;
}
#undo {
  font-size: 10px;
  padding: 8px 0;
}
#undo:disabled {
  opacity: 0.4;
  cursor: default;
}
#redaction-hint {
  font-size: 9px;
  line-height: 1.5;
  color: #888;
  margin: 3px 0 0;
}
.preview-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 500px;
}
.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 20px;
}
.preview-header h2 {
  margin: 0 0 5px;
}
.preview-header span {
  font-size: 11px;
  color: #aaa;
  font-weight: 500;
}
.preview-header small {
  font-size: 9px;
  color: #777;
  margin-top: 10px;
}
.canvas-space {
  padding: 20px;
  min-height: 400px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
canvas#composition {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 465px;
  touch-action: pan-y;
}
canvas#composition.redacting {
  cursor: crosshair;
  touch-action: none;
}
.privacy-note {
  color: #777;
  font-size: 9px;
  padding: 8px 20px 14px;
}
.compact-editor {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px 16px;
}
.compact-editor canvas {
  width: 165px;
  height: 114px;
  border-radius: 13px;
}
.compact-editor h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
.compact-editor button {
  background: #242426;
  border-radius: 20px;
  font-size: 10px;
  padding: 8px 10px;
  margin-right: 4px;
}
#closed-state {
  padding: 30px;
  text-align: center;
  min-height: 500px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}
#saved-image {
  max-width: min(500px, 90%);
  max-height: 350px;
  border-radius: 10px;
}
#closed-state p {
  font-size: 12px;
  color: #aaa;
  max-width: 400px;
  line-height: 1.6;
}
#closed-state button,
#closed-state a,
dialog button {
  border: 1px solid #45454a;
  background: #27272a;
  padding: 9px 15px;
  border-radius: 9px;
  font-size: 11px;
  color: #ddd;
  text-decoration: none;
}
#closed-state a {
  background: #067aff;
  color: white;
  border-color: transparent;
}
dialog {
  border: 1px solid #444;
  border-radius: 16px;
  background: #202022;
  color: #ddd;
  padding: 20px;
  width: min(560px, calc(100vw - 30px));
}
dialog::backdrop {
  background: #000a;
}
dialog header {
  padding: 0;
  justify-content: space-between;
}
dialog h3 {
  font-size: 15px;
  margin: 0;
}
dialog p {
  font-size: 11px;
  color: #aaa;
  line-height: 1.6;
}
dialog form {
  margin: 0;
}
.source-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.source-grid button {
  background: #303034;
  border: 0;
  padding: 8px;
}
.source-grid img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 5px;
}
.source-grid span {
  font-size: 10px;
  display: block;
  margin-top: 7px;
}
#confirm-remove > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
#confirm-delete {
  color: #ff8c8c;
}
#status {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: #333e;
  border-radius: 9px;
  padding: 10px;
  color: white;
  max-width: calc(100% - 20px);
  font-size: 11px;
}
#status:empty {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
canvas#composition:focus-visible {
  outline: 2px solid #72a9ff;
  outline-offset: 5px;
}
canvas#composition.redacting {
  user-select: none;
  -webkit-user-select: none;
}
.studio-app button.save:disabled {
  opacity: 0.55;
  cursor: progress;
}
.studio-app button:not(:disabled):hover {
  filter: brightness(1.18);
}
.studio-app button.circle:active {
  background: #ffffff25;
}
#saved-image {
  width: auto;
  height: auto;
}
dialog {
  overscroll-behavior: contain;
}
#status {
  pointer-events: none;
}
.sample-notice span {
  color: #aaaab3;
}
@media (max-width: 740px) {
  .sample-notice span {
    display: none;
  }
}
