:root {
  color-scheme: dark;
  --bg: #080816;
  --panel: #101122;
  --panel-soft: #17182b;
  --tile-off: #0b0b19;
  --tile-on: #f61e75;
  --tile-border: #e00035;
  --text: #f7f7fb;
  --muted: #a9a9bd;
  --line: #2a2c46;
  --good: #55e6a5;
  --warn: #ffcc66;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(246, 30, 117, 0.16), transparent 32rem),
    linear-gradient(135deg, #080816 0%, #111123 54%, #090914 100%);
  color: var(--text);
}

.logout-button {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 40;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 17, 34, 0.88);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.logout-button:hover,
.logout-button:focus-visible {
  border-color: var(--tile-border);
  background: rgba(23, 24, 43, 0.96);
  color: var(--text);
  outline: none;
}

.logout-button.is-hidden {
  display: none;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
  animation: screenIn 260ms ease both;
}

.topbar {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.topbar--game {
  justify-content: flex-start;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 4rem);
  line-height: 1;
}

.license-screen {
  min-height: calc(100vh - 56px);
  place-items: center;
}

.license-screen.is-active {
  display: grid;
}

.license-panel {
  width: min(92vw, 560px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 17, 34, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.license-form {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.license-form label {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.license-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.license-row input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080914;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  outline: none;
}

.license-row input:focus {
  border-color: var(--tile-border);
}

.license-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.license-message.is-error {
  color: var(--warn);
}

.license-message.is-ok {
  color: var(--good);
}

.category-list,
.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.category-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 152px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 17, 34, 0.94);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.category-card:hover,
.category-card:focus-visible {
  border-color: var(--tile-border);
  background: rgba(23, 24, 43, 0.98);
  transform: translateY(-2px);
  outline: none;
}

.category-card--locked {
  cursor: default;
  opacity: 0.58;
}

.category-card--locked:hover {
  border-color: var(--line);
  transform: none;
}

.onbeat-logo {
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.onbeat-logo img,
.server77-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-card__empty {
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070711;
  color: var(--muted);
  font-size: 2rem;
}

.category-card__content {
  display: grid;
  gap: 8px;
}

.category-card__title {
  font-size: 1.6rem;
  font-weight: 800;
}

.category-card__meta {
  color: var(--muted);
  line-height: 1.45;
}

.server77-logo {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.45));
}

.server77-logo--large {
  width: min(70vw, 300px);
  height: min(70vw, 300px);
}

.playlife-logo {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.45));
}

.playlife-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.playlife-logo--large {
  width: min(78vw, 320px);
  height: min(78vw, 320px);
}

.empty-category {
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-category p {
  margin: 0;
  font-weight: 800;
}

.game-card {
  display: grid;
  grid-template-columns: 94px 1fr;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 17, 34, 0.94);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  border-color: var(--tile-border);
  background: rgba(23, 24, 43, 0.98);
  transform: translateY(-2px);
  outline: none;
}

.category-card,
.game-card {
  animation: cardIn 320ms ease both;
}

.category-card:nth-child(2),
.game-card:nth-child(2) {
  animation-delay: 45ms;
}

.category-card:nth-child(3),
.game-card:nth-child(3) {
  animation-delay: 90ms;
}

.game-card--locked {
  cursor: default;
  opacity: 0.58;
}

.game-card--locked:hover {
  border-color: var(--line);
  transform: none;
}

.game-card__preview {
  display: grid;
  place-items: center;
  width: 94px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #070711;
  border: 1px solid var(--line);
}

.game-card__preview--empty::before {
  content: "+";
  color: var(--muted);
  font-size: 2rem;
}

.beat-preview {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 10px;
}

.beat-preview__key {
  display: grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border: 2px solid #b40846;
  background: var(--tile-on);
  color: #17101a;
  font-weight: 900;
  font-size: 0.82rem;
}

.beat-preview__bar {
  position: relative;
  display: block;
  width: 34px;
  height: 24px;
  border: 2px solid #b40846;
}

.fifteen-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 10px;
}

.fifteen-preview span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--tile-border);
  background: var(--tile-on);
  color: #160712;
  font-size: 0.68rem;
  font-weight: 900;
}

.fifteen-preview .empty {
  background: var(--tile-off);
}

.keyboard-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 11px;
}

