/* THE SCENE: Amiga Workbench windows, BBS ANSI colours, cracktro flair. */

@font-face {
  font-family: "Press Start 2P";
  src: url("/assets/fonts/pressstart2p/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "VT323";
  src: url("/assets/fonts/vt323/VT323-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --black: #000000;
  --navy: #000033;
  --wb-blue: #0055aa;
  --wb-orange: #ff8800;
  --white: #ffffff;
  --gray: #aaaaaa;
  --dgray: #555555;
  --line: #222244;
  --blue: #5555ff;
  --cyan: #55ffff;
  --magenta: #ff55ff;
  --yellow: #ffff55;
  --green: #55ff55;
  --red: #ff5555;
  --label: #8888bb;
  --pixel: "Press Start 2P", monospace;
  --text: "VT323", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--black);
  color: #c8c8d8;
  font-family: var(--text);
  font-size: 20px;
  line-height: 1.1;
  -webkit-font-smoothing: none;
  font-smooth: never;
  scrollbar-color: var(--blue) var(--black);
}

body {
  background-color: #000008;
  background-image: radial-gradient(#11113a 1px, transparent 1px);
  background-size: 4px 4px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--black);
}
::-webkit-scrollbar-thumb {
  background: var(--blue);
  border: 2px solid var(--black);
}

a {
  color: var(--cyan);
}

p {
  margin: 4px 0;
}

h3 {
  font-family: var(--pixel);
  font-size: 9px;
  font-weight: normal;
  color: var(--wb-orange);
  margin: 10px 0 6px;
}

canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hidden {
  display: none !important;
}

.good,
.ok {
  color: var(--green);
}
.bad {
  color: var(--red);
}
.warn {
  color: var(--yellow);
}
.help {
  color: #8a8aa8;
}
.empty {
  color: #666;
}
.lbl {
  font-family: var(--pixel);
  font-size: 6px;
  color: var(--label);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}
.blink {
  animation: blink 1s steps(1) infinite;
}

/* ---------- controls ---------- */

button {
  font-family: var(--pixel);
  font-size: 8px;
  line-height: 1;
  padding: 5px 8px;
  color: var(--black);
  background: var(--gray);
  border: 2px solid;
  border-color: var(--white) var(--dgray) var(--dgray) var(--white);
  border-radius: 0;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
}
button:hover:not(:disabled) {
  background: #cccccc;
}
button:active:not(:disabled) {
  border-color: var(--dgray) var(--white) var(--white) var(--dgray);
}
button:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
}
button.primary {
  background: var(--wb-orange);
}
button.primary:hover:not(:disabled) {
  background: #ffaa33;
}
button.danger,
button.armed {
  background: #aa0000;
  color: var(--white);
  border-color: var(--red) #550000 #550000 var(--red);
}
button.danger:hover:not(:disabled) {
  background: #cc2222;
}
button.small {
  padding: 3px 5px;
  font-size: 7px;
}
button.big {
  font-size: 12px;
  padding: 12px;
}
button.on {
  background: var(--white);
  color: var(--wb-blue);
}
button:disabled {
  background: #3a3a3a;
  color: #777;
  border-color: #555 #222 #222 #555;
  cursor: default;
}

input:not([type="range"]) {
  font-family: var(--text);
  font-size: 20px;
  background: var(--black);
  color: var(--green);
  border: 2px solid;
  border-color: var(--dgray) var(--white) var(--white) var(--dgray);
  border-radius: 0;
  padding: 2px 6px;
  caret-color: var(--green);
  outline: none;
  min-width: 0;
}
input:not([type="range"]):focus {
  border-color: var(--wb-orange);
}
input:disabled {
  color: #555;
  border-color: #333;
}
input[type="range"] {
  accent-color: var(--wb-orange);
}

/* ---------- bars ---------- */

