@font-face {
  font-family: DM;
  src: url("./assets/fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("./assets/fonts/barlow-condensed.woff2") format("woff2");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}
:root {
  --bg: #f8f7f2;
  --ink: #172d28;
  --muted: #57665d;
  --border: #dcdfd5;
  --lime: #d7f778;
  --orange: #e75d37;
  font:
    16px/1.5 DM,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  cursor: pointer;
  background: none;
}
button:disabled {
  opacity: 0.47;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #dc632c;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(1320px, 91%);
  margin: auto;
}
header {
  border-bottom: 1px solid var(--border);
  background: #fcfbf7;
}
.top {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand,
nav,
nav a,
.play,
.lib-title,
.filters,
.feature-label,
.soft,
.guide-icon {
  display: flex;
  align-items: center;
}
.brand {
  gap: 10px;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -1.45px;
}
.mark {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--lime);
  display: grid;
  place-items: center;
}
.mark i {
  width: 26px;
  height: 26px;
}
i[data-icon] {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: none;
}
i canvas {
  width: 100%;
  height: 100%;
}
nav {
  gap: 12px;
}
nav a {
  gap: 7px;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 650;
}
nav a[aria-current="page"] {
  background: #e8ebdf;
}
nav small {
  font:
    600 10px/1.2 ui-monospace,
    monospace;
  background: #dfe4d9;
  padding: 3px 5px;
  border-radius: 5px;
}
.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  margin: 24px 0 0;
  border-radius: 17px;
  height: clamp(314px, 27vw, 390px);
  background: #173a38;
  color: #fff9e9;
}
.hero > img,
.shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.shade {
  z-index: -1;
  background: linear-gradient(90deg, #091d19c4, #0b211c75 37%, transparent 69%);
}
.hero-copy {
  position: absolute;
  left: clamp(25px, 4.2vw, 69px);
  top: 50%;
  transform: translateY(-50%);
  max-width: 51%;
}
.feature-label,
.kicker,
.card-tag {
  font:
    700 10px/1.3 ui-monospace,
    Consolas,
    monospace;
  letter-spacing: 1.45px;
  text-transform: uppercase;
}
.feature-label {
  gap: 8px;
  color: #ecf3da;
}
.feature-label span {
  width: 7px;
  height: 7px;
  background: var(--lime);
  border-radius: 50%;
}
.hero h1,
.game-head h1,
.cover h2 {
  font:
    italic 800 clamp(68px, 6.8vw, 106px) / 0.92 Barlow,
    Impact,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.024em;
  margin: 12px 0 11px;
}
.hero p {
  margin: 0 0 23px;
  font-size: 16px;
  font-weight: 480;
  max-width: 365px;
  color: #f1f2e6;
}
.play {
  background: var(--lime);
  color: #1a2c24;
  border: 1px solid #bcd965;
  border-radius: 8px;
  gap: 9px;
  justify-content: center;
  padding: 10px 18px;
  width: fit-content;
  min-height: 43px;
  font-size: 14px;
  font-weight: 780;
}
.play:hover {
  background: #e4ff9a;
}
.play i {
  width: 14px;
  height: 14px;
}
.carousel {
  position: absolute;
  right: 21px;
  bottom: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ffffff50;
  border-radius: 20px;
  padding: 1px 3px;
  background: #112e2ad9;
  color: #fff;
  font: 600 11px/1 monospace;
}
.carousel button {
  color: white;
  min-width: 28px;
  height: 28px;
  padding: 0;
  font: 23px/1 Arial;
}
.library-head,
.game-head,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.library-head {
  margin: 32px 0 19px;
  flex-wrap: wrap;
}
.lib-title {
  gap: 10px;
}
.section-line {
  height: 24px;
  width: 4px;
  background: var(--orange);
  transform: skew(-8deg);
  border-radius: 2px;
}
.lib-title h2,
.guide h2 {
  font-size: 28px;
  letter-spacing: -1.2px;
  line-height: 1.2;
  margin: 0;
  font-weight: 780;
}
.lib-title > span:last-child {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font: 600 11px/1.2 monospace;
}
.filters {
  gap: 5px;
  flex-wrap: wrap;
}
.filters button,
.soft,
.actions button,
.actions select {
  min-height: 33px;
  border-radius: 18px;
  padding: 6px 13px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 650;
  background: #fbfbf6;
}
.filters button[aria-pressed="true"],
.actions button.selected {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.filters button:hover:not([aria-pressed="true"]),
.soft:hover,
.actions button:hover:not(:disabled) {
  background: #eaf0df;
  color: var(--ink);
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 23px 17px;
}
.card {
  border: 1px solid #d6dccf;
  border-radius: 12px;
  background: #fefef9;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.18s,
    transform 0.18s;
}
.card:hover {
  box-shadow: 0 5px 14px #19342518;
  transform: translateY(-2px);
}
.card a {
  display: block;
  height: 100%;
}
.card img {
  width: 100%;
  aspect-ratio: 1.78;
  object-fit: cover;
  display: block;
  background: #d5e2d8;
}
.card-info {
  padding: 13px 15px 15px;
}
.card-tag {
  font-size: 9px;
  letter-spacing: 1.05px;
  color: #53665d;
}
.card h3 {
  font-size: 21px;
  line-height: 1.12;
  letter-spacing: -0.8px;
  margin: 5px 0 6px;
}
.card p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.save-card {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 30px;
  height: 30px;
  background: #13352dd9;
  color: white;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff60;
  border-radius: 50%;
}
.save-card i {
  width: 14px;
  height: 14px;
}
.save-card.saved {
  background: var(--lime);
  color: var(--ink);
}
footer {
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 19px 0 28px;
  color: var(--muted);
  font-size: 12px;
}
footer.wrap {
  margin-top: 35px;
}
footer span {
  font-weight: 750;
}
footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.back {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.game-head {
  margin: 11px 0 18px;
}
.game-head h1 {
  font-size: clamp(43px, 5vw, 72px);
  margin: 0;
}
.kicker {
  margin: 0 0 6px;
  color: #576a5d;
}
.soft {
  gap: 6px;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 23%);
  gap: 18px;
  align-items: start;
}
.cabinet,
.guide {
  border: 1px solid var(--border);
  background: #fcfcf6;
  border-radius: 13px;
  overflow: hidden;
}
#stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 900/510;
  overflow: hidden;
  background: #254741;
  touch-action: none;
  user-select: none;
}
#stage > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#screen {
  z-index: 1;
}
.cover {
  position: absolute;
  inset: 0;
  background: #091f2066;
  z-index: 3;
  display: grid;
  place-items: center;
  text-align: center;
  color: white;
}
.cover > div {
  border-radius: 12px;
  padding: 17px 22px;
  background: #16342ef2;
  border: 1px solid #ffffff52;
  max-width: 85%;
}
.cover h2 {
  font-size: 38px;
  margin: 0 0 8px;
}
.cover p {
  margin: 0 auto 11px;
  font-size: 13px;
  color: #f3f1df;
}
.cover .play {
  margin: auto;
}
.toolbar {
  padding: 10px 13px;
}
.tools,
#stats,
.actions,
.actions label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tools {
  flex-wrap: nowrap;
}
.tools button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  place-items: center;
}
.tools button i {
  width: 15px;
  height: 15px;
}
#stats {
  gap: 15px;
}
#stats span {
  display: flex;
  flex-direction: column;
  font: 600 9px/1.3 monospace;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