.keyboard-preview span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #526078;
  border-radius: 3px;
  background: #162036;
  color: #aab4ca;
  font-size: 0.72rem;
  font-weight: 900;
}

.keyboard-preview .is-active {
  border-color: var(--tile-on);
  background: linear-gradient(145deg, #4b092b, #9b0b45);
  color: var(--tile-on);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 68px;
  gap: 3px;
}

.mini-grid span {
  aspect-ratio: 1;
  border: 1px solid var(--tile-border);
  background: var(--tile-off);
}

.mini-grid .on {
  background: var(--tile-on);
}

.game-card__content {
  display: grid;
  gap: 8px;
}

.game-card__title {
  font-size: 1.4rem;
  font-weight: 800;
}

.game-card__meta {
  color: var(--muted);
  line-height: 1.45;
}

.icon-button,
.primary-button,
.start-button,
.reset-button,
.segment {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.icon-button {
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
}

.control-panel {
  position: relative;
  z-index: 25;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 17, 34, 0.9);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 76px);
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: #080914;
  border: 1px solid var(--line);
}

.segment {
  height: 40px;
  background: transparent;
}

.segment.is-selected {
  border-color: var(--tile-border);
  background: var(--tile-on);
  color: white;
  font-weight: 800;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.stat {
  display: grid;
  min-width: 92px;
  gap: 3px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.stat span {
  color: var(--muted);
  font-size: 0.78rem;
}

.stat strong {
  font-size: 1.25rem;
}

.primary-button {
  height: 44px;
  padding: 0 18px;
  background: var(--panel-soft);
  font-weight: 800;
}

.start-button {
  height: 44px;
  padding: 0 22px;
  border-color: var(--tile-border);
  background: var(--tile-on);
  font-weight: 800;
}

.reset-button {
  height: 44px;
  padding: 0 18px;
  background: var(--panel-soft);
  font-weight: 800;
}

.board-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.message {
  min-height: 26px;
  color: var(--muted);
  font-weight: 700;
}

.message.is-win {
  color: var(--good);
}

.message.is-timeout {
  color: var(--warn);
}

.board {
  --size: 7;
  display: grid;
  grid-template-columns: repeat(var(--size), 1fr);
  gap: clamp(3px, 0.8vw, 6px);
  width: min(92vw, 620px);
  aspect-ratio: 1;
  padding: clamp(6px, 1vw, 10px);
  border: 1px solid #16172a;
  border-radius: 8px;
  background: #05050d;
}

.board.is-awaiting {
  place-items: center;
}

.beat-screen {
  min-height: calc(100vh - 56px);
}

.beat-stage {
  position: relative;
  min-height: calc(100vh - 56px);
}

.beat-topbar {
  position: relative;
  z-index: 25;
}

.beat-hack {
  position: relative;
  width: min(96vw, 560px);
  padding: 7px 9px;
  border-radius: 5px;
  background: rgba(28, 27, 29, 0.9);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.36);
}

.beat-area {
  position: relative;
  display: grid;
  justify-content: center;
  margin-top: 22px;
}

.fifteen-panel {
  display: none;
}

.fifteen-area {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.fifteen-hack {
  width: min(94vw, 640px);
  padding: 14px;
  border-radius: 4px;
  background: #15142d;
  border: 1px solid rgba(33, 31, 69, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.fifteen-hack__header {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--tile-on);
  font-weight: 900;
}

.fifteen-hack__icon {
  display: grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border-radius: 5px;
  background: #2c2d48;
  color: var(--tile-on);
  font-size: 0.8rem;
}

.fifteen-hack__desc {
  margin: 18px 0 16px;
  color: #b6b8cd;
  font-weight: 800;
}

.fifteen-hack__panel {
  padding: 14px 14px 12px;
  background: #080819;
}

.fifteen-stats {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 7vw, 54px);
  margin-bottom: 24px;
  text-align: center;
}

.fifteen-stats span {
  display: block;
  color: #c0c2d8;
  font-weight: 800;
}

.fifteen-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--tile-on);
  font-size: 1.25rem;
  font-weight: 900;
}

.fifteen-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  width: min(78vw, 360px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  border-radius: 4px;
  background: transparent;
}