.bar {
  position: relative;
  height: 14px;
  min-width: 40px;
  background: #111122;
  border: 1px solid #444466;
  overflow: hidden;
}
.bar .fill {
  height: 100%;
  width: 0;
  background: var(--bar, var(--green));
}
.bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(0, 0, 0, 0.45) 6px 8px);
  pointer-events: none;
}
.bar-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  color: var(--white);
  font-size: 16px;
  line-height: 13px;
  text-align: center;
  text-shadow:
    1px 1px 0 #000,
    -1px -1px 0 #000;
  white-space: nowrap;
}
.bar.warn {
  --bar: var(--yellow);
}
.bar.bad {
  --bar: var(--red);
}
.bar.heat.ok {
  --bar: var(--green);
}
.bar.transfer {
  --bar: var(--cyan);
  margin-top: 4px;
}
.bar.hype {
  --bar: var(--magenta);
  width: 72px;
}
.bar.disk {
  --bar: var(--blue);
}
.bar.xp {
  --bar: var(--yellow);
}
.bar.loyalty {
  --bar: var(--cyan);
}

/* ---------- windows ---------- */

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--black);
  border: 2px solid var(--blue);
  box-shadow: 4px 4px 0 #000;
}
.panel > :not(.titlebar) {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.titlebar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  background: var(--wb-blue);
  color: var(--white);
  font-family: var(--pixel);
  font-size: 8px;
  min-height: 20px;
}
.titlebar h2 {
  margin: 0;
  font-size: 8px;
  font-weight: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gadget {
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--white);
  border: 2px solid var(--white);
  box-shadow: inset 0 0 0 2px var(--wb-blue);
  position: relative;
}
.gadget::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--black);
}

.list.is-empty::before {
  content: attr(data-empty);
  display: block;
  padding: 8px;
  color: #666;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.tab {
  background: transparent;
  color: #ccddff;
  border-color: transparent;
  padding: 3px 5px;
}
.tab:hover:not(:disabled) {
  background: #2277cc;
}
.tab.on,
.tab.on:hover:not(:disabled) {
  background: var(--white);
  color: var(--wb-blue);
}
.tab[data-badge]:not([data-badge=""])::after,
.subtab[data-badge]:not([data-badge=""])::after {
  content: attr(data-badge);
  margin-left: 4px;
  padding: 1px 3px;
  background: var(--red);
  color: var(--white);
}
.tabbed > .tab-body {
  display: flex;
  overflow: hidden;
}
.tab-page {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 6px 8px;
}
.tab-page:has(> .chat) {
  overflow: hidden;
  display: flex;
  padding: 0;
}

.tag {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 6px;
  padding: 2px 3px;
  margin-right: 4px;
  border: 1px solid currentColor;
  vertical-align: middle;
  text-decoration: none;
}
.tag.good {
  color: var(--green);
}
.tag.bad {
  color: var(--red);
}
.tag.warn {
  color: var(--yellow);
}

.date {
  color: #6f6fff;
  margin-right: 6px;
}

/* kind badges */
.kind {
  flex: none;
  font-family: var(--pixel);
  font-size: 7px;
  padding: 2px 4px;
  color: var(--black);
  background: var(--gray);
}
.kind-game .kind {
  background: var(--red);
}
.kind-app .kind {
  background: var(--cyan);
}
.kind-music .kind {
  background: var(--magenta);
}
.kind-movie .kind {
  background: var(--yellow);
}
.kind-demo .kind {
  background: var(--green);
}
.kind.small {
  font-size: 6px;
  padding: 1px 3px;
}

/* role chips */
.role-supplier {
  --rc: var(--cyan);
}
.role-cracker {
  --rc: var(--red);
}
.role-encoder {
  --rc: var(--magenta);
}
.role-packer {
  --rc: var(--yellow);
}
.role-courier {
  --rc: var(--green);
}
.role-sysop {
  --rc: #8888ff;
}
.role-artist {
  --rc: var(--wb-orange);
}
.role-chip,
button.role-chip,
button.role-chip:disabled {
  font-family: var(--pixel);
  font-size: 7px;
  padding: 3px 4px;
  background: transparent;
  color: var(--rc, var(--gray));
  border: 2px solid var(--rc, var(--gray));
}
.role-chip.on,
button.role-chip.on,
button.role-chip.on:disabled,
button.role-chip.on:hover:not(:disabled) {
  background: var(--rc, var(--gray));
  color: var(--black);
}
button.role-chip.off {
  opacity: 0.5;
}
button.role-chip:hover:not(:disabled) {
  opacity: 1;
  background: #222;
}
button.role-chip:disabled {
  cursor: default;
}

