
:root {
  color-scheme: dark
}
.creator {
  height: 100dvh;
  overflow: hidden;
  background: #090d13
}
.creator button {
  font: 800 14px Arial;
  color: #edf0f6;
  background: #222b38;
  border: 1px solid #526076;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer
}
.creator button:hover {
  border-color: #ffa45c;
  background: #3c302a
}
.creator button:disabled {
  opacity: .4;
  cursor: wait
}
.creator .primary {
  background: #f89445;
  color: #201006;
  border-color: #ffb877
}
.top {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  background: #151b25;
  border-bottom: 1px solid #493b30
}
.top>div {
  font-size: 15px;
  letter-spacing: 3px;
  font-weight: 900;
  color: #ffb475
}
.top small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #aab4c7;
  text-align: center
}
.top>a:last-child {
  font-size: 14px;
  color: #bac5d6
}
.creator main {
  height: calc(100dvh - 76px);
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 10%,#30231e,#090d13 70%)
}
.projectbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4%
}
.projectbar input {
  background: none;
  border: 0;
  border-bottom: 1px solid #585564;
  color: #fff;
  padding: 8px;
  font-size: 16px;
  font-weight: 800;
  width: min(240px,25vw)
}
#save-status {
  font-size: 12px;
  color: #b6c4d5;
  margin-right: auto
}
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px
}
.canvas-holder {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center
}
#meme {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid #59576a;
  border-radius: 6px;
  box-shadow: 0 20px 60px #000a;
  touch-action: none;
  background: repeating-conic-gradient(#252c36 0% 25%,#323a46 0% 50%) 0/24px 24px
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px
}
.actions button {
  font-size: 12px;
  padding: 8px 10px
}
#status {
  font-size: 13px;
  color: #c2ccdc;
  line-height: 1.4;
  margin: 0;
  min-height: 22px;
  text-align: center
}
.creator dialog {
  width: min(920px,calc(100vw - 24px));
  height: min(90dvh,980px);
  max-height: calc(100dvh - 20px);
  padding: 0;
  border: 1px solid #71614f;
  border-radius: 14px;
  background: #121b27;
  color: #f0f3f8;
  box-shadow: 0 30px 90px #000c
}
.creator dialog[open] {
  display: flex;
  flex-direction: column
}
.creator dialog::backdrop {
  background: #02060abb;
  backdrop-filter: blur(6px)
}
.creator dialog>header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 22px;
  background: #0d1520
}
.creator dialog h2 {
  font-size: 30px;
  margin: 0
}
.creator dialog small {
  font-size: 10px;
  letter-spacing: 2px;
  color: #e9b285
}
.creator dialog header button {
  font-size: 27px;
  padding: 0 12px
}
#tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow: auto;
  flex-shrink: 0;
  border-bottom: 1px solid #3c4759
}
#tabs button {
  white-space: nowrap
}
#tabs button[aria-selected=true] {
  background: #60381e;
  border-color: #ffa656
}
#panel-status {
  font-size: 14px;
  background: #34291f;
  color: #ffd6ae;
  margin: 0;
  padding: 0 20px
}
#panel-status:not(:empty) {
  padding: 10px 20px
}
#panels {
  overflow: auto;
  min-height: 0;
  padding: 22px
}
#panels section[hidden] {
  display: none
}
#panels h3 {
  font: 25px var(--display);
  color: #ffd1a8;
  margin: 25px 0 10px
}
#panels h3:first-child {
  margin-top: 0
}
#panels p {
  font-size: 14px;
  color: #b7c3d5;
  line-height: 1.55
}
#panels label {
  display: block;
  font-size: 14px;
  color: #d7deea;
  font-weight: 700;
  margin: 12px 0
}
#panels input:not([type=checkbox]),#panels textarea,#panels select {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid #536079;
  border-radius: 7px;
  background: #080f19;
  color: #fff;
  font: 16px Arial;
  margin-top: 6px
}
#panels textarea {
  resize: vertical;
  min-height: 80px
}
#panels input[type=range] {
  padding: 0;
  accent-color: #ff9b52
}
#panels input[type=color] {
  height: 44px;
  padding: 4px
}
#panels .check {
  display: flex;
  align-items: center;
  gap: 8px
}
.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 9px;
  margin: 14px 0
}
.asset-grid button {
  font-size: 12px;
  min-width: 0;
  padding: 5px
}
.asset-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block
}
.asset-grid button[aria-pressed=true] {
  background: #53351f;
  border-color: #ffad66
}
.worlds {
  grid-template-columns: repeat(4,1fr)
}
.worlds img {
  aspect-ratio: 1.4;
  object-fit: cover
}
.templates {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 9px
}
.templates button {
  text-align: left;
  min-height: 65px;
  border-left: 3px solid #ffa45e
}
.vault-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 13px;
  margin: 15px 0
}
.vcard {
  padding: 10px;
  border: 1px solid #43536b;
  background: #0b1420;
  border-radius: 10px;
  overflow: hidden
}
.vcard img {
  width: 100%;
  aspect-ratio: 1.3;
  object-fit: contain;
  background: #202a37
}
.vcard h4 {
  font-size: 15px;
  margin: 8px 0;
  overflow-wrap: anywhere
}
.vcard p {
  font-size: 12px!important;
  margin: 4px 0 8px
}
.vcard button {
  padding: 6px 8px;
  font-size: 12px;
  margin: 3px
}
#panels a {
  color: #ffb47b;
  text-decoration: underline
}
.empty {
  grid-column: 1/-1;
  border: 1px dashed #56647b;
  padding: 25px;
  border-radius: 8px;
  text-align: center
}
.pack-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 13px
}
.pack-grid img {
  height: 180px;
  width: 100%;
  object-fit: contain;
  background: #090f18
}
.pack-grid a {
  display: block;
  text-align: center
}
#history button {
  display: block;
  margin: 8px 0;
  width: 100%;
  text-align: left
}
details {
  border-top: 1px solid #414b5c;
  margin-top: 24px;
  padding-top: 16px
}
summary {
  cursor: pointer
}
button:focus-visible,input:focus-visible,canvas:focus-visible {
  outline: 3px solid #ffc086;
  outline-offset: 3px
}@media(max-width:700px){
.top {
  height: 64px;
  padding: 0 13px
}
.top>div {
  font-size: 11px;
  letter-spacing: 1px
}
.top small {
  font-size: 8px
}
.top>a:last-child {
  display: none
}
.creator main {
  height: calc(100dvh - 64px)
}
.projectbar {
  padding: 9px 12px;
  gap: 7px;
  flex-wrap: wrap
}
.projectbar input {
  width: 145px;
  font-size: 14px
}
#save-status {
  font-size: 10px;
  max-width: 110px
}
.projectbar button {
  font-size: 12px;
  padding: 8px
}
#duplicate {
  display: none
}
.stage {
  padding: 0 10px;
  gap: 6px
}
.actions button {
  font-size: 10px;
  padding: 7px
}
#status {
  font-size: 11px
}
#panels {
  padding: 16px
}
.asset-grid {
  grid-template-columns: repeat(4,1fr)
}
.worlds {
  grid-template-columns: repeat(3,1fr)
}
.templates,.vault-grid {
  grid-template-columns: repeat(2,1fr)
}
#tabs button {
  font-size: 12px;
  padding: 8px
}
.creator dialog {
  height: 94dvh
}}