.fifteen-tile {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--tile-on);
  border-radius: 5px;
  background: linear-gradient(145deg, #4b092b, #7b0738);
  color: var(--tile-on);
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 900;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, background 120ms ease;
}

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

.fifteen-tile:active {
  transform: scale(0.96);
}

.fifteen-tile.is-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.fifteen-help {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: #b6b8cd;
  font-size: 0.92rem;
}

.fifteen-help__keys {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 26px;
  border: 1px solid var(--tile-on);
  border-radius: 4px;
  background: rgba(246, 30, 117, 0.12);
  color: var(--tile-on);
  font-weight: 900;
}

.fifteen-help__sub {
  margin: 7px 0 0;
  color: #858aa6;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.keyboard-area {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.keyboard-hack {
  width: min(94vw, 640px);
  padding: 14px;
  border-radius: 4px;
  background: #15142d;
  border: 1px solid rgba(33, 31, 69, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.keyboard-hack__header {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--tile-on);
  font-weight: 900;
}

.keyboard-hack__icon {
  display: grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border-radius: 5px;
  background: #2c2d48;
  color: var(--tile-on);
  font-size: 0.8rem;
}

.keyboard-hack__desc {
  margin: 18px 0 16px;
  color: #b6b8cd;
  font-weight: 800;
}

.keyboard-hack__panel {
  padding: 16px 14px 12px;
  background: #080819;
}

.keyboard-sequence {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(70vw, 250px);
  margin: 0 auto 34px;
  padding: 18px 32px;
  border: 2px solid rgba(246, 30, 117, 0.75);
  border-radius: 5px;
  background: radial-gradient(circle at center, rgba(0, 174, 255, 0.12), rgba(13, 25, 46, 0.58));
}

.keyboard-sequence span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #526078;
  border-radius: 3px;
  background: #121c30;
  color: #728098;
  font-size: 1.2rem;
  font-weight: 900;
}

.keyboard-sequence .is-current {
  border-color: var(--tile-on);
  background: rgba(246, 30, 117, 0.14);
  color: var(--tile-on);
}

.keyboard-sequence .is-complete {
  border-color: var(--good);
  background: rgba(85, 230, 165, 0.12);
  color: var(--good);
}

.keyboard-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 18px;
  width: min(70vw, 224px);
  margin: 0 auto;
}

.keyboard-key-wrap {
  position: relative;
  display: grid;
  gap: 6px;
}

.keyboard-key {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid #526078;
  border-radius: 6px;
  background: #152035;
  color: #a8b3ca;
  font-size: 1.55rem;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}

.keyboard-key.is-target,
.keyboard-key.is-held {
  border-color: var(--tile-on);
  background: linear-gradient(145deg, #4b092b, #8b083e);
  color: var(--tile-on);
}

.keyboard-key:active {
  transform: scale(0.96);
}

.keyboard-timing {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #263149;
  opacity: 0;
}

.keyboard-key-wrap.is-target .keyboard-timing {
  opacity: 1;
}

.keyboard-zone {
  position: absolute;
  top: 0;
  left: 48%;
  width: 17%;
  height: 100%;
  background: #11d86f;
}

.keyboard-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--tile-on);
  transform: translateX(-100%);
}

.keyboard-key-wrap.is-held .keyboard-cursor {
  animation: keyboardTiming 950ms linear infinite;
}

.keyboard-stats {
  display: flex;
  justify-content: center;
  gap: clamp(34px, 8vw, 62px);
  margin: 28px 0 0;
  text-align: center;
}

.keyboard-stats span {
  display: block;
  color: #9fa5bd;
  font-weight: 800;
}

.keyboard-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--tile-on);
  font-size: 1rem;
  font-weight: 900;
}

.keyboard-help {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin-top: 32px;
  color: #9da4bd;
  font-size: 0.88rem;
  font-weight: 800;
}