/* ---------- lobby ---------- */

.lobby {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.lobby-win {
  width: min(900px, 96vw);
}
.lobby-body {
  padding: 16px 20px;
}
.logo {
  margin: 0 auto;
  font-family: var(--text);
  font-size: 20px;
  line-height: 0.9;
  text-align: center;
  background: linear-gradient(#ffff55, #ff8800 50%, #ff55ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline {
  text-align: center;
  color: var(--cyan);
  margin: 12px 0 16px;
}
.lobby-cols {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.scene.lobby-scene {
  flex: none;
  width: 384px;
  height: 144px;
  border: 2px solid var(--blue);
}
.lobby-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lobby-form label {
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--label);
  margin-top: 6px;
}
.row {
  display: flex;
  gap: 6px;
}
.row input {
  flex: 1;
}
.code {
  text-transform: uppercase;
  letter-spacing: 4px;
}
.lobby-status {
  min-height: 1.2em;
  color: var(--yellow);
}
.lobby-status.bad {
  color: var(--red);
}
.lobby-foot {
  margin-top: 16px;
  text-align: center;
  color: #666;
}

/* ---------- game layout ---------- */

.game {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  background: var(--navy);
  border-bottom: 2px solid var(--wb-orange);
}
.scene {
  flex: none;
  width: 256px;
  height: 96px;
  border: 2px solid var(--blue);
}
.ident {
  flex: 0 1 270px;
  min-width: 0;
}
.group-name {
  margin: 0 0 8px;
  font-family: var(--pixel);
  font-size: 14px;
  font-weight: normal;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #aa00aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ident-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  white-space: nowrap;
}
.room-code {
  font-family: var(--pixel);
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: 2px;
}
.flags {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--red);
}
.ident .date {
  color: var(--white);
}
.era {
  color: var(--gray);
  overflow: hidden;
  text-overflow: ellipsis;
}
.hstats {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 6px 12px;
}
.hstat {
  min-width: 0;
}
.hstat label {
  display: block;
  font-family: var(--pixel);
  font-size: 6px;
  color: var(--label);
  margin-bottom: 3px;
}
.hstat b {
  font-weight: normal;
  color: var(--white);
  font-size: 22px;
}
.hstat small {
  margin-left: 6px;
  font-size: 16px;
}
.controls {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.speeds {
  display: flex;
  gap: 3px;
  align-items: center;
}
.speeds .lbl {
  margin-right: 4px;
}
.speed {
  min-width: 34px;
}
.speed.on {
  background: var(--wb-orange);
  color: var(--black);
}
.music {
  display: flex;
  gap: 4px;
  align-items: center;
}
.music-note {
  color: var(--magenta);
}
.music.playing .music-note {
  animation: blink 0.6s steps(1) infinite;
}
.volume {
  width: 64px;
}
.music .track {
  font-size: 16px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scroller {
  display: block;
  width: 100%;
  height: 28px;
  background: var(--black);
}

.netbar {
  background: #aa0000;
  color: var(--white);
  font-family: var(--pixel);
  font-size: 8px;
  padding: 5px;
  text-align: center;
  animation: blink 1.2s steps(1) infinite;
}

.banned-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 10px 0;
  padding: 6px 10px;
  background: #330000;
  border: 2px solid var(--red);
}
.banned-banner b {
  font-family: var(--pixel);
  font-size: 10px;
  color: var(--red);
  font-weight: normal;
}
.banned-banner input {
  width: 240px;
}

.cols {
  display: grid;
  grid-template-columns: minmax(380px, 1.15fr) minmax(400px, 1.2fr) minmax(290px, 0.85fr);
  gap: 10px;
  padding: 8px 10px 10px;
  flex: 1;
  min-height: 0;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  min-width: 0;
}
.col-a > .panel:first-child {
  flex: 3 1 0;
}
.col-a > .panel:last-child {
  flex: 2 1 0;
}
.col-b > .panel {
  flex: 1;
}
.col-c > .panel:first-child {
  flex: 0 1 auto;
  max-height: 45%;
}
.col-c > .panel:last-child {
  flex: 1 1 0;
}

/* ---------- jobs ---------- */

.job,
.lead,
.item,
.member,
.candidate,
.player,
.skill {
  padding: 5px 8px;
  border-bottom: 2px dashed var(--line);
}
.job.mine {
  background: #1a1a00;
}
.job-head,
.lead-head,
.item-head,
.member-head,
.player-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.job-name,
.lead-title,
.item-name {
  flex: 1;
  min-width: 0;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-meta {
  color: #777;
  font-size: 16px;
}
.job-warn {
  color: var(--red);
  font-size: 18px;
  margin-top: 2px;
}
.steps {
  display: flex;
  margin-top: 4px;
}
.step {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
}
.arrow {
  align-self: center;
  color: #555;
  padding: 0 2px;
}
.step-box {
  flex: 1;
  min-width: 0;
  padding: 3px 4px;
  border: 2px solid #333;
  background: #0a0a14;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.step-box b {
  font-family: var(--pixel);
  font-size: 7px;
  font-weight: normal;
  color: #888;
}
.step.current .step-box {
  border-color: var(--wb-orange);
}
.step.current .step-box b {
  color: var(--white);
}
.step.done .step-box {
  border-color: #1c6030;
}
.step.done .step-box b {
  color: var(--green);
}
.step.working .step-box b {
  color: var(--cyan);
}
.who {
  font-size: 16px;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step .bar {
  min-width: 0;
  height: 12px;
}
.step .bar-label {
  font-size: 14px;
  line-height: 11px;
}
.claim {
  width: 100%;
}

/* ---------- leads ---------- */

.leads-wrap {
  display: flex;
  flex-direction: column;
}
.leads {
  flex: 1 0 auto;
}
.lead-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--gray);
  font-size: 18px;
  margin-top: 2px;
}
.lead-size {
  color: var(--white);
}
.lead-exp {
  color: #777;
}
.demo-form {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  background: var(--black);
  border-top: 2px solid var(--line);
}
.demo-form input {
  flex: 1;
}

/* ---------- shop ---------- */

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.item.unavailable .item-name {
  color: #777;
}
.item.owned {
  background: #001a08;
}
.item-owned {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--green);
}
.item-price {
  color: var(--yellow);
  white-space: nowrap;
}
.item-desc {
  margin: 2px 0 0;
  color: var(--gray);
  font-size: 18px;
}
.item-blocked {
  margin: 0;
  color: var(--red);
  font-size: 16px;
}

/* ---------- crew & players ---------- */

.handle {
  color: var(--white);
}
.since,
.working {
  color: #777;
  font-size: 16px;
}
.since {
  margin-left: auto;
}
.member-bars {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px;
  align-items: center;
  margin: 3px 0;
}
.pitch {
  color: var(--gray);
  font-size: 18px;
}
.player.me {
  background: #0a0a30;
}
.dot {
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--dgray);
}
.dot.on {
  background: var(--green);
}
.pstatus {
  margin-left: auto;
  max-width: 60%;
  color: var(--gray);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

/* ---------- skills ---------- */

.skill:not(.held) {
  opacity: 0.6;
}
.skill-head {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  gap: 8px;
  align-items: center;
}
.skill-head b {
  font-family: var(--pixel);
  font-size: 8px;
  font-weight: normal;
  color: var(--white);
}
.lvl {
  color: var(--yellow);
}
.role-info {
  color: #888;
  font-size: 17px;
}
.perks {
  list-style: none;
  padding: 0;
  margin: 2px 0 0;
  font-size: 18px;
}
.perks li.locked {
  color: #555;
}
.perks li.unlocked {
  color: #ccc;
}
.perks li.unlocked b {
  color: var(--green);
}
.perks b {
  font-weight: normal;
  margin-right: 4px;
}
.perk-lvl {
  font-family: var(--pixel);
  font-size: 6px;
  margin-right: 6px;
  color: var(--wb-orange);
}

/* ---------- tables, stats, news, chat ---------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
}
.table th {
  font-family: var(--pixel);
  font-size: 7px;
  font-weight: normal;
  color: var(--label);
  text-align: left;
  padding: 4px 6px;
}
.table td {
  padding: 2px 6px;
  vertical-align: top;
}
.table tr:nth-child(even) td {
  background: #080818;
}
.table tr.us td {
  color: var(--yellow);
}
.table tr.inactive td {
  color: #555;
}
.table tr.nuked td {
  color: #ff8888;
}
.table td.date {
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}
.stat {
  border: 2px solid var(--line);
  padding: 4px 6px;
}
.stat label {
  display: block;
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--label);
  margin-bottom: 2px;
}
.stat b {
  font-weight: normal;
  color: var(--white);
}
.stat.bad b {
  color: var(--red);
}
.stat.warn b {
  color: var(--yellow);
}
.stat.good b {
  color: var(--green);
}
.group h3 {
  font-size: 12px;
  color: var(--yellow);
  margin-top: 4px;
}
.banned-note {
  color: var(--red);
}

.news-item {
  padding: 3px 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 18px;
}
.news-item .tag {
  color: var(--gray);
}
.news-raid .tag {
  color: var(--red);
}
.news-raid {
  color: #ffaaaa;
}
.news-nuke .tag {
  color: var(--wb-orange);
}
.news-pre .tag {
  color: var(--cyan);
}
.news-market .tag {
  color: var(--yellow);
}
.news-crew .tag {
  color: var(--magenta);
}
.news-group .tag {
  color: var(--green);
}

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chat-log {
  flex: 1;
  overflow: auto;
  padding: 6px 8px;
}
.chat-line {
  font-size: 18px;
  margin-bottom: 2px;
  overflow-wrap: anywhere;
}
.chat-line .date {
  font-size: 15px;
}
.chat-line b {
  font-weight: normal;
  color: var(--cyan);
}
.chat-line.mine b {
  color: var(--yellow);
}
.chat-input {
  margin: 6px;
}

.help-page section p,
.help-page li {
  font-size: 18px;
}
.help-page ul,
.credits ul {
  margin: 4px 0;
  padding-left: 18px;
}
.help-page li b {
  color: var(--white);
  font-weight: normal;
}
.credits li {
  margin-bottom: 4px;
}

/* ---------- overlays ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 20, 0.7);
  background-image: radial-gradient(rgba(0, 0, 0, 0.8) 1px, transparent 1px);
  background-size: 3px 3px;
}
.mg-window {
  width: min(980px, 96vw);
  max-height: 94vh;
  box-shadow: 8px 8px 0 #000;
}
.mg-window .titlebar {
  font-size: 10px;
  padding: 5px 8px;
}
.mg-window .titlebar h2 {
  font-size: 10px;
}
.mg-sub {
  color: #ccddff;
  font-size: 7px;
  white-space: nowrap;
}
.mg-clock {
  margin-left: auto;
  font-size: 14px;
  color: var(--white);
  min-width: 70px;
  text-align: right;
}
.mg-clock.urgent {
  color: var(--red);
  animation: blink 0.5s steps(1) infinite;
}
.mg-body {
  padding: 12px 14px;
}
.mg .flavor {
  color: var(--yellow);
  margin: 0 0 8px;
}
.mg .keys {
  color: #666;
  font-size: 16px;
}
.mg-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}
.rules {
  margin: 4px 0;
  padding-left: 18px;
  color: var(--cyan);
  font-size: 18px;
}
.mg-wait {
  padding: 48px;
  text-align: center;
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--yellow);
}
.mg-result {
  padding: 24px;
  text-align: center;
}
.mg-result .verdict {
  font-family: var(--pixel);
  font-size: 14px;
  line-height: 1.5;
  color: var(--white);
}
.bar.score {
  height: 24px;
  max-width: 420px;
  margin: 16px auto;
}
.bar.score .bar-label {
  font-size: 22px;
  line-height: 22px;
}
.bar.score.ok {
  --bar: var(--green);
}
.xp {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--yellow);
  margin-bottom: 16px;
}

/* sequence */
.seq-status {
  text-align: center;
  font-family: var(--pixel);
  font-size: 10px;
  color: var(--wb-orange);
  margin: 6px 0 10px;
}
.seq-stage {
  min-height: 70px;
}
.seq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 50px;
}
.seq-row.entered:empty {
  display: none;
}
.seq-tile {
  min-width: 44px;
  height: 44px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--cyan);
  background: #000033;
  border: 2px solid var(--blue);
}
.seq-tile.blank {
  color: #333;
  border-color: #333;
}
.seq-timer {
  max-width: 360px;
  margin: 10px auto;
}
.seq-pad {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
  max-width: 520px;
  margin: 14px auto 0;
}
.seq-pad.phone {
  grid-template-columns: repeat(3, 80px);
  justify-content: center;
}
.seq-key {
  position: relative;
  font-size: 13px;
  padding: 14px 4px;
}
.seq-key small {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 6px;
  color: #444;
}

