.ng-game { font-family: var(--body-font); }
.ng-game button { touch-action: manipulation; }
.ng-mat {
  padding: clamp(20px, 3.2cqw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.ng-count-room, .ng-home-mat, .ng-fetch-shelf {
  --nr-unit: min(8.2cqw, 73px);
  --nr-thickness: clamp(15px, 2.1cqw, 23px);
  min-height: 210px;
}
.ng-count-frame {
  width: min(100%, calc(var(--nr-unit) * 10));
  margin-inline: auto;
}
.ng-count-track {
  width: calc(var(--nr-n) * var(--nr-unit));
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
}
.ng-touch-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--nr-n), minmax(0, 1fr));
  align-items: stretch;
}
.ng-touch {
  appearance: none;
  display: grid;
  place-items: end center;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: none;
}
.ng-touch:focus-visible { outline: 2px solid #614b24; outline-offset: 1px; z-index: 1; }
.ng-touch.ng-touched span {
  display: block;
  width: 8px;
  height: 8px;
  margin-bottom: 1px;
  border-radius: 50%;
  background: #3d5a40;
  box-shadow: 0 1px 0 rgb(255 255 255 / 70%);
}
.ng-given, .ng-placement, .ng-returned-rod {
  min-height: 68px;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.ng-placement {
  margin-top: 15px;
  border-top: 1px dashed #a8936e;
  padding-block: 12px 0;
}
.ng-space-label { font-size: 1rem; color: #5c5946; font-style: italic; }
.ng-paper-number {
  min-width: 54px;
  min-height: 61px;
  display: inline-grid;
  place-items: center;
  padding: .15rem .55rem;
  border: 1px solid #b8aa90;
  border-radius: 3px;
  background: linear-gradient(128deg, #fffdf7 10%, #f8f0dd 100%);
  box-shadow: 0 2px 4px rgb(88 67 31 / 17%);
  font: 400 2.5rem/1 var(--body-font);
  color: #273e30;
}
.ng-choice-panel { display: flex; flex-direction: column; justify-content: center; }
.ng-choice-panel .nr-numeral { width: 46px; min-height: 49px; }
.ng-rod-shelf { display: grid; }
.ng-shelf-rod {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 45px;
  padding: 0 4px;
  appearance: none;
  border: 1px solid transparent;
  border-bottom-color: rgb(118 89 47 / 17%);
  background: transparent;
  cursor: pointer;
  border-radius: 3px;
  text-align: left;
}
.ng-shelf-rod[aria-pressed="true"] {
  border: 1px solid #738365;
  background: rgb(255 253 240 / 65%);
}
.ng-fetch-shelf { padding: clamp(20px, 3cqw, 38px); min-height: auto; }
.ng-memory-card { padding: 10px 0 6px; }
.ng-home-mat .ng-paper-number { width: 76px; height: 86px; font-size: 3.2rem; }
.ng-card-back {
  background-color: #e6e1d0;
  background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgb(113 124 95 / 20%) 4px 5px),
                    repeating-linear-gradient(-45deg, transparent 0 4px, rgb(113 124 95 / 18%) 4px 5px);
  box-shadow: inset 0 0 0 5px #eae4d5, 0 2px 4px rgb(88 67 31 / 17%);
}
.ng-returned-rod { min-height: 53px; margin-top: .5rem; border-top: 1px dashed #a8936e; padding-top: 10px; }
.ng-game .nr-control:disabled { opacity: .53; cursor: default; }
@media (hover:hover) {
  .ng-shelf-rod:hover { background: rgb(255 250 235 / 58%); }
  .ng-touch:not(.ng-touched):hover { background: rgb(94 91 66 / 7%); }
}
@container (max-width: 700px) {
  .ng-mat { padding: 20px; }
  .ng-count-room, .ng-home-mat, .ng-fetch-shelf {
    --nr-unit: min(8cqw, 46px);
    --nr-thickness: clamp(13px, 2.8cqw, 18px);
  }
  .ng-count-room { --nr-unit: min(calc((100cqw - 44px) / 10), 46px); }
  .ng-count-room, .ng-home-mat { min-height: 175px; }
  .ng-choice-panel .nr-numerals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 325px; }
  .ng-choice-panel .nr-numeral { width: 100%; min-width: 0; }
}
@container (max-width: 320px) {
  .ng-mat, .ng-fetch-shelf { padding-inline: 14px; }
  .ng-count-room { --nr-unit: calc((100cqw - 32px) / 10); }
  .ng-choice-panel .nr-numerals { gap: 5px; }
}
