:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #151a18;
  color: #f5f1e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgb(21 26 24 / 0.82), #151a18),
    linear-gradient(90deg, rgb(245 241 232 / 0.035) 1px, transparent 1px),
    linear-gradient(rgb(245 241 232 / 0.035) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

button,
input {
  font: inherit;
}

button,
a {
  color: inherit;
}

button {
  min-height: 38px;
  border: 1px solid rgb(245 241 232 / 0.16);
  border-radius: 6px;
  background: #26342f;
  cursor: pointer;
}

button:hover,
button.active {
  background: #3d554b;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input {
  min-height: 38px;
  min-width: 0;
  border: 1px solid rgb(245 241 232 / 0.16);
  border-radius: 6px;
  color: #f5f1e8;
  background: #101512;
}

label {
  display: grid;
  gap: 6px;
}

label span,
.panel-section h2 {
  color: #d8d5ca;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* The hand-rolled .topbar that used to sit here was replaced by the shared site
   chrome on 2026-07-29 (shared/site/chrome.js). Its rules are deleted rather than
   left behind: bare `nav {}` / `.brand {}` selectors leak straight into the shared
   header and footer this page now renders. See docs/site-chrome.md. */


.profile-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 24px;
}

.account-panel,
.editor-panel {
  min-width: 0;
  border: 1px solid rgb(245 241 232 / 0.12);
  border-radius: 8px;
  background: rgb(24 31 28 / 0.92);
}

.account-panel {
  align-self: start;
  display: grid;
  gap: 1px;
  overflow: hidden;
}

.panel-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: rgb(16 21 18 / 0.55);
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 30px;
}

.button-row,
.segmented,
.tool-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-row button,
.segmented button,
.tool-button {
  padding: 0 12px;
  font-weight: 800;
}

.status-line {
  min-height: 20px;
  margin: 0;
  color: #b8c2b8;
  font-size: 13px;
}

.preview-section canvas {
  width: 100%;
  aspect-ratio: 1;
  image-rendering: pixelated;
  border: 1px solid rgb(245 241 232 / 0.12);
  border-radius: 6px;
  background:
    linear-gradient(45deg, #1f2925 25%, transparent 25%),
    linear-gradient(-45deg, #1f2925 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1f2925 75%),
    linear-gradient(-45deg, transparent 75%, #1f2925 75%),
    #141a17;
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.editor-panel {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  overflow: hidden;
}

.editor-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto 120px 100px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-bottom: 1px solid rgb(245 241 232 / 0.12);
}

.animation-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.animation-tabs button {
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.color-control input {
  width: 54px;
  padding: 3px;
}

.hex-control input {
  width: 112px;
  padding: 0 10px;
  text-transform: uppercase;
}

.brush-control input {
  width: 110px;
}

.mirror-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.mirror-control input {
  min-height: auto;
}

.canvas-wrap {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  background: #0f1512;
}

#editorCanvas {
  width: min(100%, 680px);
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
  border: 1px solid rgb(245 241 232 / 0.22);
  border-radius: 6px;
  background: #111713;
  cursor: crosshair;
}

.frame-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgb(245 241 232 / 0.12);
}

.frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.frames {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.frame-thumb {
  display: grid;
  gap: 4px;
  min-width: 76px;
  padding: 6px;
  border: 1px solid rgb(245 241 232 / 0.12);
  border-radius: 6px;
  background: #101512;
}

.frame-thumb.active {
  border-color: #f6d74f;
}

.frame-thumb canvas {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  background: #1d2622;
}

.frame-thumb span {
  color: #cbd2c7;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 980px) {
  .profile-shell {
    grid-template-columns: 1fr;
  }

  .editor-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .animation-tabs {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .editor-toolbar {
    grid-template-columns: 1fr;
  }

  .animation-tabs {
    grid-template-columns: 1fr;
  }

  .frame-header {
    align-items: start;
    flex-direction: column;
  }
}
