:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #242b54;
  background: #f7f3ec;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0 3.5vw;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  color: inherit;
  cursor: pointer;
}
button,
a,
input,
select,
summary {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #6e9fe0;
}
button {
  min-height: 42px;
  border: 1px solid #e4ded7;
  background: white;
  border-radius: 12px;
  padding: 10px 14px;
}
button:hover {
  border-color: #242b54;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button[aria-pressed="true"] {
  background: #242b54;
  color: white;
}
header {
  height: 85px;
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid #ddd7ce;
}
header .brand {
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -1.3px;
  color: #242b54;
  text-decoration: none;
}
header .brand b {
  font-size: 12px;
  background: #242b54;
  color: white;
  border-radius: 7px;
  padding: 6px;
  letter-spacing: 0;
}
header > a:not(.brand) {
  font-size: 12px;
  color: #62647a;
  text-decoration: none;
}
header > span {
  margin-left: auto;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 1px;
  color: #777488;
}
main {
  max-width: 1550px;
  margin: auto;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0 25px;
}
.eyebrow {
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 1.4px;
  color: #2a7d63;
  font-weight: 700;
}
h1 {
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -4px;
  margin: 12px 0;
}
h1 i {
  font-style: normal;
  color: #d6698c;
}
p {
  font-size: 14px;
  line-height: 1.6;
  color: #62647a;
  margin: 10px 0;
}
.intro-mark {
  font-size: 20px;
  line-height: 1.5;
  transform: rotate(-5deg);
  text-align: right;
}
.intro-mark span {
  font-size: 14px;
  border-bottom: 6px solid #f7e7a6;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
.canvas-side {
  min-width: 0;
}
#stage {
  position: relative;
  height: clamp(470px, 60vh, 700px);
  border-radius: 28px;
  background: #eee8ed;
  overflow: hidden;
  border: 1px solid #e3dce5;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.stage-top,
.stage-bottom {
  position: absolute;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  pointer-events: none;
}
.stage-top {
  top: 23px;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 1px;
}
.stage-top span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2a7d63;
}
.stage-bottom {
  bottom: 23px;
  font-size: 11px;
  color: #62647a;
}
#design-name {
  text-transform: uppercase;
}
#loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  background: #eee8edf0;
  text-align: center;
  padding: 28px;
  line-height: 1.8;
}
#loading[hidden] {
  display: none;
}
.playbar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.playbar button {
  font-size: 12px;
}
.modes {
  display: flex;
  gap: 4px;
  margin-right: auto;
  background: #ece7de;
  border-radius: 15px;
  padding: 4px;
}
.modes button {
  border: 0;
  background: transparent;
  min-height: 36px;
  padding: 8px 13px;
}
.modes button[aria-pressed="true"] {
  background: #242b54;
  color: white;
}
.below-stage {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin: 16px 2px;
  font-size: 11px;
  color: #737185;
  line-height: 1.6;
}
.below-stage > div {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.below-stage button {
  font-size: 11px;
  background: transparent;
}
aside {
  border-radius: 25px;
  background: white;
  border: 1px solid #e8e1d5;
  padding: 23px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 1px;
  color: #767387;
  margin-bottom: 20px;
}
.panel-title b {
  color: #d6698c;
  font-size: 15px;
  font-weight: 400;
}
.tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #f2eee7;
  border-radius: 12px;
}
.tabs button {
  flex: 1;
  padding: 8px 7px;
  border: 0;
  background: transparent;
  font-size: 11px;
  min-height: 36px;
}
.tabs [aria-selected="true"] {
  background: white;
  box-shadow: 0 2px 5px #242b5410;
}
h2 {
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin: 24px 0 18px;
}
h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 20px 0 12px;
}
.shape-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.shape-grid button {
  height: 88px;
  background: #f8f5f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  justify-content: center;
}
.shape-grid button[aria-pressed="true"] {
  background: #f8e6eb;
  color: #242b54;
  border: 2px solid #d6698c;
  padding: 9px 13px;
}
.shape-icon {
  display: block;
  width: 40px;
  height: 29px;
  background: #e5a9ba;
  border-radius: 45% 55% 43% 57%;
  box-shadow:
    inset -5px -5px 10px #b7647e44,
    inset 4px 4px 6px #ffffff99;
}
.shape-icon.cloud {
  border-radius: 40% 60% 38% 55%;
  width: 48px;
}
.shape-icon.halo {
  border-radius: 50%;
  background: transparent;
  border: 8px solid #e5a9ba;
  width: 38px;
  height: 33px;
  box-shadow: none;
}
.shape-icon.star {
  clip-path: polygon(
    50% 0,
    62% 32%,
    98% 36%,
    70% 59%,
    80% 95%,
    50% 74%,
    20% 95%,
    30% 59%,
    2% 36%,
    38% 32%
  );
  height: 35px;
}
.primary {
  background: #242b54;
  color: white;
  border-color: #242b54;
}
#make-shape {
  width: 100%;
  margin-top: 12px;
}
.small {
  font-size: 11px;
  color: #777387;
  line-height: 1.6;
}
.recipes {
  display: flex;
  gap: 7px;
}
.recipes button {
  padding: 8px;
  flex: 1;
  font-size: 10px;
  line-height: 1.4;
  min-height: 60px;
}
.recipes i {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin: 0 auto 6px;
  background: linear-gradient(140deg, var(--a), var(--b));
}
.colour-pair {
  display: flex;
  align-items: center;
  gap: 15px;
}
.colour-pair label {
  flex: 1;
  font-size: 11px;
}
.colour-pair input {
  width: 100%;
  height: 56px;
  display: block;
  border: 1px solid #e3ded7;
  border-radius: 12px;
  padding: 4px;
  margin-top: 8px;
  background: white;
  cursor: pointer;
}
.colour-pair > span {
  padding-top: 17px;
}
.range {
  display: block;
  margin: 24px 0;
  font-size: 12px;
}
.range output {
  float: right;
  font-size: 11px;
  color: #777387;
}
.range input {
  display: block;
  width: 100%;
  margin: 14px 0;
  accent-color: #2a7d63;
}
.ends {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #777387;
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.choices button {
  font-size: 11px;
  padding: 9px 10px;
  flex: 1;
}
.keep-card {
  margin-top: 24px;
  padding: 18px 0 4px;
  border-top: 1px solid #e8e1d5;
}
.keep-card > span {
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 1px;
  color: #777387;
}
.keep-card > button {
  display: block;
  width: 100%;
  margin: 12px 0;
  background: #dcf2e8;
  border-color: #cfe5db;
}
.project-buttons {
  display: flex;
  gap: 5px;
}
.project-buttons button {
  flex: 1;
  font-size: 10px;
  min-height: 32px;
  padding: 7px 5px;
}
.quality {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #777387;
  margin-top: 14px;
}
.quality select {
  font-size: 10px;
  min-height: 30px;
  padding: 5px;
  border: 1px solid #e8e1d5;
  border-radius: 9px;
  background: white;
}
details {
  padding: 19px 24px;
  background: #eee9e0;
  border-radius: 18px;
  margin-top: 22px;
}
summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-size: 13px;
  list-style: none;
}
details p {
  max-width: 900px;
  font-size: 12px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 24px 0 32px;
  font-size: 11px;
  color: #777387;
}
footer a {
  color: inherit;
}
dialog {
  border: 1px solid #e3ded7;
  border-radius: 26px;
  padding: 32px;
  max-width: 520px;
  width: calc(100% - 32px);
  color: #242b54;
  background: #f9f6f0;
  box-shadow: 0 30px 100px #242b5433;
}
dialog::backdrop {
  background: #242b5466;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 30px;
  margin-bottom: 12px;
}
dialog .close {
  float: right;
  border: 0;
  background: transparent;
  font-size: 24px;
  min-height: 30px;
  padding: 0 4px;
}
dialog form {
  height: 12px;
}
.export-options {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 12px;
  margin: 24px 0 16px;
}
.export-options label {
  font-size: 11px;
}
.export-options select {
  display: block;
  width: 100%;
  padding: 11px 7px;
  margin-top: 8px;
  border: 1px solid #ddd5c9;
  border-radius: 10px;
  background: white;
  font-size: 12px;
  min-height: 42px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-height: 35px;
}
.check input {
  accent-color: #2a7d63;
}
.export-actions {
  display: flex;
  gap: 8px;
  margin: 20px 0 12px;
}
.export-actions button {
  flex: 1;
}
.mesh-export {
  width: 100%;
  font-size: 12px;
  background: transparent;
}
#export-status {
  font-size: 12px;
  min-height: 20px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .workbench {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  aside {
    padding: 18px;
  }
  .intro-mark {
    font-size: 16px;
  }
  header > span {
    display: none;
  }
  .playbar {
    gap: 5px;
  }
  .playbar button {
    padding: 9px;
  }
  .modes {
    margin-right: 0;
  }
  .below-stage {
    flex-direction: column;
    gap: 9px;
  }
}
@media (max-width: 700px) {
  body {
    padding: 0 15px;
  }
  header {
    height: 72px;
    justify-content: space-between;
    gap: 15px;
  }
  .intro {
    padding: 26px 0 20px;
  }
  .intro-mark {
    display: none;
  }
  h1 {
    font-size: 58px;
    letter-spacing: -3px;
  }
  .intro p {
    font-size: 13px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .workbench {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #stage {
    height: 430px;
    border-radius: 22px;
  }
  .stage-top,
  .stage-bottom {
    left: 18px;
    right: 18px;
    font-size: 9px;
  }
  .stage-bottom #fps {
    display: none;
  }
  .playbar .modes {
    width: 100%;
    justify-content: space-between;
  }
  .playbar > .modes button {
    flex: 1;
    font-size: 11px;
  }
  .playbar > button {
    flex: 1;
  }
  .below-stage {
    margin: 12px 0;
    flex-direction: row;
    gap: 10px;
  }
  .below-stage #status {
    font-size: 10px;
  }
  .below-stage button {
    min-height: 36px;
    font-size: 10px;
    padding: 8px;
  }
  .shape-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .shape-grid button {
    padding: 7px 3px;
    height: 80px;
    font-size: 10px;
  }
  .shape-grid button[aria-pressed="true"] {
    padding: 6px 2px;
  }
  aside {
    padding: 20px;
  }
  h2 {
    font-size: 21px;
  }
  .keep-card {
    margin-top: 20px;
  }
  .recipes button {
    font-size: 11px;
  }
  .project-buttons button {
    font-size: 11px;
    min-height: 40px;
  }
  dialog {
    padding: 23px;
  }
  dialog h2 {
    font-size: 25px;
  }
  .export-options {
    grid-template-columns: 1fr;
  }
  .export-actions {
    flex-direction: column;
  }
  footer {
    font-size: 10px;
    line-height: 1.7;
  }
  #stage.scroll canvas {
    touch-action: pan-y;
  }
  body {
    overscroll-behavior-y: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
@media print {
  body {
    padding: 0;
    background: white;
  }
  .intro-mark,
  aside,
  .playbar,
  .below-stage,
  details,
  footer,
  header,
  dialog {
    display: none !important;
  }
  .intro {
    padding: 15px 0 !important;
  }
  .intro h1 {
    font-size: 38px;
  }
  .workbench {
    display: block;
  }
  #stage {
    height: 150mm;
    break-inside: avoid;
  }
  .stage-bottom {
    display: none;
  }
  .canvas-side {
    width: 100%;
  }
}
