/* PIX37 site theme. Dark stays the default; light is opt-in per browser. */

.pix37-theme-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.42rem 0.6rem;
  font: 600 0.68rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffb000;
  background: rgba(20, 20, 28, 0.94);
  border: 1px solid #2a2a36;
  border-left: 3px solid #ffb000;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.pix37-theme-toggle:hover {
  background: #1a1a24;
}

.pix37-theme-toggle:focus-visible {
  outline: 2px solid #ffb000;
  outline-offset: 2px;
}

.pix37-theme-toggle svg {
  display: block;
  width: 14px;
  height: 14px;
}

.itch-embeds {
  display: grid;
  justify-items: start;
  gap: 0.85rem;
  margin: 2.5rem 0 0;
}

.itch-embeds iframe {
  display: block;
  width: 100%;
  max-width: 552px;
  height: 167px;
  border: 0;
  background: #0b0b10;
}

.itch-embeds iframe.itch-play {
  max-width: 100%;
  height: auto;
  aspect-ratio: 1024 / 1044;
}

html[data-theme="light"] {
  color-scheme: light;
  background: #f5f2e9;
}

html[data-theme="light"] body {
  background: #f5f2e9;
  color: #24222a;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] th,
html[data-theme="light"] #manual h3 {
  color: #9a5a00;
}

html[data-theme="light"] h3,
html[data-theme="light"] h4 {
  color: #24222a;
}

html[data-theme="light"] a {
  color: #0b5f96;
}

html[data-theme="light"] p.lead,
html[data-theme="light"] .lead,
html[data-theme="light"] .sig,
html[data-theme="light"] .fig p {
  color: #5f5a52;
}

html[data-theme="light"] code {
  color: #1f1d23;
}

html[data-theme="light"] p code,
html[data-theme="light"] li code,
html[data-theme="light"] td code {
  color: #7a4a00;
}

html[data-theme="light"] pre {
  color: #1f1d23;
  background: #fffdf7;
  border-color: #d9d1c0;
}

html[data-theme="light"] th,
html[data-theme="light"] td {
  border-color: #d9d1c0;
}

html[data-theme="light"] .fig {
  background: #fffdf7;
  border-color: #d9d1c0;
}

html[data-theme="light"] footer,
html[data-theme="light"] .lang,
html[data-theme="light"] .nav,
html[data-theme="light"] nav.langs {
  color: #6a655c;
}

html[data-theme="light"] footer {
  border-top-color: #d9d1c0;
}

html[data-theme="light"] nav.langs a {
  color: #0b5f96;
}

html[data-theme="light"] nav.langs span {
  color: #9a5a00;
}

html[data-theme="light"] p.mt-note {
  color: #7a4a00;
  background: #fff1c9;
}

html[data-theme="light"] .box {
  background: #fffdf7;
  border-color: #d9d1c0;
  border-left-color: #b26b00;
}

html[data-theme="light"] a.card {
  color: #24222a;
  background: #fffdf7;
  border-top-color: #d9d1c0;
  border-right-color: #d9d1c0;
  border-bottom-color: #d9d1c0;
}

html[data-theme="light"] a.card:hover {
  background: #f2ece0;
}

html[data-theme="light"] a.card.x:hover {
  border-color: #191820;
}

html[data-theme="light"] a.card.x {
  border-left-color: #191820;
}

html[data-theme="light"] a.card strong {
  color: #111014;
}

html[data-theme="light"] a.card span {
  color: #5f5a52;
}

html[data-theme="light"] a.x svg path,
html[data-theme="light"] a.tiktok svg path {
  fill: #1c1b20;
}

html[data-theme="light"] form {
  background: #fffdf7;
  border-color: #d9d1c0;
  border-left-color: #b26b00;
}

html[data-theme="light"] label {
  color: #5f5a52;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] button {
  color: #24222a;
  background: #fffdf9;
  border-color: #cfc7b6;
}

html[data-theme="light"] button {
  background: #f1ece0;
  border-left-color: #b26b00;
}

html[data-theme="light"] button:hover {
  background: #e7dfcf;
}

html[data-theme="light"] #status {
  color: #5f5a52;
}

html[data-theme="light"] #status.err {
  color: #b3261e;
}

html[data-theme="light"] ol#rows li {
  background: #fffdf7;
  border-color: #d9d1c0;
  border-left-color: #0b5f96;
}

html[data-theme="light"] .title {
  color: #111014;
}

html[data-theme="light"] .meta {
  color: #5f5a52;
}

html[data-theme="light"] code.hash {
  color: #9a5a00;
}

html[data-theme="light"] .pill {
  color: #5f5a52;
  border-color: #cfc7b6;
}

html[data-theme="light"] .pix37-theme-toggle {
  color: #7a4a00;
  background: rgba(255, 253, 247, 0.96);
  border-color: #cfc7b6;
  border-left-color: #b26b00;
  box-shadow: 0 6px 20px rgba(80, 60, 20, 0.18);
}

html[data-theme="light"] .pix37-theme-toggle:hover {
  background: #f1ece0;
}

@media print {
  .pix37-theme-toggle {
    display: none !important;
  }
}