/* crack */
.mg-crack {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr);
  gap: 14px;
}
.asm-listing {
  height: 56vh;
  overflow: auto;
  background: #000;
  border: 2px solid #333;
  outline: none;
  font-size: 19px;
}
.asm-listing:focus {
  border-color: var(--blue);
}
.asm-line {
  display: grid;
  grid-template-columns: 7ch 13ch 1fr 2ch;
  gap: 8px;
  padding: 0 6px;
  cursor: pointer;
  white-space: pre;
}
.asm-addr {
  color: #6f6fff;
}
.asm-bytes {
  color: #666;
  overflow: hidden;
}
.asm-text {
  color: #ccc;
}
.asm-flag {
  color: var(--yellow);
}
.asm-line.hint {
  background: #262600;
}
.asm-line.xref .asm-text {
  color: var(--cyan);
}
.asm-line:hover {
  background: #111144;
}
.asm-line.sel,
.asm-line.sel:hover {
  background: var(--wb-blue);
}
.asm-line.sel span {
  color: var(--white);
}
.crack-right h3:first-child {
  margin-top: 0;
}
.asm-strings-wrap {
  max-height: 24vh;
  overflow: auto;
  border: 2px solid #333;
}
.asm-strings {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
}
.asm-strings th {
  font-family: var(--pixel);
  font-size: 7px;
  font-weight: normal;
  color: var(--label);
  text-align: left;
  padding: 3px 6px;
}
.asm-strings td {
  padding: 0 6px;
  cursor: pointer;
}
.asm-strings td:first-child {
  color: #6f6fff;
}
.asm-strings td:last-child {
  color: var(--green);
}
.asm-strings tr:hover td {
  background: #111144;
}
.asm-sel {
  min-height: 1.2em;
  color: var(--wb-orange);
  white-space: pre-wrap;
}
.patches {
  display: flex;
  gap: 6px;
  margin: 6px 0 12px;
}
.patch small {
  margin-left: 4px;
  font-size: 6px;
}

