:root {
  color-scheme: light;
  --paper: #faf9f6;
  --surface: #fff;
  --ink: #232127;
  --muted: #69656e;
  --line: #dedbdc;
  --purple: #6a4a9d;
  --deep: #2b2339;
  --sans: "Instrument Sans", "DM Sans", "Segoe UI", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid #9777c6;
  outline-offset: 4px;
}
.studio-symbol { display: inline-block; flex: none; vertical-align: middle; }
.studio-nav { border-bottom: 1px solid var(--line); }
.studio-nav__inner, .studio-workspace, .studio-flashes {
  width: min(1190px, calc(100% - 112px));
  margin-inline: auto;
}
.studio-nav__inner { height: 74px; display: flex; align-items: center; justify-content: space-between; }
.studio-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 24px; font-weight: 720; letter-spacing: -1.55px; }
.brand-mark { width: 27px; height: 27px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; transform: rotate(-8deg); }
.brand-mark i { background: #43314f; border-radius: 4px; }
.brand-mark i:nth-child(1) { border-radius: 8px 3px 4px 3px; }
.brand-mark i:nth-child(2) { border-radius: 9px; background: #9c7bc8; }
.brand-mark i:nth-child(3) { border-radius: 3px 4px 3px 7px; background: #795b9b; }
.brand-mark i:nth-child(4) { border-radius: 4px 3px 7px 3px; }
.studio-links { display: flex; align-items: center; gap: 10px; }
.studio-links a { color: #55505b; padding: 7px 15px 8px; border-radius: 30px; text-decoration: none; font-size: .88rem; font-weight: 570; }
.studio-links a.active, .studio-links a:hover { background: #ebe8ef; color: #49365e; }
.studio-home { padding-block: clamp(36px, 5vw, 82px) 60px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); column-gap: clamp(50px, 7vw, 110px); align-items: center; }
.section-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 680; color: var(--purple); display: flex; align-items: center; gap: 9px; }
.kicker-rule { width: 22px; height: 2px; border-radius: 2px; background: #9d7bc0; }
.studio-heading { margin: 18px 0; font-size: clamp(65px, 6.1vw, 90px); font-weight: 590; letter-spacing: -.078em; line-height: .96; }
.studio-heading em { font-family: var(--serif); color: var(--purple); font-weight: 400; letter-spacing: -.067em; }
.studio-intro, .collection-idea, .work-idea, .selection-copy p, .error-card p, .test-checkout p {
  color: var(--muted); line-height: 1.55; overflow-wrap: anywhere;
}
.studio-intro { max-width: 430px; font-size: 1.04rem; margin: 20px 0 29px; }
.studio-form { display: grid; gap: 22px; }
.field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 12px; }
.field-head label, .style-fieldset legend { font-weight: 680; font-size: .94rem; }
.idea-shuffle, .shelf-shuffle, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; color: var(--purple); padding: 4px 0; font-size: .82rem; font-weight: 600; }
.idea-shuffle:hover, .shelf-shuffle:hover, .text-button:hover, .start-again:hover { text-decoration: underline; text-underline-offset: 3px; }
.idea-shuffle svg, .shelf-shuffle svg { width: 16px; height: 16px; }
.studio-form textarea { resize: vertical; width: 100%; min-height: 92px; border: 1px solid #ccc9cb; border-radius: 12px; padding: 13px 15px; background: #fff; color: var(--ink); line-height: 1.5; display: block; }
.studio-form textarea::placeholder { color: #817c83; opacity: 1; }
.studio-form textarea:focus { border-color: var(--purple); outline: 2px solid #ddd0ef; outline-offset: 0; }
.style-fieldset { padding: 0; border: none; margin: 0; min-inline-size: 0; position: relative; }
.style-fieldset legend { padding: 0; }
.style-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.style-choice, .concept-choice { position: relative; cursor: pointer; min-width: 0; }
.style-choice input, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.style-choice__body { display: flex; height: 100%; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px 10px; text-align: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); transition: border-color .16s, background .16s; }
.style-choice:hover .style-choice__body { border-color: #9b83b6; }
.style-choice input:checked + .style-choice__body { border-color: #7952a6; box-shadow: inset 0 0 0 1px #7952a6; background: #f3edf9; }
.style-choice input:focus-visible + .style-choice__body { outline: 3px solid #9a7abd; outline-offset: 3px; }
.style-thumb { --thumb-size: clamp(44px, 4vw, 58px); width: var(--thumb-size); height: var(--thumb-size); object-fit: contain; border-radius: 11px; flex: none; }
.style-name { font-size: .84rem; line-height: 1.12; font-weight: 625; }
.style-check { position: absolute; right: 7px; top: 7px; width: 12px; height: 12px; border: 1px solid #a79eaf; border-radius: 50%; display: grid; place-items: center; }
.style-choice input:checked + .style-choice__body .style-check { border-color: #7952a6; }
.style-choice input:checked + .style-choice__body .style-check::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7952a6; }
.primary-button { width: 100%; display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 48px; padding: 11px 18px; border: 1px solid transparent; border-radius: 11px; text-decoration: none; background: #44305a; color: white; font-weight: 640; }
.primary-button:hover { background: #593c76; }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: .7; cursor: wait; }
.create-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.repeat-refinement { width: 100%; padding: 11px 12px; border: 1px solid #d5c9e2; border-radius: 11px; background: #f7f3fa; color: #4a355e; font-weight: 650; }
.repeat-refinement:hover { background: #eee6f4; }
.run-summary, .create-note { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; }
.run-summary { justify-content: flex-start; }
.run-summary svg { width: 13px; height: 13px; }
.sample-shelf { background-color: var(--deep); background-image: linear-gradient(130deg, #393043 0%, #2b2535 50%, #31283c 100%); color: #f7f3fa; border-radius: 24px; padding: 29px clamp(23px, 2.5vw, 40px) 21px; position: relative; isolation: isolate; overflow: hidden; }
.sample-shelf::before { content: ""; z-index: -1; position: absolute; inset: 0; background-image: linear-gradient(#e9dbfa07 1px, transparent 1px), linear-gradient(90deg, #e9dbfa07 1px, transparent 1px); background-size: 24px 24px; mask-image: radial-gradient(ellipse at 50% 50%, transparent, black); }
.shelf-top, .shelf-bottom, .panel-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.shelf-top h2 { font-family: var(--serif); font-size: clamp(28px, 2.5vw, 38px); line-height: 1; font-weight: 400; letter-spacing: -.055em; margin: 0; }
.shelf-grid-icon { color: #c9b8d7; }
.shelf-grid-icon svg { width: 18px; height: 18px; stroke-width: 1.35; }
.sample-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(13px, 1.55vw, 25px); padding: clamp(24px, 2.7vw, 42px) 1px; }
.sample-icon { display: block; aspect-ratio: 1; border-radius: 22%; background-color: #b7a3d8; background-image: url("/art/demo.png"); background-repeat: no-repeat; background-size: 800%; background-position: var(--sprite-x) var(--sprite-y); box-shadow: 0 5px 9px #0e0a151f, inset 0 0 0 1px #ffffff12; }
.shelf-bottom { border-top: 1px solid #afa1bd35; padding-top: 14px; color: #d3cad9; font-size: .82rem; }
.shelf-shuffle { color: #efebf3; font-size: .82rem; }
.studio-flashes { margin-block: 16px; }
.studio-flash { padding: 12px 16px; background: #eaf3eb; border-radius: 9px; margin-block: 8px; color: #2c543b; }
.studio-flash.is-error { background: #fbe9e6; color: #843e34; }
.generation-workspace { padding-block: 30px 60px; }
.back-link { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--muted); font-size: .88rem; }
.back-link svg { width: 17px; }
.back-link:hover { color: var(--purple); }
.sketch-note { max-width: 62ch; font-size: .94rem; line-height: 1.5; color: var(--muted); margin: 8px 0 12px; }
.page-title { font-family: var(--sans); font-size: clamp(2.4rem, 4.7vw, 4.2rem); line-height: 1.02; letter-spacing: -.066em; font-weight: 590; margin: 12px 0 10px; }
.progress-view { min-height: 65vh; display: flex; align-items: center; justify-content: center; gap: clamp(34px, 6vw, 100px); }
.working-art { width: clamp(175px, 24vw, 310px); aspect-ratio: 1; border-radius: 24%; background: radial-gradient(circle at 30% 23%, #eee5fa, #c1a8da 77%, #ae90cd); display: grid; place-items: center; }
.working-tile { width: 50%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 27%; background: #f7f0ff; color: #8359ac; transform: rotate(-10deg); box-shadow: 7px 14px 0 #9c79b6, 8px 20px 24px #6f4a8f4a; }
.working-tile svg { width: 58%; height: 58%; stroke-width: 1.3; }
.progress-copy { max-width: 510px; flex: 1; }
.work-idea { margin: 12px 0 26px; }
.progress-details { background: #fff; border: 1px solid var(--line); padding: 18px; border-radius: 15px; }
.progress-details strong { font-size: .97rem; }
.progress-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.progress-percent { color: var(--purple); font-variant-numeric: tabular-nums; font-weight: 650; }
.preview-progress { display: block; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 6px; overflow: hidden; margin: 12px 0; background: #ede7f2; color: var(--purple); accent-color: var(--purple); }
.preview-progress::-webkit-progress-bar { background: #ede7f2; }
.preview-progress::-webkit-progress-value { background: var(--purple); border-radius: 6px; transition: width 550ms linear; }
.preview-progress::-moz-progress-bar { background: var(--purple); border-radius: 6px; }
.progress-time { font-size: .92rem; font-variant-numeric: tabular-nums; margin-bottom: 5px; }
.progress-track { height: 6px; overflow: hidden; background: #ede7f2; border-radius: 6px; margin: 12px 0; }
.progress-track span { display: block; width: 38%; height: 100%; border-radius: inherit; background: #997bb4; animation: sheet-progress 2s ease-in-out infinite alternate; }
@keyframes sheet-progress { to { transform: translateX(163%); } }
.progress-sub { font-size: .83rem; color: var(--muted); }
.error-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 36px; margin: 60px auto; max-width: 600px; }
.error-card .primary-button { width: fit-content; margin-top: 22px; }
.collection-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin: 32px 0 26px; }
.collection-heading > div:first-child { min-width: 0; }
.collection-idea { max-width: 700px; margin: 0; }
.store-switch { display: inline-flex; padding: 3px; background: #ede9f0; border: 1px solid #dcd7df; border-radius: 10px; flex: none; }
.store-switch button { background: transparent; border: 0; color: var(--muted); padding: 7px 12px; border-radius: 7px; font-size: .86rem; font-weight: 600; }
.store-switch button.active { color: var(--ink); background: white; box-shadow: 0 1px 5px #33274016; }
.collection-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(236px, .39fr); gap: 20px; align-items: start; --mask: 22%; }
.collection-layout[data-store-preview="google"] { --mask: 30%; }
.concept-panel, .selection-panel { min-width: 0; padding: clamp(16px, 2vw, 26px); background: #fff; border: 1px solid var(--line); border-radius: 19px; }
.panel-top { margin-bottom: 17px; }
.panel-top h2 { margin: 0; font-size: 1.05rem; font-weight: 660; letter-spacing: -.025em; }
.panel-top > span, .panel-top > svg { color: var(--muted); font-size: .82rem; }
.concept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.concept-grid.compact-grid { grid-template-columns: repeat(var(--compact-columns), minmax(0, 144px)); }
.concept-frame { display: block; padding: 3px; border: 2px solid transparent; border-radius: 22%; }
.concept-choice { padding: 0; border: 0; border-radius: 22%; background: transparent; }
.concept-choice[aria-current="true"] .concept-frame { border-color: #805baa; }
.concept-choice:hover .concept-frame { background: #f0eaf6; }
.concept-art, .selected-art { display: block; aspect-ratio: 1; border-radius: var(--mask); background-image: var(--sprite); background-size: var(--sprite-size); background-position: var(--sprite-x) var(--sprite-y); background-color: #e7ddeb; background-repeat: no-repeat; }
.selection-panel { position: sticky; top: 16px; }
.preview-stage { display: grid; place-items: center; padding: 27px 15px; background: radial-gradient(circle at 70% 15%, #f5f0f8, #ece5f2); border-radius: 13px; }
.selected-art, .final-art { width: min(65%, 150px); aspect-ratio: 1; border-radius: var(--mask); box-shadow: 0 7px 13px #44305619; }
.final-art { object-fit: cover; }
.store-stage { padding: 14px 14px 19px; gap: 7px; background: linear-gradient(152deg, #f8f6fb, #ece9f4); }
.mock-store-name { align-self: start; justify-self: start; font-size: .73rem; font-weight: 680; color: #665a78; }
.store-stage .selected-art { width: min(57%, 126px); margin-block: 4px; }
.mock-app-name { font-size: .93rem; font-weight: 640; }
.mock-install { display: inline-block; padding: 3px 14px; border-radius: 20px; font-size: .73rem; font-weight: 700; background: #e1e9fa; color: #265ead; }
[data-store-preview="google"] .store-stage { background: linear-gradient(152deg, #f5faf7, #e6f1ec); }
[data-store-preview="google"] .mock-store-name { color: #49675a; }
[data-store-preview="google"] .mock-install { background: #167447; color: #fff; padding-inline: 24px; }
.final-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.final-stage figure { margin: 0; width: 100%; }
.design-master-stage { grid-template-columns: minmax(0, 155px); justify-content: center; }
.final-stage .final-art, .comparison-art { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--mask); }
.comparison-art { background: var(--sprite) var(--sprite-x) var(--sprite-y) / var(--sprite-size) no-repeat; }
.final-stage figcaption { margin-top: 6px; text-align: center; font-size: .75rem; color: #675a72; }
.checkout-unavailable { color: var(--muted); font-size: .88rem; }
.selection-copy { margin: 17px 0; }
.selection-style { color: var(--purple); font-weight: 640; font-size: .82rem; }
.selection-copy h3 { margin: 3px 0; font-size: 1.32rem; font-weight: 640; line-height: 1.2; letter-spacing: -.04em; overflow-wrap: anywhere; }
.selection-copy p, .test-checkout p { margin: 7px 0 12px; font-size: .88rem; }
.selection-panel .primary-button { font-size: .9rem; }
.test-checkout { border-top: 1px solid var(--line); padding-top: 15px; }
.text-button, .start-again { display: block; width: 100%; margin-top: 10px; text-align: center; }
.start-again { font-size: .84rem; color: var(--muted); text-underline-offset: 3px; }
.is-finished .concept-choice { cursor: default; }
.is-finished .concept-choice:hover .concept-frame { background: transparent; }
body:has(.palette-editor[open]) { overflow: hidden; }
.palette-editor {
  color: var(--ink);
  background: var(--paper);
  width: min(748px, calc(100% - 44px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid #e6e1e9;
  border-radius: 22px;
  box-shadow: 0 24px 96px #21162e48;
  overscroll-behavior: contain;
}
.palette-editor::backdrop { background: #211b2ab3; }
.editor-shell { padding: clamp(18px, 3vw, 30px); }
.editor-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.editor-dismiss, .palette-step {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0;
  border-radius: 50%; border: 1px solid #dcd5e0; color: #4c3b5b; background: #fff;
}
.editor-dismiss:hover, .palette-step:hover { background: #f0eaf5; border-color: #b6a4c6; }
.editor-dismiss span { font-size: 1.6rem; line-height: 1; margin-top: -.12em; font-weight: 400; }
.editor-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); align-items: center; gap: clamp(20px, 3vw, 32px); }
.editor-stage { aspect-ratio: 1; display: grid; place-items: center; border-radius: 16px; background-color: #eee8f2; background-image: linear-gradient(#7e63800a 1px, transparent 1px), linear-gradient(90deg, #7e63800a 1px, transparent 1px), radial-gradient(ellipse at 30% 15%, #faf6f7, #e8dfed); background-size: 18px 18px, 18px 18px, auto; }
.editor-art { width: 75%; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 10px 24px #49385322; }
.palette-editor[data-store-preview="google"] .editor-art { border-radius: 30%; }
.editor-art > :is(svg, canvas), .selected-art > :is(svg, canvas, img) { border-radius: inherit; display: block; width: 100%; height: 100%; }
.editor-controls h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); line-height: 1.03; font-weight: 620; letter-spacing: -.055em; margin: 4px 0 22px; overflow-wrap: anywhere; }
.palette-picker { padding: 13px 15px; border: 1px solid var(--line); background: #fff; border-radius: 13px; }
.palette-picker > strong { display: block; color: var(--muted); font-size: .79rem; font-weight: 600; }
.palette-picker-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 7px; }
.palette-current { display: grid; justify-items: center; gap: 6px; }
.palette-name { font-weight: 650; }
.palette-swatches { display: flex; }
.palette-swatches i { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid white; box-shadow: inset 0 0 0 .5px #0001; }
.palette-swatches i + i { margin-left: -3px; }
.palette-step { width: 38px; height: 38px; }
.palette-step::after { content: ""; height: 8px; width: 8px; border-top: 1.7px solid currentColor; border-right: 1.7px solid currentColor; transform: rotate(45deg); margin-left: -3px; }
.palette-step.previous::after { transform: rotate(-135deg); margin-left: 3px; }
.editor-note { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: 14px 0; }
.editor-back { display: block; margin: 6px auto 0; background: transparent; border: 0; color: #62566b; padding: 8px; font-size: .85rem; }
.editor-back:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
  .palette-editor { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 18px; }
  .editor-header { margin-bottom: 12px; }
  .editor-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .editor-stage { aspect-ratio: auto; padding: 15px; }
  .editor-art { width: min(65%, 24dvh); }
  .editor-controls h2 { margin: 3px 0 12px; font-size: 1.8rem; }
  .palette-picker { padding: 9px 13px; }
  .editor-note { margin: 10px 0; }
}
@media (min-width: 1550px) { .studio-home { padding-top: 88px; } }
@media (max-width: 1020px) {
  .studio-nav__inner, .studio-workspace, .studio-flashes { width: calc(100% - 64px); }
  .home-grid { gap: 34px; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
  .style-name { font-size: .8rem; }
}
@media (max-width: 780px) {
  .studio-nav__inner, .studio-workspace, .studio-flashes { width: min(620px, calc(100% - 40px)); }
  .studio-nav__inner { height: 64px; }
  .studio-home { padding-block: 32px 38px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .studio-heading { font-size: clamp(61px, 12vw, 82px); margin-block: 15px; }
  .studio-intro { margin-block: 15px 23px; }
  .style-options { gap: 7px; }
  .style-name { font-size: .86rem; }
  .sample-shelf { padding: 24px 24px 17px; }
  .sample-grid { padding: 22px 1px; gap: 15px; }
  .collection-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .collection-layout { grid-template-columns: minmax(0, 1fr); }
  .selection-panel { order: -1; position: static; }
  .concept-grid { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 5px; }
  .preview-stage { padding: 15px; }
  .selected-art, .final-art { width: 90px; }
  .store-stage .selected-art { width: 84px; }
  .final-stage { display: flex; justify-content: center; }
  .final-stage figure { max-width: 90px; }
  .progress-view { min-height: auto; padding-block: 45px; flex-direction: column; align-items: flex-start; }
  .working-art { width: 125px; align-self: center; }
  .progress-copy { width: 100%; max-width: none; }
}
@media (max-width: 390px) {
  .studio-nav__inner, .studio-workspace, .studio-flashes { width: calc(100% - 28px); }
  .studio-links { gap: 1px; }
  .studio-links a { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .preview-progress::-webkit-progress-value { transition: none; }
  *, *::before, *::after { scroll-behavior: auto !important; }
  .progress-track span { animation: none; }
  .style-choice__body { transition: none; }
}
