:root {
  --bg: #121418;
  --steel: #1c2026;
  --brass: #c4a574;
  --brass-2: #8a6a3e;
  --cyan: #3ecfff;
  --ink: #efe6d8;
  --dim: #9a9184;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #0c0d10;
}
a { color: var(--cyan); text-decoration: none; }
.machine {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(900px 500px at 50% -10%, #2a241c 0%, transparent 55%),
    repeating-linear-gradient(90deg, #121418 0 3px, #16181c 3px 6px);
  border: 10px solid #2a241c;
  box-shadow: inset 0 0 0 2px var(--brass-2), inset 0 0 80px #000a;
  position: relative;
  overflow-x: hidden;
}
.rail {
  position: absolute; pointer-events: none;
}
.rail svg { display: block; }
.rail.top { top: 0; left: 0; right: 0; height: 72px; }
.rail.bottom { bottom: 0; left: 0; right: 0; height: 56px; }
.rail.left { top: 72px; bottom: 56px; left: 0; width: 56px; }
.rail.right { top: 72px; bottom: 56px; right: 0; width: 56px; }
.gear {
  transform-origin: 50% 50%;
  animation: spin 12s linear infinite;
}
.gear.rev { animation-direction: reverse; animation-duration: 16s; }
.gear.slow { animation-duration: 22s; }
@keyframes spin { to { transform: rotate(360deg); } }
.piston {
  animation: pump 1.8s ease-in-out infinite;
}
@keyframes pump {
  50% { transform: translateY(10px); }
}
.needle { transform-origin: 50% 100%; animation: sweep 4s ease-in-out infinite; }
@keyframes sweep {
  0%, 100% { transform: rotate(-28deg); }
  50% { transform: rotate(26deg); }
}
.steam { animation: steam 2.4s ease-in-out infinite; }
.puff { animation: puff 2.8s ease-out infinite; }
.fly { animation: spin 4.5s linear infinite; transform-origin: 0 0; }
@keyframes steam {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-14px); opacity: 0.05; }
}
@keyframes puff {
  0% { transform: translateY(0) scale(0.6); opacity: 0.5; }
  70% { transform: translateY(-22px) scale(1.2); opacity: 0.12; }
  100% { transform: translateY(-28px) scale(1.4); opacity: 0; }
}
.belt { animation: belt 1.2s linear infinite; }
@keyframes belt {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 16; }
}
body.machine-still .gear,
body.machine-still .piston,
body.machine-still .needle,
body.machine-still .steam,
body.machine-still .fly,
body.machine-still .puff { animation-play-state: paused; }
.machine-toggle {
  background: #2a241c; color: var(--brass); border: 1px solid var(--brass-2);
  border-radius: 999px; padding: 4px 10px; cursor: pointer; font: inherit;
  letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem;
}
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mast {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 72px;
  padding: 8px 72px;
  background: linear-gradient(#3a342c, #221c16);
  border-bottom: 2px solid #d4b06a;
  box-shadow: 0 2px 0 #8a5a28, inset 0 1px 0 #c4a57455;
}
.mast img.word {
  height: 52px;
  width: min(20rem, 56vw);
  object-fit: cover;
  object-position: center 48%;
  letter-spacing: 0.18em;
  padding: 0;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #d4b06a88;
}
.mast-line {
  margin: 0 auto 0 8px;
  font-family: Cinzel, Palatino, serif;
  color: var(--brass);
  letter-spacing: 0.1em;
  font-size: 0.95rem;
  white-space: nowrap;
}
.mast nav {
  display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap;
  justify-content: flex-end;
  letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.92rem;
  font-weight: 700;
  max-width: 100%;
}
.mast nav a { color: #f2e6c8; text-shadow: 0 1px 0 #1a1612, 0 0 8px #000; }
.mast nav a:hover { color: var(--cyan); }
.viewport {
  position: relative; z-index: 2;
  margin: 12px 72px 12px;
  padding: 22px;
  min-height: 0;
  background: linear-gradient(#2a2e36f2, #1a1e24f5);
  border: 1px solid var(--brass-2);
  border-radius: 16px;
  box-shadow: 0 20px 50px #0008, inset 0 1px 0 #c4a57455;
  overflow: auto;
}
.kicker {
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--dim); font-size: 0.75rem;
}
h1 { font-family: Cinzel, Palatino, serif; font-weight: 600; margin: 0 0 4px; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.lede { max-width: 62ch; color: var(--dim); margin: 0 0 10px; }
.hs-nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
a.back-game {
  display: inline-block;
  background: var(--brass);
  color: #1c1612 !important;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.grid.teasers {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .grid.teasers { grid-template-columns: 1fr; }
}
.grid.cat-ten {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.grid.cat-ten .card-wrap { min-width: 0; }
.grid.cat-ten .card { min-height: 160px; }
@media (max-width: 1100px) {
  .grid.cat-ten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cat-stage { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }
.grid.cat-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 0;
}
.grid.cat-six .card-wrap { min-width: 0; }
.grid.cat-six .card { min-height: 280px; }
.grid.cat-six .card .art { min-height: 168px; }
@media (max-width: 820px) {
  .grid.cat-six { grid-template-columns: 1fr; }
}
.cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 12px 0 8px;
}
@media (max-width: 1100px) {
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cat-door {
  display: block;
  padding: 28px 22px;
  min-height: 20rem;
  border: 2px solid #d4b06a;
  border-radius: 12px;
  background: linear-gradient(#2a241c, #16120e);
  background-size: cover;
  background-position: center;
  color: inherit;
  text-decoration: none;
  box-shadow: inset 0 0 24px #0004, 0 8px 0 #3a2410;
}
.cat-door h3 {
  margin: 0 0 6px;
  font-family: Cinzel, Palatino, serif;
  color: #f4ead0;
  font-size: 1.45rem;
  text-shadow: 0 2px 10px #000, 0 0 12px #000c;
}
.cat-door p {
  margin: 0;
  color: #efe6d8;
  text-shadow: 0 1px 8px #000e;
}
.cat-door { position: relative; overflow: hidden; }
.cat-door.soon {
  border-color: #3a3428;
  box-shadow: inset 0 0 40px #000a;
  filter: grayscale(0.25) brightness(0.62);
}
.cat-door.soon h3 { color: var(--brass); }
.cat-door.soon p { color: var(--dim); }
.cat-cog {
  position: absolute; right: 14px; top: 14px; width: 28px; height: 28px;
  border: 3px solid #c4a574aa; border-radius: 50%;
  box-shadow: 0 0 0 4px #8a6a3e55, inset 0 0 0 6px #1a1612;
  animation: spin 8s linear infinite;
}
.cat-count {
  display: inline-block; margin-top: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.72rem; color: #f0d48a;
  text-shadow: 0 1px 6px #000;
}
.cat-door.soon .cat-count { color: var(--brass); }
.cat-door::after {
  content: "";
  position: absolute; inset: auto 18% -8px 18%; height: 18px;
  background: radial-gradient(circle, #efe6d855, transparent 70%);
  animation: puff 3.2s ease-out infinite;
}
.wing-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1; opacity: 0.85;
}
.wing-hero {
  position: relative; z-index: 2;
  min-height: 12rem; border-radius: 16px; overflow: hidden;
  background: #1a1612 center/cover no-repeat;
  border: 1px solid var(--brass-2);
  margin-bottom: 14px;
  box-shadow: inset 0 0 60px #0008, 0 12px 40px #0006;
}
.wing-plaque {
  padding: 22px 24px 18px;
  max-width: 40rem;
}
.wing-tick {
  display: inline-block; margin-top: 8px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--brass); font-size: 0.72rem;
  animation: tickflash 1s steps(2, end) infinite;
}
@keyframes tickflash {
  50% { opacity: 0.25; }
}
body.wing-box .viewport { box-shadow: 0 20px 50px #0008, inset 0 0 40px #c4a57422; }
body.wing-words .viewport { box-shadow: 0 20px 50px #0008, inset 0 0 40px #3ecfff22; }
body.wing-worlds .viewport { box-shadow: 0 20px 50px #0008, inset 0 0 40px #4a8a3822; }
body.wing-midway .viewport { box-shadow: 0 20px 50px #0008, inset 0 0 40px #c45a3822; }
.medal-rack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 16px 0 28px;
}
.medal-rack .medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #1a1612;
  border: 1px solid #3a3428;
  border-radius: 12px;
  padding: 14px 10px 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--dim);
}
.medal-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.medal-rack .medal.on { border-color: var(--brass); color: var(--ink); }
.medal-face {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1612;
  box-shadow: 0 6px 0 #1a1410, 0 0 0 3px #8a6a3e;
  display: block;
}
.medal.off .medal-face {
  filter: grayscale(1) brightness(0.45);
  box-shadow: none;
  opacity: 0.7;
}
.medal-title { letter-spacing: 0.04em; }
body.machine-still .cat-cog,
body.machine-still .wing-tick,
body.machine-still .cat-door::after { animation-play-state: paused; }
@media (max-width: 800px) {
  .grid.teasers { grid-template-columns: 1fr; }
  .cats { grid-template-columns: 1fr; }
}
.card {
  display: flex; flex-direction: column;
  min-height: 220px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid #3a3428;
  background: #16181c;
  color: inherit;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--brass); }
.card .art {
  flex: 1; min-height: 120px;
  background: #2a241c center/cover no-repeat;
}
.card:not(.locked) .art {
  filter: saturate(1.08) brightness(1.06);
}
.card .meta, .card-wrap > .meta { padding: 12px 14px 14px; }
.card .meta h3, .card-wrap > .meta h3 { margin: 0; font-family: Cinzel, Palatino, serif; color: var(--brass); }
.card .meta p, .card-wrap > .meta p { margin: 4px 0 0; color: var(--dim); font-size: 0.9rem; }
.card.locked { filter: grayscale(0.4); opacity: 0.72; }
.card.locked::after {
  content: "Coming online";
  position: absolute; top: 12px; right: 12px;
  font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid #3ecfff55; padding: 2px 6px; border-radius: 999px;
  background: #0008;
}
.foot {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  padding: 8px 72px; color: var(--dim); font-size: 0.8rem; letter-spacing: 0.08em;
}
.account {
  display: flex; gap: 8px; align-items: center;
}
.account input {
  background: #121418; color: var(--ink); border: 1px solid var(--brass-2);
  border-radius: 6px; padding: 4px 8px;
}
.account button {
  background: #2a241c; color: var(--brass); border: 1px solid var(--brass-2);
  border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
.pref-row {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 10px 0 16px; color: var(--dim); cursor: pointer; max-width: 36rem;
}
.pref-row input { margin-top: 3px; accent-color: var(--cyan); }
.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 16px 0 24px;
}
.auth-card {
  border: 1px solid var(--brass-2);
  border-radius: 10px;
  padding: 14px 16px;
  background: #1a1612aa;
}
.auth-card h2, .auth-card h3 { color: var(--brass); margin: 0 0 8px; }
.auth-card label, #cms label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
  color: var(--dim);
  font-size: 0.85rem;
}
#cms textarea {
  font: inherit;
  background: #121418;
  color: var(--ink);
  border: 1px solid var(--brass-2);
  border-radius: 6px;
  padding: 8px;
  width: 100%;
  min-height: 6rem;
}
.auth-card input, .auth-card select {
  background: #121418;
  color: var(--ink);
  border: 1px solid var(--brass-2);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
}
#eqx-cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  background: #1a1612ee;
  border: 1px solid var(--brass-2);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--ink);
  max-width: 42rem;
  margin: 0 auto;
}
#eqx-cookie p { margin: 0 0 8px; font-size: 0.85rem; color: var(--dim); }
#eqx-cookie button {
  background: #2a241c; color: var(--brass); border: 1px solid var(--brass-2);
  border-radius: 6px; padding: 6px 12px; cursor: pointer; margin-right: 6px;
}
.acc-layout {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 18px;
  align-items: start;
}
.acc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 8px;
}
.acc-who { margin: 0 0 8px; color: var(--brass); }
.acc-nav button {
  text-align: left;
  background: transparent;
  color: var(--dim);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
}
.acc-nav button.on, .acc-nav button:hover {
  color: var(--brass);
  border-color: var(--brass-2);
  background: #c4a57414;
}
.acc-panel { display: none; }
.acc-panel.on { display: block; }
.gdpr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.gdpr-card {
  border: 1px solid var(--brass-2);
  border-radius: 10px;
  padding: 16px 18px;
  background: #121418aa;
}
.gdpr-card h2 { color: var(--brass); margin: 0 0 8px; font-size: 1rem; }
.gdpr-field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; color: var(--dim); }
.gdpr-field input {
  background: #121418; color: var(--ink); border: 1px solid var(--brass-2);
  border-radius: 6px; padding: 8px 10px; font: inherit; max-width: 16rem;
}
@media (max-width: 800px) {
  .acc-layout, .gdpr-grid { grid-template-columns: 1fr; }
  .acc-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}
