@font-face {
  font-family: "MIME Comic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/nopaint.art/ai/ComicRelief-Bold.ttf") format("truetype");
}
:root {
  color-scheme: light;
  font-family:
    "MIME Comic",
    "Comic Relief",
    "Comic Sans MS",
    "Chalkboard SE",
    system-ui,
    sans-serif;
  --background: #dbffff;
  --ink: #1b1f2e;
  --canvas: #caebeb;
  --accent: #434e63;
  background: var(--background);
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { color-scheme: dark; --background: #00000a; --ink: #c9e9ff; --canvas: #14141e; --accent: #a7c3e8; }
}
:root, button, input, textarea, select, dialog, #hint-field, #painting {
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  cursor: url("/aesthetic.computer/cursors/precise.svg") 12 12, auto;
  height: 100svh;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  touch-action: manipulation;
}
button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
a {
  color: inherit;
}
input,
select {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  padding: 8px;
  min-width: 0;
}
input::placeholder {
  color: inherit;
  opacity: 0.5;
}
#studio {
  height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
}
#painting {
  position: relative;
  flex: none;
  background: var(--canvas);
  width: var(--side, 256px);
  height: var(--side, 256px);
}
#canvas,
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
#overlay {
  touch-action: none;
  /* The same precise crosshair aesthetic.computer and oskiewar.com use. */
  cursor: url("/aesthetic.computer/cursors/precise.svg") 12 12, crosshair;
}
#decisions {
  width: min(100%, 430px);
  height: 48px;
  flex: none;
  min-height: 0;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.decisions {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto auto;
  grid-template-rows: minmax(0, 1fr);
}
/* "Note ________ Paint": Note is a word, not a box — the head of the blank,
   and the painting's version history when pressed. */
#note-word {
  border: 0;
  background: none;
  padding: 0 6px 0 12px;
  font: 700 18px/1 "Comic Relief", "Comic Sans MS", cursive;
  color: var(--ink);
  letter-spacing: .01em;
}
#note-word:hover { text-decoration: underline; text-underline-offset: 3px; }
#hint-field::before { left: 2px; }
/* The blank stretches; No and Paint keep the widths fitHint measures, and a
   hidden No gives its column back. */
.decisions [data-action="no"] { width: var(--no-width, 48px); }
.decisions [data-action="paint"] { width: var(--paint-width, 76px); }
.decisions button {
  font-weight: 600;
  font-size: clamp(14px, 1.4vw, 18px);
  min-height: 0;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
}
.decisions [data-action="paint"] {
  background: var(--ink);
  color: var(--background);
}
.decisions [data-action="paint"]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ink) 90%, var(--background));
}
.decisions button:disabled {
  opacity: 1;
  color: color-mix(in srgb, var(--ink) 35%, var(--background));
}
.decisions [data-action="paint"]:disabled {
  color: color-mix(in srgb, var(--background) 35%, var(--ink));
}
.decisions:has(#hint-field:not([hidden])) {
  grid-template-columns: auto minmax(80px, 1fr) auto auto;
}
.decisions:has(#hint-field:not([hidden])) [data-action="no"] {
  font-size: clamp(14px, 1.4vw, 18px);
}
/* The prompt is a fill-in-the-blank after "Paint": bare text over a line. */
#hint-field {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
  background: transparent;
  color: var(--ink);
  border: 0;
}
#hint-field::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 2px;
  background: currentColor;
  opacity: 0.8;
  pointer-events: none;
}
#hint-field:has(#hint:placeholder-shown:enabled:not(:focus))::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 2px;
  height: 1.1em;
  transform: translateY(-50%);
  background: currentColor;
  pointer-events: none;
  animation: hint-caret 1s steps(1, end) infinite;
}
@keyframes hint-caret {
  50% {
    opacity: 0;
  }
}
#hint {
  background: transparent;
  color: var(--ink);
  caret-color: currentColor;
  /* One blank, one line: a long prompt scrolls sideways under the caret. */
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  width: 100%;
  min-width: 0;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  font-size: 16px;
  line-height: 1.3;
  border: 0;
  border-radius: 0;
  padding: 10px;
  resize: none;
  overflow-wrap: anywhere;
}
#band {
  min-height: 44px;
  width: 100%;
  flex: none;
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 1200px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
}
#status {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  text-align: left;
  font-size: 14px;
  line-height: 20px;
  padding: 14px 18px;
  min-height: 50px;
}
/* The top-left corner: the painting's code, and Start fresh as a speech
   bubble pointing back at it. */
