.studio-body {
  background: #07101d;
  font:
    20px/1.2 VT323,
    monospace;
  color: #eaf4ff;
}
.studio-body button,
.studio-body input,
.studio-body select,
.studio-body textarea {
  font: inherit;
}
.studio-body button {
  cursor: pointer;
}
.studio-top {
  height: 100px;
  border-bottom: 3px solid #294c72;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #09172a;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.studio-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #8ab0d2;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 1px;
}
.studio-brand img {
  width: 205px;
  height: auto;
  image-rendering: pixelated;
}
.studio-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.studio-toolbar button {
  font-size: 17px;
  white-space: nowrap;
  padding: 10px 14px;
}
.studio-toolbar .end-turn {
  min-width: 110px;
  font: 11px Silkscreen;
  min-height: 43px;
}
#save-state {
  font-size: 15px;
  color: #9dbbd3;
  max-width: 150px;
  margin-right: 8px;
}
.studio-shell {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  min-height: calc(100vh - 100px);
}
.studio-nav {
  background: #0c1a2c;
  border-right: 2px solid #263f5c;
  padding: 28px 18px;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.studio-nav nav {
  display: grid;
  gap: 8px;
}
.studio-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid transparent;
  background: transparent;
  color: #9bb9d3;
  text-align: left;
  font-size: 22px;
}
.studio-nav button.active {
  background: #1457a5;
  border-color: #4e9df3;
  color: #fff;
  box-shadow:
    inset 2px 2px #307bd1,
    3px 3px #000;
}
.studio-nav button b {
  font-size: 16px;
  margin-left: auto;
  color: #7ff4f2;
}
.studio-nav-bottom {
  margin-top: auto;
  padding-top: 50px;
  font-size: 16px;
  color: #8aa7c1;
}
.studio-nav-bottom a {
  color: #91f8f3;
}
.draft-indicator {
  font: 9px Silkscreen;
  color: #ffe480;
  background: #323223;
  border: 1px solid #6b633a;
  padding: 7px;
}
.studio-main {
  padding: 32px;
  min-width: 0;
}
.studio-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.studio-heading h1 {
  font: 25px/1.3 Silkscreen;
  letter-spacing: -1px;
  margin: 0 0 8px;
}
.studio-heading p {
  margin: 0;
  color: #a0b9d0;
  font-size: 20px;
}
.studio-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.studio-body .primary {
  border: 2px solid #8dd8ff;
  background: #1464c9;
  color: #fff;
  padding: 10px 16px;
  box-shadow:
    inset 2px 2px #469bec,
    3px 3px #000;
}
.studio-body .danger {
  color: #ff9ab4;
  border-color: #754259;
}
.studio-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.studio-body input,
.studio-body select,
.studio-body textarea {
  background: #081423;
  color: #eaf5ff;
  border: 2px solid #355777;
  box-shadow: inset 2px 2px #03080e;
  padding: 10px 12px;
  border-radius: 0;
  min-width: 0;
}
.studio-filters input {
  flex: 1;
  min-width: 160px;
}
.studio-filters select {
  min-width: 145px;
}
.studio-body input:focus,
.studio-body textarea:focus,
.studio-body select:focus {
  outline: 2px solid #6ce6f1;
  outline-offset: 2px;
}
.studio-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}
.studio-card {
  display: block;
  width: 100%;
  border: 3px solid #020917;
  outline: 1px solid #4389db;
  background: #165ab5;
  box-shadow:
    inset 2px 2px #438fe7,
    4px 4px #000;
  padding: 6px;
  color: white;
  text-align: left;
  position: relative;
  transition: transform 0.15s;
}
.studio-card:hover {
  transform: translateY(-4px);
  outline: 2px solid #83f2f1;
}
.studio-card.archived {
  opacity: 0.55;
}
.studio-card-title {
  height: 40px;
  display: flex;
  align-items: center;
  font: 21px/1 VT323;
  padding: 0 30px 0 3px;
  text-shadow: 2px 2px #031d44;
}
.studio-cost {
  position: absolute;
  right: 6px;
  top: 6px;
  background: #ff9d31;
  border: 2px solid #153056;
  padding: 2px 7px;
  font-size: 25px;
  color: #fff;
}
.studio-art {
  height: 145px;
  background: #ffe873;
  border: 2px solid #06214b;
  overflow: hidden;
  position: relative;
}
.studio-art canvas,
.studio-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
}
.studio-card-type {
  font-size: 14px;
  color: #c3dfff;
  display: block;
  padding: 5px 3px;
  text-transform: uppercase;
}
.studio-card-text {
  min-height: 85px;
  background: #080e19;
  margin: 0;
  padding: 9px;
  font-size: 17px;
  line-height: 1.15;
}
.studio-card-stats {
  background: #080e19;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
}
.studio-card-stats b {
  background: #d73853;
  border: 2px solid #060b17;
  padding: 2px 8px;
  font-size: 24px;
}
.studio-card-stats b:last-child {
  background: #23875a;
}
.studio-card-stats small {
  font-size: 14px;
  color: #aac2dd;
}
.studio-editor {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) 300px;
  gap: 30px;
  max-width: 1180px;
}
.studio-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.studio-fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #a8c4df;
  font-size: 18px;
}
.studio-fields .wide {
  grid-column: 1/-1;
}
.studio-fields textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.3;
}
.studio-fields input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #71eeee;
}
.studio-fields .check {
  flex-direction: row;
  align-items: center;
  color: #e6f2ff;
}
.studio-section {
  background: #0c1c2f;
  border: 2px solid #2c4b6b;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 3px 3px #030912;
}
.studio-section h2 {
  font: 14px/1.4 Silkscreen;
  color: #80e9f0;
  letter-spacing: 0;
  margin: 0 0 18px;
}
.studio-section h3 {
  font: 23px VT323;
  letter-spacing: 0;
}
.studio-section p {
  color: #a2bbd3;
}
.studio-preview {
  position: sticky;
  top: 126px;
  align-self: start;
}
.studio-preview .studio-card {
  cursor: default;
}
.studio-preview small {
  display: block;
  color: #9bbbd6;
  margin-top: 15px;
  font-size: 16px;
}
.studio-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.studio-tags label {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #e5f5ff;
}
.studio-rule {
  background: #081321;
  border: 2px solid #31516c;
  border-left: 4px solid #b6e840;
  padding: 15px;
  margin-top: 12px;
}
.rule-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 13px;
}
.rule-head select {
  flex: 1;
}
.rule-action {
  display: grid;
  grid-template-columns: 1fr 1fr 80px 32px;
  gap: 7px;
  margin: 9px 0;
  align-items: center;
}
.rule-action select,
.rule-action input {
  font-size: 17px;
  padding: 7px;
  max-width: 100%;
}
.rule-action-extra {
  grid-column: 1/4;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 17px;
}
.rule-action-extra input {
  width: 65px;
}
.studio-small-button {
  border: 1px solid #3c6188;
  background: #173651;
  color: #b8e1ff;
  padding: 5px 9px;
  font-size: 17px;
}
.studio-rule-note {
  font-size: 16px;
  color: #a9c1d8;
  line-height: 1.25;
}
.studio-code {
  width: 100%;
  min-height: 210px;
  font: 14px/1.5 monospace !important;
  tab-size: 2;
}
.studio-link {
  background: none;
  border: 0;
  color: #7ee5ee;
  text-decoration: underline;
  padding: 3px 0;
}
.studio-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.asset-tile {
  background: #0c1d32;
  border: 2px solid #315477;
  overflow: hidden;
  text-align: left;
  color: #ebf6ff;
  padding: 0;
  position: relative;
}
.asset-image {
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #081019;
  background-image:
    linear-gradient(45deg, #162238 25%, transparent 25%),
    linear-gradient(-45deg, #162238 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #162238 75%),
    linear-gradient(-45deg, transparent 75%, #162238 75%);
  background-size: 20px 20px;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
}
.asset-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.asset-caption {
  padding: 12px;
  display: block;
}
.asset-caption b {
  display: block;
  font-weight: 400;
  font-size: 21px;
}
.asset-caption small {
  display: block;
  font-size: 15px;
  color: #9ebdd7;
  margin-top: 7px;
}
.upload-zone {
  border: 2px dashed #49779e;
  background: #0c2036;
  text-align: center;
  padding: 30px;
  margin-bottom: 24px;
  color: #b5d5ed;
}
.upload-zone.dragging {
  background: #17496b;
  border-color: #7cf4ed;
}
.upload-zone p {
  margin: 8px;
}
.upload-zone input {
  max-width: 100%;
  font-size: 17px;
}
.studio-empty {
  padding: 60px 30px;
  text-align: center;
  color: #a2bfd8;
  font-size: 23px;
  border: 2px dashed #304d6b;
}
.studio-empty h2 {
  font: 20px Silkscreen;
}
.studio-message {
  border-left: 4px solid #f4c45e;
  background: #322c20;
  color: #ffdfa1;
  padding: 15px 18px;
  font-size: 19px;
  line-height: 1.2;
  margin-bottom: 20px;
}
.studio-error {
  color: #ffb1c4;
  background: #391a2b;
  border-color: #ff6994;
}
.studio-good {
  color: #baf6d0;
  background: #122e2b;
  border-color: #5bd799;
}
.studio-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #143d59;
  border: 2px solid #76d9ee;
  padding: 13px 25px;
  color: #e7ffff;
  box-shadow: 4px 4px #000;
  z-index: 100;
  max-width: 90vw;
}
.studio-body dialog {
  width: min(640px, 95vw);
  font: 20px VT323;
}
.studio-body dialog h2 {
  font: 19px Silkscreen;
}
.studio-body dialog label {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}
.studio-body dialog p {
  font: 20px/1.25 VT323;
}
.studio-history {
  width: 100%;
  border-collapse: collapse;
  background: #0d1c2e;
}
.studio-history td,
.studio-history th {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #284761;
}
.studio-history th {
  font-weight: 400;
  color: #8fb1cd;
  font-size: 17px;
}
.studio-guide {
  max-width: 900px;
}
.studio-guide p,
.studio-guide li {
  font-size: 21px;
  line-height: 1.3;
  color: #bfd4e7;
}
.studio-guide code {
  font: 15px monospace;
  color: #8eedea;
}
.studio-guide li {
  margin: 10px 0;
}
.studio-asset-detail img {
  display: block;
  max-width: 100%;
  height: 220px;
  object-fit: contain;
  image-rendering: pixelated;
}
.studio-preview-tag {
  position: fixed;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 1000;
  background: #ffca5e;
  color: #151d2d;
  padding: 8px 16px;
  font: 18px VT323;
  text-decoration: none;
}
.studio-sim-output {
  white-space: pre-wrap;
  font: 17px/1.3 VT323;
  color: #b5ecde;
  background: #06141b;
  padding: 14px;
  border: 1px solid #366374;
  max-height: 220px;
  overflow: auto;
}
@media (max-width: 1100px) {
  .studio-brand span {
    display: none;
  }
  .studio-top {
    padding: 0 18px;
  }
  .studio-toolbar {
    gap: 7px;
  }
  .studio-toolbar button {
    padding: 9px;
    font-size: 16px;
  }
  .studio-shell {
    grid-template-columns: 175px minmax(0, 1fr);
  }
  .studio-nav {
    padding: 25px 10px;
  }
  .studio-main {
    padding: 24px;
  }
  .studio-editor {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 20px;
  }
  .studio-section {
    padding: 17px;
  }
  .rule-action {
    grid-template-columns: 1fr 1fr 65px 28px;
    gap: 5px;
  }
}
@media (max-width: 800px) {
  .studio-top {
    height: auto;
    min-height: 90px;
    flex-wrap: wrap;
    padding: 8px 14px;
    gap: 0;
  }
  .studio-brand img {
    width: 150px;
  }
  .studio-toolbar {
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .studio-toolbar #save-state {
    width: 100%;
    max-width: none;
    text-align: right;
  }
  .studio-toolbar .end-turn {
    min-width: 85px;
    font-size: 9px;
    min-height: 37px;
  }
  .studio-shell {
    grid-template-columns: 1fr;
  }
  .studio-nav {
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 2px solid #294765;
    padding: 12px;
  }
  .studio-nav > .eyebrow,
  .studio-nav-bottom {
    display: none;
  }
  .studio-nav nav {
    display: flex;
    overflow: auto;
    gap: 6px;
  }
  .studio-nav button {
    white-space: nowrap;
    font-size: 18px;
    padding: 9px;
  }
  .studio-nav button b {
    display: none;
  }
  .studio-main {
    padding: 20px 15px;
  }
  .studio-editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-preview {
    position: static;
    max-width: 300px;
    grid-row: 1;
    margin: auto;
    width: 100%;
  }
  .studio-heading h1 {
    font-size: 19px;
  }
  .studio-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .studio-heading p {
    font-size: 18px;
  }
  .studio-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
  .studio-art {
    height: 135px;
  }
  .studio-card-title {
    font-size: 19px;
  }
  .studio-fields {
    gap: 16px;
  }
  .studio-asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .studio-history td,
  .studio-history th {
    padding: 10px;
    font-size: 17px;
  }
  .studio-actions {
    flex-wrap: wrap;
  }
  .studio-filters select {
    min-width: 100px;
  }
  .rule-action {
    grid-template-columns: 1fr 1fr 55px 28px;
  }
  .studio-rule {
    padding: 10px;
  }
  .rule-action select {
    font-size: 16px;
  }
  .studio-brand {
    max-width: 130px;
  }
  .studio-toolbar button {
    font-size: 15px;
  }
  .studio-toolbar #sign-in {
    max-width: 80px;
  }
  .studio-toolbar {
    gap: 5px;
  }
}
