:root {
  --ink: #0b1220;
  --navy: #0d2e57;
  --accent: #4f8fd4;
  --paper: #f7f9fc;
  --muted: #8ea0b8;
  --line: #243041;
  --screen: #07111f;
  --radius: 16px;
  --chrome: 44px;
  --gb-backdrop: radial-gradient(900px 420px at 8% -8%, rgba(79, 143, 212, 0.2), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(13, 46, 87, 0.5), transparent 48%),
    #0b1220;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--gb-backdrop);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--paper);
}

.git-blocks-embed {
  min-height: 70vh;
  background: var(--gb-backdrop);
  background-size: cover;
  background-position: center;
}

.git-blocks-embed.layout-viewport {
  min-height: 100dvh;
  min-height: 100vh;
}

.git-blocks-embed .page {
  width: 100%;
  height: 100%;
  min-height: inherit;
}

body {
  min-height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
}

.page {
  width: 100%;
  height: 100dvh;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.page-kicker,
.page-lead,
.page-note,
.links {
  display: none;
}

.page h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.player {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(21, 32, 51, 0.78), rgba(13, 21, 34, 0.82) 70%);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.player-chrome {
  flex: 0 0 var(--chrome);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  background: rgba(7, 17, 31, 0.88);
  border-bottom: 1px solid var(--line);
}

.traffic {
  display: flex;
  gap: 6px;
}

.traffic span {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: #3d8b6e;
}

.traffic span:nth-child(1) { background: #d45d5d; }
.traffic span:nth-child(2) { background: #e7c35a; }

.player-title {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.player-screen {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(200px, 280px);
  gap: 0;
  padding: 0;
  position: relative;
}

.board-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(168px, 220px);
  border-right: 1px solid var(--line);
}

.player.is-customizing .board-wrap {
  pointer-events: none;
}

.board-wrap {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(79, 143, 212, 0.12), transparent 55%),
    rgba(7, 17, 31, 0.42);
  border-right: 1px solid rgba(36, 48, 65, 0.85);
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  /* Shift board slightly left for quest rail breathing room */
  transform: translateX(-6px);
}

.quest-rail {
  min-height: 0;
  overflow: auto;
  padding: 12px 10px;
  background:
    linear-gradient(180deg, rgba(28, 22, 12, 0.55), rgba(12, 16, 24, 0.72)),
    rgba(10, 14, 22, 0.9);
  border-left: 1px solid rgba(196, 156, 72, 0.28);
}

.quest-rail.is-pulse .side-quest-card {
  animation: quest-pulse 0.9s ease;
}

@keyframes quest-pulse {
  0% { transform: translateY(6px); opacity: 0.4; box-shadow: 0 0 0 rgba(196, 156, 72, 0); }
  40% { transform: translateY(0); opacity: 1; box-shadow: 0 0 24px rgba(196, 156, 72, 0.35); }
  100% { box-shadow: 0 0 0 rgba(196, 156, 72, 0); }
}

.side-quest-card {
  position: relative;
  border: 1px solid rgba(196, 156, 72, 0.55);
  background:
    linear-gradient(180deg, rgba(48, 36, 18, 0.92), rgba(22, 18, 12, 0.96));
  border-radius: 4px;
  padding: 14px 12px 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 220, 140, 0.08);
}

.side-quest-bang {
  position: absolute;
  top: -10px;
  left: 10px;
  width: 22px;
  height: 28px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #1a1208;
  background: linear-gradient(180deg, #f0d078, #c49c48);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
}

.side-quest-kicker {
  margin: 6px 0 4px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8c56a;
}

.side-quest-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.2;
  color: #fff4d4;
}

.side-quest-meta,
.side-quest-goal {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: #cbb892;
}

.side-quest-tip {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #f3e7c8;
}

.side-quest-tip strong {
  display: block;
  color: #e8c56a;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.side-quest-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  margin-bottom: 8px;
}

.side-quest-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c49c48, #f0d078);
}

.quest-rail-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 24px 8px;
}