#corner {
  position: fixed;
  z-index: 5;
  top: calc(env(safe-area-inset-top) + 8px);
  left: calc(env(safe-area-inset-left) + 8px);
  display: flex;
  align-items: center;
  gap: 10px;
}
#painting-code {
  max-width: 45vw;
  padding: 8px 10px;
  font: 600 16px ui-monospace, monospace;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  text-align: left;
}
#painting-code > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#painting-cost {
  font:
    16px system-ui,
    sans-serif;
  margin: 0 0 18px;
}
#painting-code[data-sync="saving"] {
  opacity: 0.6;
}
#painting-code[data-sync="error"] {
  text-decoration: underline wavy var(--accent);
  text-underline-offset: 4px;
}
#brain-controls {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 2px;
}
#start-fresh {
  position: relative;
  padding: 6px 12px;
  min-height: 32px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: #ffb8dc;
  color: #202019;
  border-radius: 10px;
}
#start-fresh::after {
  /* The bubble's tail, pointing at the painting's code to its left. */
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right: 8px solid #ffb8dc;
  border-left: 0;
}
#start-fresh:hover:not(:disabled) { background: #ff8ac7; }
#start-fresh:hover:not(:disabled)::after { border-right-color: #ff8ac7; }
#painting-done {
  width: 100%;
  min-height: 48px;
  background: var(--ink);
  color: var(--background);
  font-size: 22px;
  font-weight: 600;
}
#painting-done:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
#painting-actions { width: min(480px, calc(100% - 24px)); }
#painting-history-title { font-size: 16px; margin: 24px 0 8px; }
#painting-history-message:empty { display: none; }
#painting-history-list { max-height: 40svh; overflow-y: auto; }
#painting-history-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  text-decoration: none;
}
#painting-history-list strong { font-family: ui-monospace, monospace; font-size: 18px; }
#painting-history-list span { font-size: 13px; align-self: center; }
#painting-tools { margin-top: 20px; }
#painting-tools summary { cursor: pointer; }
#painting-tools > a { display: block; margin-top: 16px; }
#painting-link {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
}
.status-model {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}
.status-model-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-model::after {
  flex: none;
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 2px 3px 3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
}
.status-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: color-mix(in srgb, var(--ink) 72%, var(--background));
  font-variant-numeric: tabular-nums;
}
.status-details {
  border-left: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  padding-left: 14px;
}
.status-details > span + span {
  border-left: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  padding-left: 10px;
}
.status-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 14px "MIME Comic", "Comic Relief", "Comic Sans MS", cursive;
}
#band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px) auto minmax(0, 1fr);
  min-height: 56px;
  max-width: none;
  margin-top: auto;
}
#account-toggle { grid-column: 1; grid-row: 1; text-align: left; min-width: 0; overflow: hidden; }
#brain-controls { grid-column: 3; grid-row: 1; }
#wallet-toggle { display: flex; align-items: center; justify-content: center; padding: 8px; }
#status { grid-column: 4; grid-row: 1; justify-content: flex-end; padding: 8px 12px; gap: 8px; font-size: 13px; }
/* The bar shows one thing on the right: the brain, with the turns left
   written on it. The model's name and logo live in the Brains list, which
   the brain opens; the handle watermark opens the account. */