#stats b {
  font:
    750 16px/1.2 DM,
    sans-serif;
  color: var(--ink);
  letter-spacing: 0;
}
.guide {
  padding: 20px;
}
.guide-icon {
  background: #e7eece;
  width: 34px;
  height: 34px;
  justify-content: center;
  border-radius: 8px;
  margin-bottom: 13px;
}
.guide h2 {
  font-size: 21px;
}
.guide p,
#message,
#extra {
  font-size: 14px;
  color: var(--muted);
}
.inputs {
  border-top: 1px solid var(--border);
  padding-top: 11px;
}
.guide .inputs,
#best-line {
  font-size: 12px;
}
#best-line {
  font-weight: 700;
}
.actions {
  margin-top: 14px;
}
.actions button {
  border-radius: 7px;
  min-height: 37px;
}
.actions label {
  font-size: 12px;
  font-weight: 650;
}
.actions input {
  accent-color: #537944;
  max-width: 130px;
}
.actions button[data-hold] {
  touch-action: none;
  user-select: none;
  min-width: 53px;
}
.actions button:active:not(:disabled) {
  background: var(--lime);
}
#message {
  margin: 11px 0;
}
#extra img {
  width: 120px;
  margin-right: 6px;
  border: 5px solid #fffcf1;
  box-shadow: 0 1px 4px #21352a42;
}
.credit {
  max-width: 750px;
  margin: 45px auto;
  padding: 0 20px;
}
.credit a {
  text-decoration: underline;
}
@media (max-width: 1000px) {
  .wrap {
    width: 94%;
  }
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero {
    height: 315px;
  }
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 210px;
  }
}
@media (max-width: 760px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .top {
    height: 57px;
  }
  .hero {
    margin-top: 14px;
    height: 290px;
  }
  .library-head {
    margin: 23px 0 13px;
    gap: 11px;
  }
  .filters {
    gap: 4px;
  }
  .filters button {
    padding: 5px 10px;
  }
  .lib-title h2 {
    font-size: 24px;
  }
  .play-layout {
    display: flex;
    flex-direction: column;
  }
  .cabinet,
  .guide {
    width: 100%;
  }
  .guide {
    padding: 12px 15px;
    order: 2;
  }
  .guide p {
    margin: 6px 0;
  }
  .guide-icon {
    display: none;
  }
  .guide h2 {
    font-size: 17px;
  }
  .inputs {
    padding-top: 6px;
  }
  #player {
    display: flex;
    flex-direction: column;
  }
  .play-layout {
    display: contents;
  }
  .guide {
    order: 3;
    margin-top: 8px;
  }
  #extra {
    order: 4;
  }
  .hero-copy {
    max-width: 73%;
  }
  .hero h1 {
    font-size: 61px;
  }
  .hero p {
    font-size: 14px;
    max-width: 255px;
  }
  .brand {
    font-size: 20px;
  }
  .card-info {
    padding: 9px 10px 12px;
  }
  .card h3 {
    font-size: 17px;
  }
  .card p {
    font-size: 12px;
  }
  .card-tag {
    font-size: 8px;
  }
  .soft {
    white-space: nowrap;
  }
  .actions button {
    min-height: 42px;
  }
  nav {
    gap: 1px;
  }
  nav a {
    padding: 7px 9px;
  }
  .toolbar {
    padding: 7px;
  }
  #stats {
    gap: 8px;
  }
  .tools {
    gap: 3px;
  }
}
@media (max-width: 440px) {
  .hero {
    height: 256px;
  }
  .hero-copy {
    left: 18px;
    max-width: 75%;
  }
  .hero-copy p {
    max-width: 205px;
  }
  .hero img {
    object-position: 60% center;
  }
  .hero h1 {
    font-size: 54px;
  }
  .hero .play {
    min-height: 37px;
    padding: 7px 13px;
  }
  .carousel {
    right: 9px;
    bottom: 9px;
  }
  .card p {
    display: none;
  }
  .game-head h1 {
    font-size: 39px;
  }
  .cover h2 {
    font-size: 27px;
  }
  .cover p {
    font-size: 11px;
  }
  .cover > div {
    padding: 10px 13px;
  }
  .cover .play {
    min-height: 33px;
    padding: 6px 12px;
  }
  .lib-title {
    gap: 7px;
  }
  .library-head {
    align-items: start;
    flex-direction: column;
  }
  .filters button {
    font-size: 11px;
  }
  .top .mark {
    width: 30px;
    height: 30px;
  }
  #stats b {
    font-size: 13px;
  }
  .actions input {
    max-width: 98px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.district-settings {
  max-width: 900px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.district-settings summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}
.district-inputs,
.district-inputs form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.district-inputs {
  margin: 12px 0;
}
.district-inputs label {
  display: grid;
  gap: 4px;
  font-size: 12px;
}
.district-inputs input,
.district-inputs select,
.district-inputs button {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  background: #fcfbf6;
  color: #193d35;
}
.district-status {
  margin: 6px 0 0;
  color: #265046;
}