.acc-section {
  border: 1px solid var(--brass-2);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
  background: #1a1612aa;
}
.acc-section h2 {
  color: var(--brass);
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}
.oauth-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.oauth-btn {
  display: inline-block;
  background: #2a241c;
  color: var(--brass);
  border: 1px solid var(--brass-2);
  border-radius: 6px;
  padding: 6px 12px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.oauth-btn.dim { opacity: 0.55; cursor: not-allowed; }
.auth-card button {
  background: #2a241c;
  color: var(--brass);
  border: 1px solid var(--brass-2);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}
table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #2a2e36; }
th { color: var(--brass); letter-spacing: 0.12em; font-size: 0.75rem; text-transform: uppercase; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button {
  background: transparent; color: var(--brass); border: 1px solid var(--brass-2);
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.tabs button.on { background: #c4a57422; color: var(--cyan); border-color: var(--cyan); }
.soon {
  min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(circle at 50% 20%, #2a241c, #0c0d10 70%);
}
.soon img { width: 88px; border-radius: 18px; }
.ad-slot {
  margin: 16px 0;
  text-align: center;
}
.ad-slot.collapsed,
.ad-slot[hidden],
.ad-slot[data-ad-state="collapsed"] {
  display: none !important;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.ad-slot.placeholder {
  display: grid;
  place-items: center;
  min-height: 88px;
  border: 1px dashed #8a6a3e88;
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: #12141888;
  border-radius: 8px;
}
.wing-title {
  font-family: Cinzel, Palatino, serif;
  color: var(--brass);
  letter-spacing: 0.12em;
  margin: 18px 0 8px;
  font-size: 1.1rem;
}
.wing { margin: 16px 0 8px; border: 1px solid #8a6a3e55; border-radius: 10px; padding: 8px 12px; }
.wing summary { cursor: pointer; color: var(--brass); letter-spacing: 0.08em; font-weight: 600; }
.card-wrap { display: flex; flex-direction: column; gap: 6px; }
.card-wrap .scores {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass);
}
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.card-about { margin: 2px 0 6px; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); display: inline-block; }
.medal { position: relative; }
.medal-art { position: relative; display: inline-block; }
.medal-rank {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c4a574ee;
  color: #1c1612;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0 0.35rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #1c1612aa;
  pointer-events: none;
}
.medal-zoom {
  border: 1px solid var(--brass-2);
  border-radius: 16px;
  background: #16120e;
  color: var(--ink);
  padding: 20px 24px 16px;
  max-width: min(92vw, 28rem);
  text-align: center;
}
.medal-zoom::backdrop { background: #000a; }
.medal-zoom img {
  width: min(72vw, 22rem);
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto 10px;
}
.medal-zoom-title { margin: 0 0 4px; letter-spacing: 0.08em; }
.medal-zoom-mark {
  margin: 0 0 12px;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}
.avatar-rack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 18px;
}
.avatar-pick {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid #3a3428;
  border-radius: 50%;
  background: #1a1612;
  cursor: pointer;
  overflow: hidden;
}
.avatar-pick.on { border-color: var(--brass); box-shadow: 0 0 0 2px #c4a57455; }
.avatar-pick img { width: 100%; height: 100%; display: block; }
.avatar-face { width: 28px; height: 28px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.rel-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: start;
  margin: 16px 0 24px;
}
.rel-col select {
  width: 100%;
  min-height: 22rem;
  background: #1a1612;
  color: var(--ink);
  border: 1px solid var(--brass-2);
  font: inherit;
}
.rel-col select[multiple] {
  padding: 4px 0;
}
.rel-col select option {
  padding: 4px 10px;
}
.rel-col select option:checked {
  background: #c4a574 linear-gradient(0deg, #c4a574 0%, #c4a574 100%);
  color: #1c1612;
}
.rel-arrows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 2.2rem;
}
.rel-arrows button {
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.2rem;
  background: #2a241c;
  color: var(--brass);
  border: 1px solid var(--brass-2);
  cursor: pointer;
}
@media (max-width: 900px) {
  .rel-board { grid-template-columns: 1fr; }
  .rel-arrows { flex-direction: row; padding-top: 0; }
}
.user-games { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.user-chip { font-size: 0.85rem; color: var(--ink); }
.about-game .about-hero {
  width: min(100%, 42rem);
  max-height: 280px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--brass-2);
  display: block;
  margin: 8px 0 16px;
}
.cms-prose { line-height: 1.55; max-width: 42rem; }
.cms-prose p { margin: 0 0 12px; }
.cms-prose h2 { color: var(--brass); font-size: 1.1rem; }
.about-row { margin-top: 18px; }
.cms-layout { display: grid; grid-template-columns: 12rem 1fr; gap: 18px; align-items: start; }
.cms-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 8px; }
.cms-nav button {
  text-align: left; background: transparent; color: var(--dim);
  border: 1px solid transparent; border-radius: 8px; padding: 8px 10px;
  cursor: pointer; font: inherit;
}
.cms-nav button.on, .cms-nav button:hover {
  color: var(--brass); border-color: var(--brass-2); background: #c4a57414;
}
.cms-panel { display: none; }
.cms-panel.on { display: block; }
.cms-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 12px; }
.cms-card {
  border: 1px solid var(--brass-2); border-radius: 10px; padding: 14px 16px; background: #1a1612aa;
}
.cms-card h3 { margin: 0 0 6px; color: var(--brass); font-size: 0.95rem; }
.cms-field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; color: var(--dim); }
.cms-field input, .cms-field textarea, .cms-field select {
  background: #121418; color: var(--ink); border: 1px solid var(--brass-2);
  border-radius: 6px; padding: 8px 10px; font: inherit;
}
.cms-field textarea { min-height: 6rem; }
.cms-char { font-size: 0.75rem; color: var(--dim); }
.cms-char.warn { color: #e0a060; }
.cms-tree { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; line-height: 1.45; }
.cms-tree .hid { color: #9a5555; text-decoration: line-through; }
.cms-preview {
  background: #0c0d10; border: 1px solid var(--brass-2); border-radius: 8px;
  padding: 12px; white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem; color: var(--ink); max-height: 22rem; overflow: auto;
}
.cms-list { display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow: auto; }
.cms-list button { text-align: left; }
.tox-tinymce { border-radius: 8px !important; }
@media (max-width: 800px) {
  .cms-layout { grid-template-columns: 1fr; }
  .cms-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}
.hof-desk {
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 8px;
}
.hof-keys-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}
.hof-keys button {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  text-align: left;
  background: linear-gradient(#3a3228, #241c16);
  border: 2px solid var(--brass-2);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #c4a57444, 0 3px 0 #120e0a;
}
.hof-keys button.on {
  background: linear-gradient(#c4a574, #8a6a3e);
  color: #1c1612;
  font-weight: 700;
}
.hof-screen {
  background: #0a120e;
  border: 8px solid #2a241c;
  box-shadow: inset 0 0 0 2px #3a6a4a, inset 0 0 36px #000a;
  border-radius: 6px;
  padding: 12px 14px 16px;
  min-height: 22rem;
}
.hof-screen-head {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: #8fdf9a;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  margin-bottom: 10px;
  border-bottom: 1px solid #2a5a38;
  padding-bottom: 6px;
}
.hof-dials { margin-bottom: 8px; }
.hof-print {
  width: 100%;
  border-collapse: collapse;
  color: #e4f6e8;
  font-size: 1.02rem;
}
.hof-print th {
  color: #8fdf9a;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  padding: 8px 8px 6px;
  border-bottom: 1px solid #2a5a38;
}
.hof-print td {
  padding: 8px;
  border-bottom: 1px solid #163022;
}
html[data-eqx-look="day"] .hof-screen {
  background: #e8f0e4;
  box-shadow: inset 0 0 0 2px #6a8a6a, inset 0 0 20px #fff6;
}
html[data-eqx-look="day"] .hof-screen-head,
html[data-eqx-look="day"] .hof-print th { color: #1a4a28; }
html[data-eqx-look="day"] .hof-print { color: #142018; }
html[data-eqx-look="day"] .hof-print td { border-bottom-color: #c0d4c4; }
@media (max-width: 800px) {
  .hof-desk { grid-template-columns: 1fr; }
  .hof-keys button { display: inline-block; width: auto; margin: 0 8px 8px 0; }
}
.wall-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.wall-strip a, .wall-strip button {
  background: #2a241c; color: var(--brass); border: 1px solid var(--brass-2);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit;
}
.wall-strip a.on, .wall-strip button.on { color: var(--cyan); border-color: var(--cyan); }
.stage-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.stage-pick input[type="number"] {
  width: 4.2rem;
  text-align: center;
  background: #121418;
  color: var(--ink);
  border: 1px solid var(--brass-2);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  -moz-appearance: textfield;
}
.stage-pick input[type="number"]::-webkit-outer-spin-button,
.stage-pick input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stage-pick button {
  background: #2a241c;
  color: var(--brass);
  border: 1px solid var(--brass-2);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
}
.stage-pick button.on { color: var(--cyan); border-color: var(--cyan); }
.stats-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; }
.stats-table th, .stats-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #3a3428; }
.stats-table th { color: var(--brass); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
@media (max-width: 800px) {
  .mast, .foot, .viewport { padding-left: 18px; padding-right: 18px; margin-left: 8px; margin-right: 8px; }
  .rail.left, .rail.right { display: none; }
}