#status { display: none; }
/* The brain is the top-right corner label, opposite the painting's code. */
#brain-controls {
  position: fixed;
  z-index: 5;
  top: calc(4px + env(safe-area-inset-top));
  right: 14px;
  grid-column: auto;
  grid-row: auto;
  padding: 0;
}
#wallet-toggle { position: relative; padding: 0; }
#wallet-toggle .turns-on-brain {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font: 700 15px ui-monospace, monospace; color: #fff;
  text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 6px #0008;
}
#status .status-model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#status .ac-brand-logo { width: 16px; height: 16px; flex: none; }
#status .status-model { font-size: 12px; font-weight: 500; }
#status .status-model::after { display: none; }
.turns-left { font: 600 16px ui-monospace, monospace; flex: none; }
#wallet-toggle .braincell-number { display: none; }
#braincell-balance { opacity: .65; }
#braincell-balance[data-pending] { opacity: 1; }
@media (max-width: 460px) {
  #status, #account-toggle { padding-left: 8px; padding-right: 8px; }
  #status .status-model-name { font-size: 11px; }
  .status-handle { font-size: 12px; }
}
/* One bar at every width: the handle, the decisions, the brain controls and
   the brain all share a single row. Narrow screens shed labels, not rows. */
@media (max-width: 900px) {
  #band {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    min-height: 48px;
  }
  #decisions { width: 100%; }
  #account-toggle { max-width: 30vw; padding-left: 10px; padding-right: 10px; }
  #status { padding-left: 8px; padding-right: 10px; gap: 6px; }
  #status .status-model-name { max-width: 22vw; }
}
@media (max-width: 600px) {
  #band { grid-template-columns: auto minmax(150px, 1fr) auto auto; }
  #status .status-model-name { display: none; }
  #account-toggle { max-width: 24vw; padding-left: 8px; padding-right: 8px; }
  .decisions,
  .decisions:has(#hint-field:not([hidden])) {
    grid-template-columns: auto minmax(56px, 1fr) auto auto;
  }
  #wallet-toggle { padding: 4px; }
}
@media (max-width: 400px) {
  #account-toggle { max-width: 18vw; padding-left: 6px; padding-right: 6px; }
  .decisions,
  .decisions:has(#hint-field:not([hidden])) {
    grid-template-columns: auto minmax(48px, 1fr) auto auto;
  }
  .decisions button { font-size: 13px; }
  .turns-left { font-size: 14px; }
}
#progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #fff8;
  overflow: hidden;
}
#progress span {
  display: block;
  width: 30%;
  height: 100%;
  background: var(--accent);
  animation: working 1.2s ease-in-out infinite alternate;
}
@keyframes working {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(333%);
  }
}
dialog {
  color: var(--ink);
  background: var(--background);
  border: 1px solid var(--ink);
  padding: 18px;
  width: min(620px, calc(100% - 24px));
  max-height: calc(100svh - 32px);
  overflow: auto;
}
dialog::backdrop {
  background: #0007;
}
dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
dialog h1 {
  font-size: 20px;
  margin: 0;
}
dialog header button {
  font-size: 26px;
  padding: 0 8px;
}
dialog p {
  font-size: 14px;
  line-height: 1.5;
}
dialog label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
dialog form label {
  display: block;
}
dialog form input {
  display: block;
  width: 100%;
  margin-top: 5px;
}
dialog form button,
dialog > a,
dialog > button {
  display: block;
  margin: 10px 0;
}
dialog a {
  font-size: 14px;
}
#search {
  width: 100%;
}
#models {
  width: min(760px, calc(100% - 24px));
  height: calc(100svh - 32px);
  max-height: 900px;
  overflow: hidden;
}
#models[open] {
  display: flex;
  flex-direction: column;
}
#models > :not(#model-list) {
  flex: none;
}
#models header h1 {
  flex: 1;
}
#studio-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 -8px;
}
#studio-actions button {
  text-align: left;
  padding: 12px;
}
#model-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 12px -8px 0;
}
.model-choice {
  display: flex;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.model-row {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 16px 8px;
  font-size: 18px;
}
.model-name {
  flex: 1;
}
.model-row small {
  font-size: 12px;
  opacity: 0.65;
}
.model-price {
  flex: none;
  max-width: 45%;
  font-size: 13px;
  text-align: right;
}
.ac-brand-logo {
  display: inline-block;
  flex: none;
  width: 32px;
  height: 32px;
  object-fit: contain;
  padding: 4px;
  background: white;
  border-radius: 5px;
}
.status-model .ac-brand-logo,
.model-location .ac-brand-logo {
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 3px;
}
.model-location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
#model-details-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
#model-details-list .model-location {
  margin: 0;
  font-size: inherit;
}
@media (max-width: 600px) {
  .model-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 4px 12px;
  }
  .model-row > .ac-brand-logo {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .model-name,
  .model-price {
    grid-column: 2;
  }
  .model-price {
    max-width: none;
    text-align: left;
  }
}
.model-info {
  flex: none;
  padding: 8px;
  align-self: stretch;
}
#model-details-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 14px 20px;
  font-size: 14px;
  line-height: 1.5;
}
#model-details-list dt {
  opacity: 0.65;
}
#model-details-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
#model-source {
  margin-top: 22px;
}
#move-failure {
  width: min(480px, calc(100% - 24px));
}
#move-failure header {
  gap: 16px;
}
#move-failure p {
  font-size: 16px;
}
#failure-billing {
  font-weight: 600;
}
#failure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
#failure-actions button {
  padding: 12px;
}
#failure-models {
  background: var(--ink);
  color: var(--background);
}
#signin-qr {
  display: block;
  width: min(228px, 100%);
  height: auto;
  margin: 18px auto;
  image-rendering: pixelated;
}
#signin-methods > button {
  display: block;
  margin: 12px 0;
}
#email-link summary {
  cursor: pointer;
  padding: 12px 0;
}
#qr-message:empty {
  display: none;
}
.signin-page {
  height: auto;
  min-height: 100svh;
  overflow: auto;
  padding: 32px 24px;
}
.signin-page main {
  max-width: 440px;
  margin: 10vh auto;
}
.signin-page h1 {
  font-size: 28px;
}
.signin-page p {
  line-height: 1.5;
}
.signin-page input {
  width: 100%;
  margin: 8px 0;
}
.signin-page button {
  margin: 12px 0 24px;
  border: 1px solid var(--ink);
  padding: 12px;
}
.model-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.model-row span:empty {
  display: none;
}
.model-row[aria-pressed="true"] + .model-info {
  background: var(--ink);
  color: var(--background);
}
.model-row[aria-pressed="true"] {
  background: var(--ink);
  color: var(--background);
}
#model-notice:empty,
#account-message:empty {
  display: none;
}
#history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
#history-list button {
  padding: 0;
  text-align: left;
  font-size: 12px;
}
#history-list img {
  width: 100%;
  aspect-ratio: 1;
  image-rendering: pixelated;
}
#history-list small {
  display: block;
  overflow-wrap: anywhere;
}
#history-list .rejected {
  opacity: 0.5;
}
[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  :root, button, input, textarea, select, dialog, #hint-field, #painting { transition: none; }
  #hint-field::after {
    animation: none !important;
  }
  #progress span {
    animation: none;
    width: 100%;
  }
}
#hint:disabled {
  opacity: 0.5;
}