/* encode */
.enc-spec {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.enc-spec label,
.enc-row label,
.enc-est label {
  display: block;
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--label);
}
.enc-spec b {
  font-weight: normal;
  color: var(--white);
  font-size: 22px;
}
.enc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.enc-row label {
  width: 110px;
  flex: none;
}
.enc-row input[type="range"] {
  flex: 1;
}
.num {
  width: 100px;
}
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.opt.illegal {
  text-decoration: line-through;
}
.enc-est {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 8px;
}
.enc-est .big {
  font-size: 34px;
  color: var(--white);
}
.enc-verdict {
  font-family: var(--pixel);
  font-size: 10px;
}
.enc-meter {
  position: relative;
  height: 22px;
  margin: 10px 0;
  background: #111;
  border: 2px solid var(--dgray);
}
.enc-fill {
  height: 100%;
}
.enc-fill.ok {
  background: var(--green);
}
.enc-fill.warn {
  background: var(--yellow);
}
.enc-fill.bad {
  background: var(--red);
}
.enc-mark {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 2px;
  background: var(--white);
}
.enc-mark.min {
  background: var(--yellow);
}

/* spot */
.spot-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
  gap: 14px;
}
.spot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 52vh;
  overflow: auto;
  border: 2px solid #333;
}
.spot-item {
  display: flex;
  gap: 8px;
  padding: 2px 6px;
  cursor: pointer;
  white-space: pre-wrap;
  font-size: 19px;
}
.spot-item:hover,
.spot-item.cur {
  background: #111144;
}
.spot-box {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 2px solid var(--gray);
}
.spot-num {
  flex: none;
  width: 1ch;
  color: #555;
}
.spot-item.on .spot-box {
  background: var(--red);
  border-color: var(--red);
}
.spot-item.on .spot-text {
  color: var(--red);
  text-decoration: line-through;
}
.spot-rules h3 {
  margin-top: 0;
}