.quest-bang-sm {
  width: 28px;
  height: 34px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #1a1208;
  background: linear-gradient(180deg, #f0d078, #c49c48);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
}

.trophy-board {
  display: none !important;
}

.trophy-case {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.trophy-case.is-open,
.trophy-case:not([hidden]) {
  display: flex;
}

.trophy-case[hidden] {
  display: none !important;
}

.trophy-case-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(4, 10, 20, 0.72);
  backdrop-filter: blur(4px);
}

.trophy-case-sheet {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(86vh, 640px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(196, 156, 72, 0.45);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 28, 44, 0.98), rgba(8, 14, 26, 0.96));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.trophy-case-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.trophy-case-head strong {
  display: block;
  font-size: 1rem;
  color: #f0d078;
}

.trophy-case-head p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.trophy-case-body {
  padding: 10px 14px 16px;
  overflow: auto;
  flex: 1;
}

.trophy-board-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.78rem;
}

.trophy-board-head span {
  color: var(--muted);
}

.trophy-section h4 {
  margin: 8px 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.trophy-cell {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--paper);
  border-radius: 8px;
  padding: 10px 6px;
  font-size: 0.68rem;
  line-height: 1.25;
  cursor: default;
  text-align: center;
}

.trophy-cell span {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.trophy-cell em {
  display: block;
  font-style: normal;
  font-weight: 700;
}

.trophy-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
}

.trophy-cell.is-locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.trophy-cell.is-owned {
  border-color: rgba(196, 156, 72, 0.55);
  box-shadow: inset 0 0 0 1px rgba(240, 208, 120, 0.12);
}

.loot-toast {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 6;
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: min(280px, 90%);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(12, 18, 28, 0.92);
  border: 1px solid rgba(196, 156, 72, 0.5);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.loot-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.loot-toast-icon {
  font-size: 1.4rem;
}

.loot-toast strong {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e8c56a;
}

.loot-toast p {
  margin: 2px 0;
  font-size: 0.9rem;
}

.loot-toast em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
}

.player.is-customizing .board-wrap {
  pointer-events: none;
}

canvas[data-board] {
  display: block;
  outline: none;
  max-width: 100%;
  max-height: 100%;
  background: transparent;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 31, 0.78);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.overlay.is-clickable,
.overlay.is-class-select {
  pointer-events: auto;
}

.overlay[hidden] { display: none; }

.overlay h2 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.overlay p {
  margin: 0 0 16px;
  color: #c9d5e4;
}

.overlay-level {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 8px;
}

.side {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  overflow: hidden;
  background: rgba(12, 20, 34, 0.88);
  backdrop-filter: blur(8px);
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex: 0 0 auto;
}

.stat, .tray {
  background: #101a2b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}

.stat span, .tray span, .controls-label {
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat strong {
  font-size: 1.1rem;
  line-height: 1.15;
  color: #e8f0fa;
}

.stats-row.compact .stat strong { font-size: 0.95rem; }

.goal-bar {
  height: 8px;
  border-radius: 99px;
  background: #101a2b;
  border: 1px solid var(--line);
  overflow: hidden;
  flex: 0 0 auto;
}

.goal-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f8fd4, #61dafb);
  transition: width 0.25s ease;
}

.gem-legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  flex: 0 0 auto;
  max-height: 5.5rem;
  overflow: hidden;
}