.braincell-amount {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.braincell-logo {
  display: inline-block;
  flex: none;
  width: 1.4em;
  height: 1.4em;
  object-fit: contain;
  vertical-align: middle;
}
#braincell-balance[data-pending] {
  color: var(--accent);
}
#braincell-balance[data-pending] .braincell-logo {
  filter: drop-shadow(0 0 4px #ff61b6);
}
.braincell-spark {
  position: fixed;
  z-index: 20;
  width: 20px;
  height: 20px;
  pointer-events: none;
  filter: drop-shadow(0 0 5px #ff61b6);
}
@media (prefers-reduced-motion: reduce) {
  .braincell-spark {
    display: none;
  }
}


/* The entry QR covers the view, never the saved painting. */
[hidden] { display: none !important; }
#entry-qr, #entry-login, #entry-message, #entry-retry { display: none; }
body.guest #painting-code, body.guest #start-fresh,
body.guest #painting > canvas, body.guest #progress,
body.guest #decisions > .decisions, body.guest #hint-field,
body.guest #band > :not(#entry-message):not(#entry-retry):not(#decisions) { display: none !important; }
body.guest #entry-qr {
  display: grid; place-items: center; position: absolute; inset: 0;
  width: 100%; height: 100%; padding: 0; background: white; color: #202019;
  opacity: 1;
}
#entry-canvas { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
body.guest #studio { justify-content: center; }
body.guest #band:has(#entry-retry[hidden]) { display: none; }
body.guest #decisions { height: 48px; }
body.guest #entry-login {
  display: block; width: 100%; height: 100%; padding: 0;
  border: 1px solid var(--ink); background: var(--ink); color: var(--background);
  font-size: clamp(24px, 6vw, 32px); font-weight: 600;
}
body.guest #entry-message { display: block; padding: 8px 12px; font-size: 13px; }
body.guest #entry-retry:not([hidden]) { display: block; margin-left: auto; }