/* type */
.terminal {
  margin: 0 0 10px;
  padding: 8px;
  max-height: 32vh;
  overflow: auto;
  background: #000;
  border: 2px solid #333;
  color: var(--gray);
  font-family: var(--text);
  font-size: 18px;
  white-space: pre-wrap;
}
.type-target {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.type-target label {
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--label);
}
.type-target code {
  font-family: var(--text);
  font-size: 28px;
  white-space: pre-wrap;
}
.type-target .ok {
  color: var(--green);
}
.type-target .bad {
  color: var(--white);
  background: #aa0000;
}
.type-target .rest {
  color: var(--white);
}
.type-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.type-line .prompt {
  color: var(--green);
  font-size: 28px;
}
.type-input {
  flex: 1;
  font-size: 28px !important;
}
.type-stats {
  display: flex;
  gap: 18px;
  align-items: baseline;
}
.type-stats b,
.type-clock {
  color: var(--white);
}
.type-clock.over {
  color: var(--red);
}

/* pixel */
.px-cols {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: flex-start;
}
.px-canvas,
.px-target {
  border: 2px solid var(--dgray);
}
.px-canvas {
  cursor: crosshair;
  touch-action: none;
}
.px-side h3:first-child {
  margin-top: 0;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(4, 32px);
  gap: 4px;
}
.swatch {
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--white);
  text-shadow: 1px 1px 0 #000;
  font-size: 7px;
  border-color: #888;
}
.swatch.on {
  outline: 3px solid var(--wb-orange);
  outline-offset: 1px;
}
.tools {
  display: flex;
  gap: 4px;
  margin: 8px 0;
}

/* game over */
.gameover-win {
  width: min(640px, 94vw);
}
.gameover-body {
  padding: 16px 20px;
  text-align: center;
}
.gameover-body h1 {
  font-family: var(--pixel);
  font-size: 20px;
  font-weight: normal;
  color: var(--yellow);
  text-shadow: 3px 3px 0 #aa00aa;
}
.gameover-body .stat-grid {
  margin: 16px 0;
  text-align: left;
}

/* toasts */
.toasts {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 440px;
  pointer-events: none;
}
.toast {
  padding: 6px 10px;
  background: #000;
  border: 2px solid var(--blue);
  box-shadow: 4px 4px 0 #000;
}
.toast.bad {
  border-color: var(--red);
  color: var(--red);
}
.toast.good {
  border-color: var(--green);
  color: var(--green);
}
.table .after {
  color: #666;
  font-size: 15px;
}
.role-chip .lv {
  margin-left: 3px;
  padding: 0 2px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  font-size: 6px;
}
.skill-head .bar {
  height: 16px;
}
.skill-head .bar-label {
  line-height: 15px;
}