/* Keep controls legible on compact screens. */
.top small,.creator dialog small {
  font-size: 12px
}
.actions button,.asset-grid button,.vcard button {
  font-size: 14px
}
#save-status {
  font-size: 14px
}@media(max-width:700px){
.top small {
  display: none
}
.top>div {
  font-size: 12px
}
.projectbar {
  gap: 6px
}
.projectbar input {
  flex: 1;
  min-width: 110px
}
.projectbar button,.actions button {
  font-size: 14px
}
.projectbar #save-status {
  font-size: 12px;
  max-width: 100px
}
#status {
  font-size: 12px
}
#tabs button {
  font-size: 14px
}}
.sample-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  margin: 16px 0 28px
}
.sample-grid canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 5px
}
.sample-grid .vcard {
  border-color: #8a5b35
}
.sample-grid .vcard p {
  font-size: 14px!important
}
.sample-grid button {
  width: 100%;
  min-height: 42px
}@media(max-width:520px){
.sample-grid {
  grid-template-columns: 1fr
}}

/* Plain-language studio help and export details. */
.field-help {
  position: relative;
  min-width: 0
}
.field-help>label {
  padding-top: 3px
}
.field-help>label:first-line {
  line-height: 1.6
}
.field-help .help-button {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
  color: #ffd2a8;
  border-color: #ad794b;
  background: #37271f
}
.field-help>label {
  padding-right: 34px
}
.field-help>label input:not([type=checkbox]),.field-help>label select,.field-help>label textarea {
  width: calc(100% + 34px)!important
}
.help-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0
}
.studio-tooltip {
  position: fixed;
  z-index: 10000;
  width: min(360px,calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 14px 17px;
  border: 1px solid #dc9b61;
  border-radius: 10px;
  background: #101925;
  color: #fff0e1;
  box-shadow: 0 12px 38px #000b;
  font: 15px/1.55 Arial;
  text-align: left;
  letter-spacing: normal;
  pointer-events: auto
}
.studio-tooltip[hidden] {
  display: none
}
.export-specs,.export-result {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #695640;
  border-radius: 10px;
  background: #0b141f
}
.export-specs h4,.export-result h4 {
  font-size: 19px;
  margin: 0 0 12px;
  color: #ffd4ac
}
.export-specs dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  margin: 0
}
.export-specs dt {
  color: #b8c6da
}
.export-specs dd {
  margin: 0;
  color: #f1f4fb
}
.export-specs p {
  margin-bottom: 0
}
.export-result video,#motion-canvas {
  display: block;
  max-width: 100%;
  max-height: 300px;
  width: auto;
  margin: 14px auto;
  border: 1px solid #536178;
  border-radius: 7px;
  background: #090d13
}
.export-result[hidden],#motion-canvas[hidden],#motion-cancel[hidden] {
  display: none
}
.export-result a {
  display: block;
  padding: 12px;
  text-align: center;
  background: #4c2f1d;
  border: 1px solid #ec9a56;
  border-radius: 7px
}
.guide-steps {
  padding-left: 24px
}
.guide-steps li {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 16px;
  color: #c2cee0
}
.guide-steps strong {
  color: #ffe0bb
}
.inline-explanation {
  border-left: 3px solid #fca760;
  padding-left: 12px
}
#panels .inline-explanation {
  font-size: 15px
}@media(max-width:700px){
.export-specs dl {
  grid-template-columns: 1fr;
  gap: 5px
}
.export-specs dd {
  margin-bottom: 10px
}
.field-help .help-button {
  min-width: 30px;
  height: 30px
}}
.creator main {
  display: grid;
  grid-template-rows: auto minmax(0,1fr)
}
#tabs {
  flex-wrap: wrap;
  overflow: visible;
  padding: 10px;
  gap: 6px
}
#tabs button {
  font-size: 14px;
  padding: 8px 10px;
  flex: 1 0 auto
}
#tabs button[aria-pressed=true] {
  background: #60381e;
  border-color: #ffa656;
  color: #ffe2c8
}
#panels {
  flex: 1;
  min-height: 0;
  padding: 18px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable
}
#panels h3 {
  font: 700 21px Arial
}
#panels p {
  font-size: 16px
}
#panels .asset-grid {
  grid-template-columns: repeat(3,minmax(0,1fr))
}
#panels .worlds,#panels .templates,#panels .vault-grid,#panels .pack-grid,#panels .sample-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px
}
#panels .grid2 {
  gap: 10px
}
#panels .asset-grid button {
  font-size: 14px
}
#panels .export-specs dl {
  grid-template-columns: 1fr;
  gap: 6px
}
#panels .export-specs dd {
  margin-bottom: 10px
}
.stage {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  gap: 10px;
  border: 1px solid #424859;
  border-radius: 12px;
  background: #0c121ce6;
  overflow: auto
}
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%
}
.preview-heading h2 {
  font: 700 20px Arial;
  margin: 0;
  color: #ffca9c
}
.preview-heading p {
  font: 14px/1.5 Arial;
  color: #b8c5d8;
  margin: 4px 0 0
}
.canvas-holder {
  overflow: hidden;
  min-height: 80px
}
.canvas-holder canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain
}
.canvas-holder #motion-canvas {
  margin: 0;
  border: 1px solid #59576a;
  border-radius: 6px
}
.canvas-holder:has(#motion-canvas:not([hidden])) #meme {
  display: none
}
.canvas-holder #motion-canvas[hidden],#still-preview[hidden] {
  display: none
}
.preview-tip {
  font: 14px/1.4 Arial;
  color: #b6c4d8;
  margin: 0;
  text-align: center
}
.stage .actions {
  flex-shrink: 0
}
.stage .actions button {
  font-size: 14px;
  padding: 8px 10px
}
#status {
  font-size: 14px;
  flex-shrink: 0
}
.control-value {
  float: right;
  color: #ffc28d;
  font-variant-numeric: tabular-nums;
  font-size: 14px
}
.creator select:focus-visible,.creator textarea:focus-visible {
  outline: 3px solid #ffc086;
  outline-offset: 3px
}
@media(max-width:850px){
.stage {
  padding: 10px
}
.preview-heading {
  flex-wrap: wrap
}
.top {
  padding: 0 18px
}
.projectbar {
  padding: 10px 18px
}}
@media(max-width:700px){
.stage {
  grid-row: 1;
  gap: 5px;
  padding: 8px
}
.preview-heading h2 {
  font-size: 16px
}
.preview-heading p,.preview-tip {
  display: none
}
.stage .actions {
  flex-wrap: nowrap;
  width: 100%;
  justify-content: flex-start;
  overflow: auto
}
.stage .actions button {
  flex-shrink: 0;
  font-size: 14px;
  padding: 6px 9px
}
.stage #status {
  font-size: 12px;
  min-height: 16px;
  max-height: 34px;
  overflow: auto
}
.projectbar {
  padding: 8px 10px
}
#tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 7px;
  gap: 5px
}
#tabs button {
  flex: none;
  font-size: 14px;
  padding: 7px 10px
}
#panels {
  padding: 14px
}
.canvas-holder {
  min-height: 40px
}}
@media(max-height:550px) and (min-width:701px){
.top {
  height: 56px
}
.creator main {
  height: calc(100dvh - 56px)
}
.preview-heading p,.preview-tip {
  display: none
}
.projectbar {
  padding-top: 5px;
  padding-bottom: 5px
}
.stage {
  padding: 8px;
  gap: 4px
}}