.signin-page { overflow: auto; height: auto; min-height: 100svh; padding: 0; }
.signin-page main { width: min(100%, 28rem); margin: 0 auto; padding: max(32px, env(safe-area-inset-top)) 24px 48px; }
.signin-page h1 { font-size: clamp(30px, 8vw, 42px); line-height: 1.1; margin: 28px 0 20px; }
.signin-page form, #wallet-step { display: grid; gap: 12px; margin-top: 28px; }
.signin-page input { width: 100%; min-height: 52px; font-size: 20px; border-radius: 0; }
.signin-page button { margin: 0; width: 100%; min-height: 52px; border: 1px solid var(--ink); font-size: 18px; }
.signin-page .phone-primary { background: var(--ink); color: var(--background); font-weight: 600; }
.signin-page .phone-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 85%, var(--background)); }
.signin-page .handle-input { display: flex; align-items: center; gap: 8px; font-size: 24px; }
.signin-page #phone-handle { margin: 0; font-size: 24px; font-weight: 600; }
.signin-page #phone-balance, .signin-page #payment-methods { margin: 0 0 8px; }
.signin-page #payment-methods { font-size: 14px; }
.signin-page #signin-message:empty { display: none; }
.signin-page #hosted-login { margin-top: 12px; }

.brain-visual { position: relative; display: inline-block; width: 44px; height: 44px; vertical-align: middle; }
.brain-visual > .braincell-logo { position: absolute; inset: 7px; width: 30px; height: 30px; }
.brain-mesh { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.brain-ready > .braincell-logo { visibility: hidden; }
#wallet-toggle { padding: 4px 2px; }
#braincell-balance { opacity: 1; }
/* Braincells are fuel you spend, so they wear a warm amber rather than the
   purple every AI product reaches for: the hue is rotated on the rendered
   brain sprites and logo until they are re-rendered in amber. */
/* The brain has no colour of its own: theme and state set it. The rendered
   sprites and logo are purple at rest, so these variables turn that hue —
   amber by default (fuel you spend), warmer while a move is running, grey
   when the balance is empty, pale when it is nearly so. */
:root { --brain-hue: 125deg; --brain-sat: 1.2; --brain-light: 1.08; --brain-glow: #ffb84d99; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --brain-hue: 115deg; --brain-light: 1.15; }
}
:root[data-theme="dark"] { --brain-hue: 115deg; --brain-light: 1.15; }
.brain-visual, .braincell-logo {
  filter: hue-rotate(var(--brain-hue)) saturate(var(--brain-sat)) brightness(var(--brain-light));
  transition: filter 400ms ease;
}
#braincell-balance[data-pending] { --brain-hue: 150deg; --brain-sat: 1.5; --brain-light: 1.2; }
#braincell-balance[data-pending] .brain-visual {
  filter: hue-rotate(var(--brain-hue)) saturate(var(--brain-sat)) brightness(var(--brain-light)) drop-shadow(0 0 5px var(--brain-glow));
}
#braincell-balance[data-level="low"] { --brain-sat: 0.55; --brain-light: 1; }
#braincell-balance[data-level="empty"] { --brain-sat: 0; --brain-light: 0.7; }
/* And the painting's phase (set on <html> by the workspace theme): the brain
   glows while a move renders and cools when something needs attention. */
