:root {
  color-scheme: light;
  --ink: #252b39;
  --purple: #6261cf;
  --paper: #fffefa;
  --muted: #727682;
  --line: #e4e2dc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: #f7f6f2;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: 14px;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 9px 12px;
}
button:hover {
  background: #f0eff9;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
svg:focus-visible {
  outline: 3px solid #9694ef;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
.topbar {
  height: 82px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.5%;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  letter-spacing: -1.2px;
  font-weight: 850;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 35px;
  border-radius: 6px;
  background: var(--purple);
  color: white;
  transform: rotate(-5deg);
  font-size: 25px;
}
.studio-tag {
  margin-left: 15px;
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 600;
  color: #777782;
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
#save-status {
  font-size: 11px;
  color: #738078;
}
.primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  font-weight: 700;
  padding: 11px 17px;
}
.primary:hover {
  background: #5050b7;
}
.quiet {
  font-size: 12px;
  border-color: transparent;
  background: transparent;
}
main {
  max-width: 1570px;
  margin: auto;
  padding: 0 4.5%;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 43px 0 36px;
  gap: 25px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: #7c7b8b;
}
h1 {
  font-size: clamp(28px, 3.2vw, 47px);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -1.9px;
  margin: 13px 0 18px;
  position: relative;
}
h1 span {
  color: var(--purple);
}
h1 > svg {
  position: absolute;
  width: 300px;
  bottom: -13px;
  left: 115px;
  fill: none;
  stroke: #bcb8e2;
  stroke-width: 3;
}
p {
  line-height: 1.6;
}
.intro p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.hero-doodle {
  width: 260px;
  margin: 0 6% 0 0;
  transform: rotate(-4deg);
}
.hero-doodle svg {
  width: 100%;
  stroke: var(--ink);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-doodle text {
  fill: var(--ink);
  stroke: none;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 20px;
  font-weight: bold;
}
.hero-doodle > span {
  font-size: 10px;
  color: #87838e;
  display: block;
  text-align: center;
  margin-top: 10px;
}
.workspace {
  border: 1px solid #dcdad6;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 35px #34314808;
  overflow: hidden;
}
.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 21px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.workspace-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-dot {
  height: 7px;
  width: 7px;
  background: #79a08b;
  border-radius: 50%;
}
.workspace-head strong {
  font-size: 12px;
}
.workspace-sub {
  font-size: 11px;
  color: #96949b;
  margin-left: 8px;
}
.history {
  gap: 5px !important;
}
.history > button {
  padding: 3px 9px;
  font-size: 23px;
  border-color: transparent;
}
.history .quiet {
  font-size: 11px;
  padding: 8px;
}
.history > span {
  height: 18px;
  width: 1px;
  background: var(--line);
  margin: 0 6px;
}
.editor-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 165px;
}
.toolbox {
  padding: 24px 15px;
  border-right: 1px solid var(--line);
}
.label {
  display: block;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #85828f;
  font-weight: 800;
  margin-bottom: 12px;
}
.tools {
  display: grid;
  gap: 5px;
}
.tools button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border-color: transparent;
  padding: 10px;
  font-size: 11px;
  position: relative;
  text-align: left;
}
.tools button.active {
  background: #efedf9;
  color: #5552ba;
  border-color: #e4e0f3;
}
.tools button > span {
  width: 20px;
  font-size: 21px;
  line-height: 18px;
  text-align: center;
}
.tools svg {
  height: 20px;
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.tools kbd {
  margin-left: auto;
  color: #a5a1b2;
  font-size: 9px;
  font-family: inherit;
}
.tool-section {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}
.colors {
  display: flex;
  gap: 7px;
  align-items: center;
}
.colors button {
  background: var(--swatch);
  width: 20px;
  height: 20px;
  border: 3px solid white;
  outline: 1px solid transparent;
  padding: 0;
  border-radius: 50%;
}
.colors button[aria-pressed="true"] {
  outline-color: #555166;
}
.colors input {
  height: 22px;
  width: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.range-label {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
  height: 12px;
}
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  color: var(--ink);
  resize: vertical;
  font-size: 11px;
  line-height: 1.5;
}
.hint {
  font-size: 10px;
  line-height: 1.6;
  color: #908c97;
  margin: 8px 0;
}
.object-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.object-actions button {
  font-size: 10px;
  padding: 7px;
  flex: 1;
}
.tip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 23px;
  color: #908d9c;
}
.tip > span {
  font-size: 23px;
  color: #9b97ca;
}
.tip p {
  font-size: 10px;
  line-height: 1.7;
  margin: 0;
}
.stage {
  background: #efeeea;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.document-bar {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border-bottom: 1px solid #e5e2dd;
}
.document-bar label {
  font-size: 9px;
  color: #a19ba6;
  white-space: nowrap;
  letter-spacing: 1px;
}
.document-bar input {
  min-width: 0;
  flex: 1;
  background: transparent;
  border: 0;
  font-size: 12px;
  color: #63616a;
  font-weight: 600;
  outline-offset: 0;
}
.document-bar > span {
  font-size: 8px;
  letter-spacing: 1px;
  color: #96909d;
  white-space: nowrap;
}
.paper-wrap {
  padding: 30px 28px;
  flex: 1;
  background-image: radial-gradient(#bdb9b544 0.7px, transparent 0.7px);
  background-size: 8px 8px;
  display: grid;
  align-items: center;
}
.paper {
  background: var(--paper);
  box-shadow: 1px 4px 12px #3b372715;
  padding: 25px 24px 20px;
  transform: rotate(-0.3deg);
}
.paper-head,
.paper-footer {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  letter-spacing: 1.5px;
  color: #949090;
  font-weight: 700;
}
.paper-head > span:first-child {
  color: var(--purple);
  font-weight: 900;
}
.paper h2 {
  font-family: "Trebuchet MS", sans-serif;
  letter-spacing: -1.2px;
  font-size: 28px;
  line-height: 1.2;
  margin: 17px 0 22px;
  overflow-wrap: anywhere;
}
.panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.comic-panel {
  position: relative;
  min-width: 0;
  border: 2px solid var(--ink);
  background: white;
  transform: rotate(0.3deg);
}
.comic-panel.selected {
  outline: 2px solid #aaa5df;
  outline-offset: 5px;
}
.comic-panel > svg {
  display: block;
  width: 100%;
  aspect-ratio: 280/360;
  touch-action: none;
}
.panel-number {
  position: absolute;
  top: 7px;
  left: 8px;
  font-size: 8px;
  color: #aaa2ac;
  pointer-events: none;
}
.paper-footer {
  font-size: 5.5px;
  letter-spacing: 1px;
  margin-top: 25px;
}
.canvas-status {
  min-height: 41px;
  padding: 12px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
  color: #918b98;
  background: #f5f4f1;
  border-top: 1px solid var(--line);
}
.storyboard {
  padding: 24px 15px;
}
.storyboard > .hint {
  margin-top: -6px;
}
#panel-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.panel-item {
  display: flex;
  align-items: center;
  gap: 9px;
  border-color: transparent;
  font-size: 10px;
  text-align: left;
  padding: 6px;
}
.panel-item.active {
  background: #f3f1fa;
  border-color: #e8e3f7;
}
.panel-item svg {
  width: 45px;
  height: 48px;
  background: #fff;
  border: 1px solid #ccc7d2;
  border-radius: 2px;
  pointer-events: none;
}
.panel-item small {
  display: block;
  font-size: 8px;
  color: #a29baa;
  margin-top: 3px;
}
.add-panel {
  border: 1px dashed #d4cedc;
  background: transparent;
  width: 100%;
  font-size: 10px;
  margin-top: 16px;
  padding: 10px 4px;
}
.story-note {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 29px;
}
.story-note > span {
  font-family: cursive;
  font-size: 22px;
  color: #aaa3ce;
}
.story-note h3 {
  font-size: 11px;
  margin-top: 12px;
}
.story-note p {
  font-size: 11px;
  color: #98919c;
  line-height: 1.9;
}
.clear-panel {
  font-size: 9px;
  padding: 5px 0;
  margin-top: 16px;
  color: #96909b;
}
.workspace-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 13px 21px;
  gap: 12px;
  font-size: 9px;
  color: #99929c;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  padding: 22px 0 30px;
  font-size: 9px;
  color: #aaa3ad;
  gap: 15px;
}
.page-footer b {
  color: #b1a8d1;
  padding: 0 9px;
}
.page-footer > span:first-child {
  color: #8f8898;
}
body.embedded .intro,
body.embedded .page-footer,
body.embedded .topbar .brand,
body.embedded .quiet[href],
body.embedded .workspace-sub {
  display: none;
}
body.embedded .topbar {
  height: 58px;
  justify-content: flex-end;
}
body.embedded main {
  padding: 12px;
}
body.embedded .editor-grid {
  grid-template-columns: 175px minmax(0, 1fr) 135px;
}
body.embedded .paper-wrap {
  padding: 20px;
}
body.embedded .paper {
  padding: 18px;
}
body.embedded h2 {
  font-size: 23px;
}
body.embedded .tip {
  display: none;
}
@media (min-width: 1500px) {
  .editor-grid {
    grid-template-columns: 205px minmax(0, 1fr) 180px;
  }
  .paper-wrap {
    padding: 40px 50px;
  }
  .tools button {
    font-size: 12px;
  }
  .comic-panel > svg {
    max-height: 350px;
  }
  .toolbox,
  .storyboard {
    padding: 24px 20px;
  }
}
@media (max-width: 1050px) {
  .workspace-sub {
    display: none;
  }
  .top-actions {
    gap: 12px;
  }
  .top-actions .quiet {
    display: none;
  }
  .editor-grid {
    grid-template-columns: 170px minmax(0, 1fr) 130px;
  }
  .paper-wrap {
    padding: 25px 20px;
  }
  .paper {
    padding: 20px 16px;
  }
  .storyboard {
    padding: 24px 10px;
  }
  .panel-item {
    gap: 5px;
  }
  .panel-item svg {
    width: 33px;
  }
  .paper h2 {
    font-size: 23px;
  }
  .hero-doodle {
    margin-right: 0;
    width: 210px;
  }
  .studio-tag {
    font-size: 8px;
    padding-left: 15px;
    margin-left: 8px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 66px;
    padding: 0 18px;
  }
  .brand {
    font-size: 22px;
  }
  .studio-tag,
  #save-status {
    display: none;
  }
  main {
    padding: 0 14px;
  }
  .intro {
    padding: 29px 5px;
  }
  .intro p {
    font-size: 11px;
    max-width: 270px;
  }
  h1 {
    font-size: 31px;
    letter-spacing: -1px;
  }
  h1 > svg {
    width: 210px;
    left: 65px;
    bottom: -11px;
  }
  .hero-doodle {
    width: 140px;
  }
  .hero-doodle > span {
    font-size: 8px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .workspace-head {
    padding: 12px;
  }
  .editor-grid,
  body.embedded .editor-grid {
    grid-template-columns: 1fr;
  }
  .toolbox {
    border-right: 0;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .toolbox > .label,
  .toolbox .tip {
    display: none;
  }
  .tools {
    grid-column: 1/-1;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
  }
  .tools button {
    padding: 8px 2px;
    font-size: 8px;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
  }
  .tools kbd {
    display: none;
  }
  .tool-section {
    margin: 0;
    padding: 10px 0 0;
  }
  .tool-section > .label {
    margin-bottom: 7px;
    font-size: 8px;
  }
  .range-label {
    margin-top: 9px;
  }
  .tool-section:has(#words) {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 8px;
  }
  .tool-section:has(#words) .hint {
    display: none;
  }
  .tool-section textarea {
    height: 45px;
    min-height: 45px;
    resize: none;
  }
  #object-options {
    grid-column: 2;
    grid-row: 2;
  }
  .object-actions {
    margin-top: 5px;
  }
  .object-actions button {
    padding: 4px;
  }
  .paper-wrap,
  body.embedded .paper-wrap {
    padding: 22px 16px;
  }
  .document-bar {
    padding: 0 15px;
    height: 45px;
  }
  .stage {
    border-top: 1px solid var(--line);
  }
  .storyboard {
    padding: 12px;
    display: flex;
    gap: 9px;
    align-items: center;
    overflow: auto;
    border-top: 1px solid var(--line);
  }
  .storyboard > .label,
  .storyboard > .hint,
  .story-note,
  .clear-panel {
    display: none;
  }
  #panel-list {
    display: flex;
    margin: 0;
    gap: 5px;
  }
  .panel-item {
    min-width: 78px;
    font-size: 9px;
    padding: 4px;
  }
  .panel-item svg {
    width: 28px;
    height: 35px;
  }
  .panel-item small {
    font-size: 7px;
  }
  .add-panel {
    margin: 0;
    width: 82px;
    min-width: 82px;
    padding: 10px 5px;
    font-size: 9px;
  }
  .workspace-footer > span:last-child,
  .page-footer > span:first-child,
  .canvas-status > span:last-child {
    display: none;
  }
  .page-footer {
    padding: 18px 4px;
  }
  .paper-footer {
    font-size: 5px;
    letter-spacing: 0.5px;
  }
  .paper h2 {
    font-size: 22px;
  }
  .panels {
    gap: 8px;
  }
  .canvas-status {
    font-size: 9px;
    padding: 12px;
  }
  .workspace-head strong {
    font-size: 11px;
  }
  .history .quiet {
    font-size: 10px;
  }
  .hero-doodle {
    display: none;
  }
  .top-actions .primary {
    font-size: 11px;
    padding: 9px 12px;
  }
}
