:root {
  color-scheme: dark;
  --bg: #100d20;
  --panel: #1b1831;
  --border: #37314e;
  --cream: #f6f1e8;
  --muted: #aaa4bf;
  --pink: #ff6ca8;
  --lime: #c7ff72;
  --purple: #a489fc;
  --orange: #f7b55c;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Arial,
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  line-height: 1.5;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}
.hidden {
  display: none !important;
}
.stars {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto;
  height: 910px;
  background-image:
    radial-gradient(#8f88ac 1px, transparent 1px), radial-gradient(#d6cfff 1px, transparent 1px);
  background-size:
    94px 94px,
    147px 147px;
  background-position:
    21px 15px,
    44px 60px;
  opacity: 0.14;
  mask-image: linear-gradient(black, transparent);
}
.header {
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff18;
  position: relative;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 1000;
  letter-spacing: -1.5px;
  line-height: 1;
}
.brand img {
  width: 51px;
  height: 51px;
  image-rendering: pixelated;
  border: 2px solid var(--pink);
  border-radius: 12px;
  background: #2a2138;
  padding: 3px;
}
.brand-accent {
  color: var(--pink);
}
.brand small {
  font-size: 9px;
  display: block;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 750;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 27px;
}
.online {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.1px;
  font-weight: 800;
}
.online b {
  display: inline-block;
  background: var(--lime);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 14px var(--lime);
}
.icon-btn,
.header-link {
  border: 1px solid var(--border);
  background: #ffffff08;
  color: var(--cream);
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
}
.header-link {
  border: none;
  background: transparent;
}
.hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: 1fr 0.94fr;
  gap: 55px;
  align-items: center;
  padding-top: 50px;
  padding-bottom: 70px;
  position: relative;
}
.hero-copy {
  z-index: 1;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--pink);
  font-weight: 950;
}
.eyebrow span {
  color: var(--lime);
}
.hero h1 {
  line-height: 0.96;
  letter-spacing: -5px;
  font-weight: 1000;
  font-size: clamp(56px, 7.1vw, 100px);
  margin: 21px 0 26px;
  white-space: nowrap;
}
.hero h1 em {
  font-style: normal;
  color: var(--pink);
  text-shadow: 5px 5px 0 #5f294e;
}
.hero h1 > span:not(.blink) {
  color: var(--lime);
}
.blink {
  font-weight: 400;
  color: var(--lime);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.hero-copy > p {
  font-size: 17px;
  color: #c8c2d5;
  max-width: 450px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 32px;
}
.primary {
  border: none;
  background: var(--pink);
  color: #190c24;
  font-weight: 1000;
  letter-spacing: 0.55px;
  border-radius: 7px;
  padding: 15px 18px;
  box-shadow: 5px 5px 0 #743c64;
  font-size: 12px;
}
.primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #743c64;
}
.ghost {
  color: var(--cream);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  padding: 13px;
}
.hero-stats {
  display: flex;
  margin-top: 45px;
  gap: 32px;
}
.hero-stats > div {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ffffff22;
  padding-right: 30px;
}
.hero-stats > div:last-child {
  border: 0;
}
.hero-stats strong {
  font-size: 30px;
  line-height: 1;
  letter-spacing: -1px;
  font-weight: 1000;
}
.hero-stats small {
  font-size: 9px;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 1.1px;
  margin-top: 9px;
}
.hero-feature {
  min-height: 485px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cabinet {
  width: min(440px, 96%);
  position: relative;
  transform: rotate(2deg);
  filter: drop-shadow(23px 27px 30px #05051088);
}
.cabinet-top {
  background: #b78aff;
  border: 8px solid #3c2469;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  text-align: center;
  color: #23103a;
  padding: 6px;
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: 4px;
  position: relative;
}
.cabinet-top i {
  position: absolute;
  left: 14px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 350px 0 var(--lime);
}
.cabinet-screen {
  position: relative;
  overflow: hidden;
  height: 340px;
  border: 15px solid #3c2469;
  border-top: 4px solid #3c2469;
  background: radial-gradient(circle at 50% 46%, #42346b 0, #241f46 55%, #18142d 100%);
}
.cabinet-screen:after,
.game-frame:after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(transparent 0px, transparent 3px, #05050911 4px);
  opacity: 0.65;
}
.corner-tl,
.corner-tr {
  position: absolute;
  top: 15px;
  left: 14px;
  z-index: 2;
  font-family: monospace;
  color: #f1eafc;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.4;
}
.corner-tl b {
  color: var(--pink);
}
.corner-tr {
  left: auto;
  right: 12px;
  text-align: right;
  color: var(--lime);
}
.orbit {
  position: absolute;
  border: 2px dashed #eaa5ff40;
  border-radius: 50%;
  width: 230px;
  height: 230px;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
}
.orbit-two {
  width: 350px;
  height: 350px;
  border-style: solid;
  border-color: #ec6d9640;
}
.hero-cat {
  image-rendering: pixelated;
  width: 245px;
  height: 245px;
  position: absolute;
  left: 50%;
  top: 15%;
  transform: translateX(-50%);
  filter: drop-shadow(7px 12px 0 #140d3077);
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob {
  50% {
    transform: translate(-50%, -9px);
  }
}
.floating {
  position: absolute;
  z-index: 2;
  font-size: 30px;
}
.f1 {
  top: 93px;
  left: 32px;
}
.f2 {
  top: 96px;
  right: 37px;
  color: var(--lime);
}
.f3 {
  bottom: 80px;
  right: 30px;
}
.screen-floor {
  height: 25px;
  width: 100%;
  position: absolute;
  bottom: 15px;
  background: #bb92ff25;
  border-top: 3px solid #c5a6ff55;
}
.screen-start {
  position: absolute;
  bottom: 33px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: monospace;
  font-weight: 1000;
  font-size: 15px;
  color: var(--lime);
  letter-spacing: 3px;
  z-index: 2;
  animation: blink 1.2s steps(1) infinite;
}
.cabinet-bottom {
  height: 66px;
  border: 8px solid #3c2469;
  border-top: 0;
  background: #aa79f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-radius: 0 0 16px 16px;
  color: #412469;
}
.cabinet-bottom > span:first-child {
  font-size: 35px;
  line-height: 1;
  color: #e64885;
}
.cabinet-bottom div {
  display: flex;
  gap: 7px;
}
.cabinet-bottom b {
  width: 20px;
  height: 13px;
  background: #fd71a0;
  border: 3px solid #632e60;
  border-radius: 50%;
}
.cat-foot {
  font-size: 17px;
  font-weight: 1000;
  letter-spacing: 1px;
}
.portrait {
  position: absolute;
  right: -10px;
  bottom: 5px;
  transform: rotate(-9deg);
  width: 140px;
  background: #f8f5ed;
  color: #222;
  padding: 7px 7px 22px;
  box-shadow: 8px 8px 0 #0004;
}
.portrait img {
  width: 100%;
  height: 98px;
  object-fit: cover;
  object-position: top;
}
.portrait span {
  font-weight: 1000;
  font-size: 8px;
  letter-spacing: 1px;
  display: block;
  text-align: center;
  padding-top: 7px;
}
.marquee {
  overflow: hidden;
  border-top: 2px solid #533657;
  border-bottom: 2px solid #533657;
  background: #24192f;
  color: var(--pink);
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 1000;
  padding: 13px 0;
  white-space: nowrap;
}
.marquee > div {
  width: max-content;
  animation: marq 40s linear infinite;
}
@keyframes marq {
  to {
    transform: translateX(-50%);
  }
}
.collection {
  padding-top: 78px;
  padding-bottom: 95px;
}
.collection-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.green {
  color: var(--lime);
}
.collection h2 {
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1;
  margin: 11px 0 14px;
  letter-spacing: -2px;
  font-weight: 1000;
}
.collection h2 span {
  color: var(--purple);
}
.collection-head p {
  color: var(--muted);
  margin-top: 0;
}
.counter {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1.4px;
  white-space: nowrap;
}
.counter span {
  color: var(--lime);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  margin: 35px 0 25px;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 250px;
}
.search-wrap span {
  position: absolute;
  top: 9px;
  left: 14px;
  font-size: 26px;
  color: var(--muted);
}
.search-wrap input {
  height: 45px;
  width: 100%;
  background: #1d1a31;
  border: 1px solid var(--border);
  color: var(--cream);
  border-radius: 8px;
  padding: 0 16px 0 42px;
  outline: none;
}
.search-wrap input:focus {
  border-color: var(--pink);
}
.chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2px;
  background: #211d37;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 13px;
  border-radius: 7px;
}
.chip.active,
.chip:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: #182011;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.game-card {
  position: relative;
  background: #1c1930;
  border: 1px solid #403853;
  border-radius: 12px;
  overflow: hidden;
  transition:
    border-color 0.18s,
    transform 0.18s;
  min-width: 0;
}
.game-card:hover {
  border-color: var(--pink);
  transform: translateY(-4px);
}
.card-art {
  height: 151px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, var(--art-main), var(--art-dark));
  border-bottom: 1px solid #ffffff1a;
}
.card-art:before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0px, transparent 16px, #ffffff10 17px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 16px, #ffffff10 17px);
}
.card-art:after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border: 3px dashed #ffffff25;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.art-cat {
  position: relative;
  z-index: 2;
  width: 105px;
  height: 105px;
  image-rendering: pixelated;
  filter: drop-shadow(9px 8px 0 #100c2670);
  transform: rotate(var(--art-rotate));
  transition: transform 0.2s;
}
.game-card:hover .art-cat {
  transform: rotate(0deg) scale(1.1);
}
.art-glyph {
  position: absolute;
  font-size: 31px;
  right: 18px;
  bottom: 13px;
  z-index: 2;
  filter: drop-shadow(2px 3px 0 #0003);
}
.card-no {
  position: absolute;
  top: 11px;
  left: 12px;
  font-size: 10px;
  font-family: monospace;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff9;
  z-index: 2;
}
.fav {
  position: absolute;
  top: 9px;
  right: 10px;
  z-index: 3;
  background: #1e163d99;
  color: white;
  border: 1px solid #ffffff4c;
  font-size: 17px;
  width: 32px;
  height: 31px;
  border-radius: 8px;
}
.fav.on {
  color: var(--pink);
  background: #4c1f3a;
}
.card-body {
  padding: 17px;
}
.card-meta {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: var(--lime);
  font-weight: 950;
  text-transform: uppercase;
}
.card-body h3 {
  font-size: 19px;
  letter-spacing: -0.4px;
  line-height: 1.15;
  margin: 9px 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-body p {
  font-size: 12px;
  min-height: 38px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.5;
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ffffff18;
  padding-top: 12px;
}
.card-bottom span {
  color: #b7b0cb;
  font-size: 10px;
}
.play {
  padding: 7px 11px;
  background: var(--pink);
  color: #271323;
  border: none;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 1000;
}
.play:hover {
  background: var(--lime);
}
.load-more {
  display: block;
  margin: 34px auto 0;
  background: transparent;
  color: var(--lime);
  border: 1px solid var(--lime);
  border-radius: 9px;
  padding: 15px 30px;
  font-size: 12px;
  font-weight: 1000;
}
.empty {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
.footer {
  border-top: 1px solid var(--border);
  background: #151126;
}
.footer-inner {
  min-height: 90px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
}
.footer b {
  color: var(--pink);
}
.footer a {
  color: var(--lime);
}
.modal {
  position: fixed;
  inset: 0;
  background: #090611eb;
  z-index: 50;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
}
.modal-shell {
  width: min(970px, 100%);
  border: 2px solid #6e548c;
  border-radius: 13px;
  background: #19152c;
  box-shadow: 0 35px 100px #0009;
  overflow: hidden;
}
.game-top {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.game-top span {
  font-size: 10px;
  color: var(--lime);
  font-weight: 900;
  letter-spacing: 1px;
}
.game-top h2 {
  font-size: 19px;
  line-height: 1;
  margin: 3px 0 0;
  letter-spacing: -0.5px;
}
.game-actions {
  display: flex;
  gap: 7px;
}
.small-btn {
  background: #332a48;
  color: var(--cream);
  border: 1px solid #625474;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 10px;
  font-weight: 900;
}
.small-btn:hover {
  background: #59446f;
}
.close {
  background: #763954;
  border-color: #96576a;
}
.game-frame {
  position: relative;
  background: #0a0e25;
  overflow: hidden;
  touch-action: none;
}
.game-frame canvas {
  display: block;
  width: 100%;
  aspect-ratio: 5/3;
  image-rendering: pixelated;
  cursor: crosshair;
}
.canvas-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(#080b1bc9, transparent);
  padding: 10px 16px;
  color: #f3edff;
  font-size: 12px;
  font-family: monospace;
  font-weight: 900;
  pointer-events: none;
}
.canvas-stats span:nth-child(2) {
  color: var(--lime);
}
.game-message {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #0d0c20bf;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.game-message h3 {
  font-size: clamp(28px, 5vw, 55px);
  line-height: 1;
  color: var(--lime);
  text-shadow: 4px 4px #5b4269;
  margin: 0 0 12px;
}
.game-message p {
  max-width: 450px;
  color: #e5dff2;
  font-size: 15px;
}
.game-message .primary {
  margin-top: 13px;
}
.game-info {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}
.game-info p {
  margin: 0;
}
.game-info span {
  white-space: nowrap;
  color: #938aa8;
}
.mobile-controls {
  display: none;
  padding: 8px 18px 16px;
  align-items: center;
  justify-content: space-between;
}
.dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dpad div {
  display: flex;
  gap: 4px;
}
.mobile-controls button {
  width: 59px;
  height: 47px;
  border-radius: 11px;
  background: #382b50;
  color: var(--cream);
  border: 1px solid #88729e;
  font-size: 17px;
  touch-action: none;
}
.mobile-controls button:active,
.mobile-controls button.pressed {
  background: var(--pink);
  color: #1b1020;
}
.action-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mobile-controls button.action {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pink);
  color: #280c24;
  font-size: 23px;
  font-weight: 1000;
}
.mobile-controls button.secondary {
  background: var(--lime);
}
@media (max-width: 1150px) {
  .hero {
    gap: 15px;
  }
  .hero h1 {
    font-size: clamp(55px, 7vw, 78px);
  }
  .games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .portrait {
    right: 0;
  }
}
@media (max-width: 800px) {
  .wrap {
    padding-left: 18px;
    padding-right: 18px;
  }
  .header {
    height: 78px;
  }
  .header-right {
    gap: 9px;
  }
  .online,
  .header-link {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 45px;
    padding-bottom: 65px;
  }
  .hero h1 {
    font-size: clamp(55px, 10vw, 85px);
  }
  .hero-feature {
    min-height: 410px;
  }
  .cabinet {
    width: min(410px, 89%);
  }
  .portrait {
    right: 5%;
    bottom: 0;
  }
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-inner {
    flex-wrap: wrap;
    padding-top: 22px;
    padding-bottom: 22px;
    gap: 10px;
  }
  .mobile-controls {
    display: flex;
  }
  .game-info span {
    display: none;
  }
  .modal {
    align-items: flex-start;
  }
}
@media (max-width: 500px) {
  .brand {
    font-size: 20px;
  }
  .brand img {
    width: 42px;
    height: 42px;
  }
  .hero h1 {
    letter-spacing: -3px;
    font-size: clamp(46px, 11.1vw, 62px);
  }
  .hero-copy > p {
    font-size: 15px;
  }
  .hero-stats {
    gap: 12px;
    margin-top: 33px;
  }
  .hero-stats > div {
    padding-right: 13px;
  }
  .hero-stats strong {
    font-size: 23px;
  }
  .hero-stats small {
    font-size: 8px;
  }
  .hero-actions .primary {
    width: 100%;
  }
  .ghost {
    margin-left: -10px;
  }
  .hero-feature {
    min-height: 375px;
  }
  .cabinet-screen {
    height: 260px;
  }
  .hero-cat {
    width: 190px;
    height: 190px;
  }
  .cabinet-top {
    font-size: 17px;
    letter-spacing: 2px;
  }
  .portrait {
    width: 109px;
    right: -4px;
  }
  .portrait img {
    height: 74px;
  }
  .games-grid {
    gap: 10px;
  }
  .card-art {
    height: 113px;
  }
  .art-cat {
    width: 85px;
    height: 85px;
  }
  .card-body {
    padding: 11px;
  }
  .card-body h3 {
    font-size: 15px;
  }
  .card-body p {
    font-size: 11px;
    min-height: 48px;
  }
  .card-meta {
    font-size: 8px;
  }
  .game-top {
    padding: 10px;
  }
  .game-top h2 {
    font-size: 14px;
  }
  .small-btn {
    font-size: 9px;
    padding: 8px 7px;
  }
  .game-top span {
    font-size: 8px;
  }
  .game-frame {
    margin-top: 0;
  }
  .canvas-stats {
    font-size: 8px;
    padding: 5px;
  }
  .game-info {
    font-size: 10px;
  }
  .mobile-controls button {
    width: 48px;
    height: 42px;
  }
  .mobile-controls button.action {
    width: 58px;
    height: 58px;
  }
  .counter {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* v2 touch: keep the D-pad near the lower edge without invoking browser UI. */
.mobile-controls,
.mobile-controls *,
.game-frame,
#canvas {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: contain;
}
.mobile-controls button {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 800px) {
  .modal-shell {
    min-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
  }
  .mobile-controls {
    margin-top: auto;
    padding-top: 30px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .game-info {
    padding-bottom: 12px;
  }
}

/* V2.1 - Difficulty selector stays legible without obstructing touch controls. */
.difficulty-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: #201a36;
  border-top: 1px solid #ffffff16;
  border-bottom: 1px solid #ffffff19;
}
.difficulty-bar label {
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.7px;
  color: #caff89;
}
.difficulty-bar select {
  color: #f7efff;
  background: #382c51;
  border: 1px solid #7d6896;
  border-radius: 7px;
  padding: 9px 12px;
  font:
    900 11px ui-monospace,
    monospace;
  cursor: pointer;
  max-width: 100%;
}
.difficulty-bar #difficulty-hint {
  font-size: 10px;
  color: #afa5c2;
  line-height: 1.3;
}
@media (max-width: 700px) {
  .difficulty-bar {
    padding: 8px 10px;
    gap: 7px;
    flex-wrap: wrap;
  }
  .difficulty-bar label {
    font-size: 9px;
  }
  .difficulty-bar select {
    font-size: 11px;
    padding: 7px;
  }
  .difficulty-bar #difficulty-hint {
    flex: 1 1 100%;
    font-size: 9px;
  }
  .modal-shell {
    min-height: calc(100dvh - 16px);
  }
  .modal {
    padding: 8px;
  }
  .mobile-controls {
    padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  }
}

/* v2 release badge and safe touch targets. */
#version-label {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.mobile-controls {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.mobile-controls button {
  outline-offset: 2px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.mobile-controls button:focus-visible {
  outline: 3px solid var(--lime);
}

/* 2.1: TV focus, polished cabinet, safe canvas and fullscreen. */
:focus-visible {
  outline: 3px solid #ffe4a0;
  outline-offset: 5px;
}
#canvas {
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  outline-offset: -4px;
}
.modal-shell:fullscreen {
  background: #100d20;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
}
.modal-shell:fullscreen .game-frame {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}
.game-card:focus-within {
  border-color: #ffe4a0;
  box-shadow: 0 0 0 2px #ffe4a044;
}
.card-art {
  box-shadow: inset 0 0 45px #0a082766;
}
.card-art:after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #00000012 3px 4px);
}
.game-top .game-actions {
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .game-top {
    gap: 8px;
  }
  .game-actions .small-btn {
    font-size: 10px;
    padding: 9px 7px;
  }
  .game-info {
    font-size: 11px;
  }
  .mobile-controls {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
}
@media (hover: none), (pointer: coarse) {
  .mobile-controls {
    display: flex;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card-art:after {
    display: none;
  }
}

.canvas-stats {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
}
.canvas-stats span:nth-child(2) {
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-info > span {
  white-space: normal;
  text-align: right;
  font-size: 10px;
}