:root[data-phase="rendering"] #braincell-balance { --brain-light: 1.3; }
:root[data-phase="stale"] #braincell-balance, :root[data-phase="interrupted"] #braincell-balance { --brain-hue: 60deg; --brain-sat: 0.9; }

/* Painting size: the current size is pressed in; another size continues the
   picture as a new painting at that size (game.resize). */
#painting-size { border: 0; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#painting-size legend { font-size: 13px; opacity: .7; margin-bottom: 6px; }
#painting-size button { border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius: 6px; padding: 8px 0; font: 600 14px ui-monospace, monospace; }
#painting-size button[aria-pressed="true"] { background: var(--ink); color: var(--background); border-color: var(--ink); }
#painting-size button:disabled { opacity: .45; }
#painting-size-note { grid-column: 1 / -1; margin: 4px 0 0; font-size: 12px; opacity: .7; min-height: 1.2em; }

/* Corner labels in mime.ac's voice — the same rules as its feed cards: the
   code top-left like mime's `.reel-command .media-label`, the handle like its
   `.name`. Comic Relief Bold, a dark stroke painted under the fill, and the
   pink-purple-cyan offset, over a soft drop shadow on the container. */
#corner { top: calc(4px + env(safe-area-inset-top)); left: 14px; gap: 14px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
#painting-code { padding: 0; background: none; font: inherit; }
#painting-code .painting-number, #painting > #account-toggle .status-handle {
  display: inline; font: 700 20px/1.3 "Comic Relief", "Comic Sans MS", cursive; color: #fff;
  -webkit-text-stroke: .6px #141414; paint-order: stroke fill;
  text-shadow: .75px .75px #ed629d, 1px 1px #a478df, 2px 2px #55cdd9;
}
#painting-code[data-sync="error"] { text-decoration-color: #ed629d; }
/* The handle as a watermark: bottom-left of the picture, the corner the
   signature burns into (signature.mjs), still the account button. */
#painting > #account-toggle {
  position: absolute;
  left: 14px;
  bottom: 8px;
  z-index: 4;
  max-width: 70%;
  padding: 0;
  background: none;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
#painting > #account-toggle:hover .status-handle { color: #ffe7f3; }

/* In the Mac app the window has macOS's rounded bottom corners (about 16px on
   Tahoe). The bar follows that curve instead of being clipped by it: its own
   bottom corners round, and the buttons at either end tuck inside them. */
.native #band { border-radius: 0 0 16px 16px; overflow: hidden; padding: 0 8px; }
.native #band > :first-child { border-bottom-left-radius: 16px; }
.native #band > :last-child { border-bottom-right-radius: 16px; }
/* Nothing with an edge sits in the curve: the blank and the brain keep an
   inset, so No and Paint are never the thing the corner cuts. */
.native #decisions { padding-left: 8px; }
.native #brain-controls { padding-right: 8px; }

/* Brains list: freshness and arena quality (nopaint-openrouter.mjs signals). */
.model-new { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--background); font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: lowercase; vertical-align: middle; }
.model-elo { margin-left: 8px; font: 600 11px ui-monospace, monospace; color: color-mix(in srgb, var(--ink) 60%, var(--background)); vertical-align: middle; }