.gem-legend-item {
  display: grid;
  justify-items: center;
  gap: 1px;
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.gem-legend-item canvas {
  width: 28px;
  height: 28px;
  display: block;
}

.trays,
.concept-note,
.pad {
  display: none;
}

.gb-mini {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gb-mini canvas {
  width: 44px;
  height: 44px;
}

.message {
  margin: 0;
  min-height: 1.2em;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  color: #9fb4ce;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.concept-note {
  display: none;
}

.dev-clouds {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.board-wrap > canvas[data-board],
.board-wrap > .overlay {
  position: relative;
  z-index: 1;
}

.board-wrap > .overlay {
  position: absolute;
  z-index: 2;
}

.page,
.git-blocks-embed .page {
  position: relative;
  z-index: 1;
}

.dev-cloud {
  position: absolute;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: rgba(232, 240, 250, 0.62);
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(79, 143, 212, 0.35);
  will-change: transform;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.dev-cloud[data-lang="css"] { color: rgba(94, 200, 216, 0.55); }
.dev-cloud[data-lang="php"] { color: rgba(139, 124, 224, 0.55); }
.dev-cloud[data-lang="wp"] { color: rgba(79, 143, 212, 0.55); }
.dev-cloud[data-lang="react"] { color: rgba(94, 211, 180, 0.55); }

.pattern-drift .dev-cloud { animation-name: cloud-drift; }
.pattern-rise .dev-cloud { animation-name: cloud-rise; }
.pattern-cross .dev-cloud { animation-name: cloud-cross; }
.pattern-orbit .dev-cloud { animation-name: cloud-orbit; }
.pattern-sway .dev-cloud { animation-name: cloud-sway; }
.pattern-scan .dev-cloud { animation-name: cloud-scan; }

@keyframes cloud-drift {
  from { transform: translate3d(-8vw, 0, 0); }
  to { transform: translate3d(12vw, -2vh, 0); }
}
@keyframes cloud-rise {
  from { transform: translate3d(0, 10vh, 0); }
  to { transform: translate3d(3vw, -14vh, 0); }
}
@keyframes cloud-cross {
  0% { transform: translate3d(-6vw, 4vh, 0); }
  50% { transform: translate3d(8vw, -6vh, 0); }
  100% { transform: translate3d(-4vw, 2vh, 0); }
}
@keyframes cloud-orbit {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(6vw, -5vh, 0) rotate(8deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}
@keyframes cloud-sway {
  0%, 100% { transform: translate3d(-3vw, 0, 0); }
  50% { transform: translate3d(5vw, 3vh, 0); }
}
@keyframes cloud-scan {
  from { transform: translate3d(-10vw, 0, 0) skewX(-4deg); }
  to { transform: translate3d(14vw, 0, 0) skewX(4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .dev-cloud { animation: none !important; }
}

.player-dock {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 0;
}

.controls-label { margin-bottom: 0; }

button,
.button-link {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--navy);
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

button.ghost,
.button-link.ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.pad button {
  padding: 6px 4px;
  min-height: 32px;
}

.pad [data-move="drop"] { grid-column: 1 / -1; }

.pad [data-move="rotate"],
.pad [data-move="rotate-ccw"] {
  background: #16457a;
}

.keys {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.keys kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #101a2b;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--paper);
}

.customize-panel {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow: auto;
  background: rgba(8, 14, 24, 0.97);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 16px 18px;
  color: var(--paper);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.customize-panel[hidden] { display: none !important; }

.customize-head,
.customize-foot,
.row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.customize-foot { margin-top: 12px; justify-content: flex-end; }

.row-actions {
  justify-content: flex-start;
  margin-top: 10px;
}

.row-actions.wrap { flex-wrap: wrap; }

.customize-head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.customize-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.customize-tabs button {
  padding: 7px 12px;
  background: #101a2b;
  border: 1px solid var(--line);
  color: var(--muted);
}

.customize-tabs button.is-active {
  color: var(--paper);
  border-color: var(--accent);
  background: #14345c;
}

.customize-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.customize-pane[hidden] { display: none; }

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #c9d5e4;
}

.field.inline {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.field.checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.field textarea,
.field input[type="url"],
.field input[type="text"],
.field select {
  width: 100%;
  font: inherit;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101a2b;
  color: var(--paper);
  padding: 8px 10px;
  resize: vertical;
}

.bg-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.bg-swatch {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.bg-swatch.is-active { border-color: var(--accent); }

.bg-swatch span {
  position: absolute;
  inset: auto 4px 4px;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.bindings-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.bindings-grid.mouse {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.binding-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.binding-row label { color: #c9d5e4; }

.binding-row button,
.binding-row select {
  min-width: 118px;
  font: inherit;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101a2b;
  color: var(--paper);
  padding: 8px 10px;
}

.binding-row button.listening {
  border-color: var(--accent);
  color: var(--accent);
}

.music-credit,
.share-status {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.stats-row.compact .stat strong { font-size: 0.95rem; }
.sprint-name {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.02em;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-line {
  margin: -2px 0 0;
  font-size: 10px;
  color: var(--pathway-accent, var(--muted));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.hero-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 6px 8px;
  border: 1px solid rgba(79, 143, 212, 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(8, 16, 28, 0.75), rgba(13, 46, 87, 0.35));
  flex: 0 0 auto;
  min-height: 0;
}

.hero-figure {
  position: relative;
  width: 64px;
  height: 68px;
  flex: 0 0 auto;
  display: grid;
  place-items: end center;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.hero-meta strong {
  font-size: 12px;
  line-height: 1.2;
}

.hero-meta span {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-power {
  color: var(--pathway-accent, #e7c35a) !important;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.hero-power-blurb {
  white-space: normal !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  color: #9fb4ce !important;
}

.hero-panel.is-pulsing .chibi {
  filter: brightness(1.2) drop-shadow(0 0 8px var(--pathway-accent, #4f8fd4));
  transform: scale(1.06);
}

/* Cartoon pathway chibis */
.chibi {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 72px;
  transform-origin: 50% 90%;
}

.chibi-svg {
  position: relative;
  z-index: 1;
  overflow: visible;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25));
}

.chibi-shadow {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 34px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  filter: blur(1px);
  z-index: 0;
  animation: chibi-shadow 2.4s ease-in-out infinite;
}

.chibi-sparkle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff6c8;
  box-shadow: 0 0 6px #fff6c8;
  opacity: 0;
  z-index: 2;
  animation: chibi-sparkle 2.8s ease-in-out infinite;
}
.chibi-sparkle.s1 { top: 8px; right: 6px; animation-delay: 0s; }
.chibi-sparkle.s2 { top: 22px; left: 4px; animation-delay: 0.9s; background: var(--card-accent, #61dafb); }
.chibi-sparkle.s3 { bottom: 18px; right: 2px; animation-delay: 1.6s; }

.idle-float .chibi-svg { animation: chibi-float 2.6s ease-in-out infinite; }
.idle-pulse .chibi-svg { animation: chibi-pulse 1.8s ease-in-out infinite; }
.idle-bob .chibi-svg { animation: chibi-bob 2.2s ease-in-out infinite; }
.idle-stride .chibi-svg { animation: chibi-stride 2.4s ease-in-out infinite; }

.chibi-mage .chibi-staff { transform-origin: 53.5px 60px; animation: chibi-staff 2.4s ease-in-out infinite; }
.chibi-mage .chibi-hat { transform-origin: 34px 26px; animation: chibi-hat-tilt 3s ease-in-out infinite; }
.chibi-mage .chibi-cape { transform-origin: 34px 44px; animation: chibi-cape 2.5s ease-in-out infinite; }

.chibi-sentinel .chibi-shield { transform-origin: 15px 45px; animation: chibi-shield 2.2s ease-in-out infinite; }
.chibi-sentinel .chibi-cape { transform-origin: 36px 42px; animation: chibi-cape 2.8s ease-in-out infinite; }

.chibi-artisan .chibi-tool { transform-origin: 51px 56px; animation: chibi-hammer 1.6s ease-in-out infinite; }
.chibi-artisan .chibi-cape { transform-origin: 34px 44px; animation: chibi-cape 2.6s ease-in-out infinite; }

.chibi-ranger .chibi-cape { transform-origin: 34px 42px; animation: chibi-cape 2.1s ease-in-out infinite; }
.chibi-ranger .chibi-spark { animation: chibi-orbit 3s linear infinite; transform-origin: 34px 40px; }

.chibi-classic .chibi-cape { transform-origin: 34px 44px; animation: chibi-cape 2.7s ease-in-out infinite; }

.chibi-eyes { animation: chibi-blink 4.5s step-end infinite; }

@keyframes chibi-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes chibi-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes chibi-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}
@keyframes chibi-stride {
  0%, 100% { transform: translateX(0) rotate(-1deg); }
  25% { transform: translateX(2px) rotate(1deg); }
  50% { transform: translateX(0) rotate(-1deg); }
  75% { transform: translateX(-2px) rotate(1deg); }
}
@keyframes chibi-shadow {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.35; }
  50% { transform: translateX(-50%) scaleX(0.82); opacity: 0.22; }
}
@keyframes chibi-staff {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}
@keyframes chibi-hat-tilt {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg); }
}
@keyframes chibi-cape {
  0%, 100% { transform: scaleX(1) translateY(0); }
  50% { transform: scaleX(1.08) translateY(1px); }
}
@keyframes chibi-shield {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-2px); }
}
@keyframes chibi-hammer {
  0%, 60%, 100% { transform: rotate(-12deg); }
  70% { transform: rotate(18deg); }
  80% { transform: rotate(-8deg); }
}
@keyframes chibi-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes chibi-blink {
  0%, 46%, 48%, 100% { opacity: 1; }
  47% { opacity: 0; }
}
@keyframes chibi-sparkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  40% { opacity: 1; transform: scale(1); }
  70% { opacity: 0; transform: scale(0.6) translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .chibi-svg,
  .chibi-shadow,
  .chibi-sparkle,
  .chibi-mage .chibi-staff,
  .chibi-mage .chibi-hat,
  .chibi-mage .chibi-cape,
  .chibi-sentinel .chibi-shield,
  .chibi-sentinel .chibi-cape,
  .chibi-artisan .chibi-tool,
  .chibi-artisan .chibi-cape,
  .chibi-ranger .chibi-cape,
  .chibi-ranger .chibi-spark,
  .chibi-classic .chibi-cape,
  .chibi-eyes {
    animation: none !important;
  }
}

.mana-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  margin: 0 0 6px;
  flex: 0 0 auto;
}

.mana-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(7, 17, 31, 0.75);
  border: 1px solid rgba(79, 143, 212, 0.35);
  overflow: hidden;
}

.mana-bar [data-mana-fill] {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pathway-secondary, #264de4), var(--pathway-accent, #61dafb));
  transition: width 0.25s ease;
}

[data-cast-power].is-ready {
  border-color: var(--pathway-accent, #e7c35a);
  color: #f0e2a8;
  box-shadow: 0 0 0 1px rgba(231, 195, 90, 0.35);
}

.boss-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 6px;
  font-size: 11px;
  color: #f0a8a8;
  flex: 0 0 auto;
}

.boss-row strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: #ffc9c9;
}

.gem-legend-item.is-affinity {
  outline: 1px solid var(--pathway-accent, #e7c35a);
  outline-offset: 1px;
  border-radius: 8px;
}

.overlay.is-class-select [data-play] {
  display: none !important;
}

.overlay.is-class-select {
  align-items: stretch;
  padding: 12px;
}

.overlay.is-class-select > div {
  width: min(960px, 100%);
  max-height: 100%;
  margin: auto;
  overflow: auto;
  padding: 4px 2px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overlay.is-class-select h2 {
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  margin-bottom: 4px;
}

.overlay.is-class-select > div > p {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.overlay:not(.is-class-select) .class-select {
  display: none !important;
}

.class-select {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
  text-align: left;
  flex: 1 1 auto;
  min-height: 0;
}

.class-classic {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background: linear-gradient(
    160deg,
    rgba(12, 28, 48, 0.96),
    color-mix(in srgb, #4f8fd4 22%, transparent)
  );
  border-width: 1.5px;
}

.class-classic .class-card-figure {
  width: 72px;
  height: 76px;
}

.class-classic .class-card-blurb {
  max-width: 52ch;
}

.class-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--card-accent, #4f8fd4) 55%, transparent);
  background: linear-gradient(160deg, rgba(8, 16, 28, 0.92), color-mix(in srgb, var(--card-accent, #4f8fd4) 18%, transparent));
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  text-align: left;
  min-height: 0;
}

.class-card:hover,
.class-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--card-accent, #4f8fd4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  outline: none;
}

.class-card:hover .chibi-svg,
.class-card:focus-visible .chibi-svg {
  animation-duration: 1.1s;
}

.class-card-figure {
  position: relative;
  width: 68px;
  height: 72px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin: 0;
}

.class-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.class-card strong {
  font-size: 13px;
  line-height: 1.2;
}

.class-card em {
  font-style: normal;
  font-size: 11px;
  color: var(--card-accent, var(--accent));
}

.class-card-blurb {
  font-size: 11px;
  line-height: 1.3;
  color: #c5d3e4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.class-card-power {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.3;
  color: #e7c35a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.class-card-gems {
  margin-top: 2px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  color: #9eb0c5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player[data-pathway="frontend"] .player-chrome {
  border-bottom-color: rgba(97, 218, 251, 0.35);
}
.player[data-pathway="backend"] .player-chrome {
  border-bottom-color: rgba(51, 153, 51, 0.4);
}
.player[data-pathway="wordpress"] .player-chrome {
  border-bottom-color: rgba(33, 117, 155, 0.45);
}
.player[data-pathway="fullstack"] .player-chrome {
  border-bottom-color: rgba(240, 219, 79, 0.35);
}

@media (max-width: 720px) {
  .class-select {
    grid-template-columns: 1fr;
  }
  .class-classic {
    flex-direction: row;
  }
  .hero-panel { max-width: 100%; }
  .hero-power-blurb { -webkit-line-clamp: 1; }
  .overlay.is-class-select { padding: 8px; }
  .class-card { padding: 8px; gap: 8px; }
  .class-card-figure,
  .class-classic .class-card-figure {
    width: 56px;
    height: 60px;
  }
  .chibi,
  .chibi-svg {
    width: 56px;
    height: 60px;
  }
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 2.8rem;
  overflow: hidden;
  flex: 0 0 auto;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(231, 195, 90, 0.45);
  color: #f0e2a8;
  background: rgba(61, 46, 12, 0.55);
  white-space: nowrap;
}

.skill-chip em {
  font-style: normal;
  font-weight: 700;
}

.fact-backdrop,
.lesson-backdrop {
  position: absolute;
  inset: 0;
  z-index: 11;
  background: rgba(4, 10, 20, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.fact-backdrop.is-visible,
.lesson-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.fact-toast,
.fact-backdrop {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.skill-unlock,
.lesson-intro {
  position: absolute;
  left: 50%;
  z-index: 12;
  transform: translateX(-50%) translateY(12px) scale(0.98);
  width: min(440px, calc(100% - 28px));
  padding: 14px 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(79, 143, 212, 0.55);
  background: linear-gradient(180deg, rgba(12, 24, 42, 0.96), rgba(7, 14, 26, 0.94));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  backdrop-filter: blur(10px);
}

.fact-toast,
.fact-toast.is-visible {
  display: none !important;
  pointer-events: none !important;
}

.lesson-intro {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, calc(-50% + 10px)) scale(0.98);
  width: min(440px, calc(100% - 24px));
  max-height: min(92%, 560px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
  overflow: visible;
}

.lesson-intro.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* WoW-inspired quest accept frame */
.quest-frame {
  font-family: "IBM Plex Sans", sans-serif;
  color: #f3e6c2;
}

.quest-frame .quest-bang {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 800;
  font-size: 22px;
  color: #1a1204;
  background: radial-gradient(circle at 35% 30%, #ffe566, #e7a008 55%, #8a5a00);
  border: 2px solid #fff1a8;
  box-shadow: 0 0 0 2px #5a3a00, 0 8px 20px rgba(0, 0, 0, 0.55);
  z-index: 2;
  animation: quest-bang-pulse 1.6s ease-in-out infinite;
}

.quest-header {
  margin: 0;
  padding: 28px 18px 12px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(72, 48, 18, 0.95), rgba(42, 28, 12, 0.98)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 11px,
      rgba(255, 220, 140, 0.03) 11px,
      rgba(255, 220, 140, 0.03) 12px
    );
  border: 2px solid #c9a227;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  box-shadow: inset 0 0 0 1px rgba(255, 230, 160, 0.25);
}

.quest-availability {
  margin: 0 0 4px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffe566;
}

.quest-title {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: #fff6d0;
  text-shadow: 0 1px 0 #3a2808;
}

.quest-zone {
  margin: 0;
  font-size: 11px;
  color: #cbb888;
}

.quest-scroll {
  margin: 0;
  padding: 12px 16px 10px;
  max-height: min(52vh, 340px);
  overflow: auto;
  background:
    linear-gradient(180deg, #2a1c0c 0%, #1a1208 100%);
  border-left: 2px solid #c9a227;
  border-right: 2px solid #c9a227;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}

.quest-giver {
  margin: 0 0 8px;
  font-size: 12px;
  color: #e7c35a;
}

.quest-giver span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a8150;
}

.quest-desc {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #ead9b0;
}

.quest-desc.muted {
  color: #bba67a;
  font-size: 12px;
}

.quest-section {
  margin: 12px 0 6px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffe566;
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  padding-bottom: 3px;
}

.quest-objectives {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.quest-objectives li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  line-height: 1.35;
  color: #e8d7a8;
}

.quest-check {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border: 1.5px solid #c9a227;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 230, 160, 0.15);
}

.quest-rewards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.quest-reward-item {
  padding: 6px 7px;
  border-radius: 6px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(0, 0, 0, 0.28);
  min-width: 0;
}

.quest-reward-item em {
  display: block;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a8150;
}

.quest-reward-item strong {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
  color: #fff1b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-progress {
  height: 6px;
  margin: 10px 0 8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(201, 162, 39, 0.35);
  overflow: hidden;
}

.quest-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8a5a00, #e7c35a, #ffe566);
}

.quest-chips {
  margin-top: 4px;
}

.quest-chips > span {
  border-color: rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.1);
  color: #e7d29a;
}

.quest-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(42, 28, 12, 0.98), rgba(28, 18, 8, 0.98));
  border: 2px solid #c9a227;
  border-top: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.quest-accept,
.quest-decline {
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.quest-accept {
  border: 1px solid #ffe566;
  background: linear-gradient(180deg, #e7c35a, #a87a12);
  color: #1a1204;
}

.quest-accept:hover,
.quest-accept:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.quest-decline {
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(0, 0, 0, 0.35);
  color: #cbb888;
}

.quest-decline:hover,
.quest-decline:focus-visible {
  border-color: #c9a227;
  color: #ffe566;
  outline: none;
}

@keyframes quest-bang-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.08); }
}

@media (max-width: 720px) {
  .quest-rewards {
    grid-template-columns: 1fr;
  }
  .lesson-intro {
    width: min(420px, calc(100% - 16px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .quest-frame .quest-bang {
    animation: none;
  }
}

.skill-unlock {
  top: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-color: rgba(231, 195, 90, 0.5);
}

.skill-unlock.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.fact-path-track {
  height: 6px;
  margin: 0 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.fact-path-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f8fd4, #9ec8ef);
  transition: width 0.35s ease;
}

.fact-cloud-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.fact-cloud-chips > span {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(158, 200, 239, 0.28);
  background: rgba(79, 143, 212, 0.12);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  color: #b8d4ef;
}

.fact-title {
  margin: 0 0 6px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f2f7ff;
}

.fact-kicker {
  margin: 0 0 4px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.fact-rank {
  margin: 0 0 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #9ec8ef;
}

.fact-body,
.skill-unlock p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #d7e3f2;
}

.fact-dismiss {
  margin: 10px 0 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.path-progress {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #9fb4ce;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-unlock strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  color: #f0e2a8;
}

.skill-unlock-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #e7c35a, #8b6914);
  color: #1a1204;
  font-weight: 800;
  font-size: 14px;
}
.power-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 0;
  flex: 0 0 auto;
}
.power-row button {
  flex: 1 1 0;
  font-size: 10px;
  padding: 5px 6px;
  white-space: nowrap;
}
.commit-log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 3.6rem;
  overflow: hidden;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  line-height: 1.35;
  color: #9eb0c5;
  border-left: 2px solid rgba(79, 143, 212, 0.35);
  padding-left: 6px;
  flex: 0 1 auto;
  min-height: 0;
}
.commit-log li {
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 0;
  max-height: 1.5rem;
  overflow: hidden;
  flex: 0 0 auto;
}
.badge-chip {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(94, 200, 216, 0.35);
  color: #b7e6ef;
  background: rgba(13, 46, 87, 0.55);
}
.board-wrap canvas {
  transition: filter 0.2s ease;
}
.player.is-customizing .board-wrap canvas {
  filter: blur(1px) brightness(0.7);
}
.player.gfx-simple .dev-clouds {
  opacity: 0.35;
}

@media (max-height: 720px) {
  .stats-row.compact { display: none; }
  .commit-log { max-height: 2.4rem; }
  .gb-mini canvas { width: 36px; height: 36px; }
  .keys { display: none; }
}

@media (max-width: 720px) {
  body { overflow: auto; }

  .page {
    height: auto;
    min-height: 100dvh;
  }

  .player { min-height: 100dvh; }

  .player-screen {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(58vh, 1fr) auto;
  }

  .board-column {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .board-wrap {
    border-right: 1px solid var(--line);
    border-bottom: 0;
    min-height: 52vh;
    transform: translateX(-2px);
  }

  .quest-rail {
    max-height: 58vh;
  }

  .side {
    overflow: hidden;
    max-height: 42vh;
  }

  .player-actions { gap: 6px; }

  .player-actions button {
    padding: 7px 10px;
    font-size: 12px;
  }
}