@keyframes keyboardTiming {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.hack-result {
  min-height: 28px;
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
}

.hack-result.is-success {
  color: var(--good);
}

.hack-result.is-fail {
  color: var(--warn);
}

.beat-hack__hud {
  display: none;
  justify-content: space-between;
  margin: 0 3px 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 800;
}

.beat-hack__row {
  display: block;
  height: 48px;
}

.beat-key {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 18px;
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  border: 2px solid #a6073e;
  background: var(--tile-on);
  color: #1d0b16;
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

.beat-track {
  position: relative;
  width: 100%;
  height: 48px;
  overflow: hidden;
}

.beat-zone {
  position: absolute;
  top: 0;
  left: 60%;
  width: 52px;
  height: 48px;
  border: 3px solid #a6073e;
  background: rgba(246, 30, 117, 0.04);
}

.beat-hack.is-hit .beat-zone {
  background: rgba(85, 230, 165, 0.32);
  border-color: var(--good);
}

.beat-hack.is-miss .beat-zone {
  background: rgba(255, 204, 102, 0.28);
  border-color: var(--warn);
}

.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(5, 5, 13, 0.72);
  opacity: 1;
  visibility: visible;
  will-change: opacity;
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0ms linear 0ms;
}

.start-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0ms linear 520ms;
}

.start-overlay.is-leaving {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transition: opacity 640ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0ms linear 640ms;
}

.overlay-start-button {
  min-width: 150px;
  height: 52px;
  padding: 0 28px;
  border: 2px solid var(--tile-border);
  border-radius: 8px;
  background: var(--tile-on);
  color: white;
  font-weight: 900;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  animation: startButtonIn 280ms ease both;
  transition: transform 140ms ease, filter 140ms ease;
}

.overlay-start-button:hover,
.overlay-start-button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
  outline: none;
}

.overlay-start-button:active {
  transform: translateY(0) scale(0.98);
}

.overlay-start-button.is-preparing {
  min-width: 210px;
  pointer-events: none;
  filter: brightness(1.08);
}

.time-progress {
  width: min(92vw, 620px);
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(224, 0, 53, 0.75);
  border-radius: 999px;
  background: rgba(7, 7, 17, 0.86);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.time-progress.is-hidden {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

.time-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--tile-on), #ff6aa8);
  box-shadow: 0 0 14px rgba(246, 30, 117, 0.68);
  transform-origin: left center;
  transform: scaleX(1);
  transition: none;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes startButtonIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

.tile {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--tile-border);
  border-radius: 0;
  background: var(--tile-off);
  cursor: pointer;
  transition: background 90ms ease, transform 90ms ease;
}

.tile.is-on {
  background: var(--tile-on);
}

.tile:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.tile:active {
  transform: scale(0.95);
}

.board.is-finished .tile {
  cursor: default;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100vw - 20px, 620px);
    padding: 18px 0;
  }

  .control-panel {
    grid-template-columns: 1fr;
  }

  .segmented {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    justify-content: stretch;
  }

  .stat {
    flex: 1;
  }

  .primary-button {
    width: 100%;
  }

  .start-button {
    width: 100%;
  }

  .reset-button {
    width: 100%;
  }

  .beat-hack__row {
    height: 40px;
  }

  .beat-key {
    left: 12px;
    width: 38px;
  }

  .beat-track {
    height: 40px;
  }

  .beat-zone {
    width: 42px;
    height: 40px;
  }

  .beat-needle {
    top: 18px;
    width: 54px;
  }

  .category-card {
    grid-template-columns: 82px 1fr;
    min-height: 122px;
    padding: 14px;
  }

  .onbeat-logo,
  .category-card__empty,
  .server77-logo {
    width: 82px;
  }

  .server77-logo,
  .playlife-logo {
    height: 82px;
  }

  .server77-logo__numbers {
    top: 16px;
    font-size: 3.1rem;
    letter-spacing: -5px;
  }

  .server77-logo__rp {
    top: 28px;
    font-size: 2.45rem;
  }

  .server77-logo__server {
    left: 5px;
    bottom: 9px;
    font-size: 1.45rem;
  }


  .onbeat-logo {
    border-width: 13px;
  }

  .onbeat-logo__letter {
    font-size: 3.9rem;
  }

  .onbeat-logo::before,
  .onbeat-logo::after {
    width: 24px;
    height: 13px;
    right: 3px;
  }

  .game-card {
    grid-template-columns: 74px 1fr;
    min-height: 112px;
    padding: 14px;
  }

  .license-row {
    grid-template-columns: 1fr;
  }

  .license-row .overlay-start-button {
    width: 100%;
  }

  .game-card__preview {
    width: 74px;
  }

  .mini-grid {
    width: 52px;
  }
}
