@font-face {
  font-family: Fredoka;
  src: url("../assets/fonts/Fredoka.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --font-display: Fredoka, system-ui, sans-serif;
  --font-body: Fredoka, system-ui, sans-serif;
}
.logo,
.turn,
.win-title,
.play {
  font-weight: 700;
}
button {
  touch-action: manipulation;
}
.menu-screen button {
  scroll-margin-block: 16px;
}
button:focus-visible {
  outline: 3px solid #7566ba;
  outline-offset: 4px;
}
.game-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 12px auto 0;
}
.game-modes button {
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  background: #ece8f7;
  color: #746c9d;
  font: 600 14px var(--font-body);
  cursor: pointer;
}
.game-modes button[aria-pressed="true"] {
  color: #534b8e;
  background: #fff;
  box-shadow:
    0 2px 0 #cfc9e9,
    0 3px 8px #69609926;
}
.game-mode-description {
  font: 500 13px/1.3 var(--font-body);
  color: #8b84aa;
  margin: 8px 0 0;
}
.custom-rules {
  margin: 10px 0;
  border-radius: 14px;
  background: #f0edf9;
  text-align: left;
  color: #625a91;
}
.custom-rules summary {
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}
.custom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px 14px;
}
.custom-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 500 13px/1.2 var(--font-body);
}
.custom-grid label:has(select) {
  align-items: flex-start;
  flex-direction: column;
}
.custom-grid select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d7d1eb;
  border-radius: 9px;
  background: #fff;
  color: #554e80;
  font: 600 13px var(--font-body);
}
.custom-grid input {
  width: 19px;
  height: 19px;
  accent-color: #8173bf;
  flex: none;
}
.custom-grid label:has(input:disabled) {
  opacity: 0.85;
}
.custom-done {
  display: block;
  margin: 0 auto 12px;
  border: 0;
  border-radius: 12px;
  background: #d9d3ef;
  color: #544e87;
  padding: 12px 18px;
  font: 700 13px var(--font-body);
  cursor: pointer;
}
@media (max-width: 700px) {
  .game-modes button {
    font-size: 11px;
    min-height: 38px;
  }
  .game-modes {
    gap: 3px;
  }
  .game-mode-description {
    font-size: 11px;
  }
  .custom-grid label {
    font-size: 12px;
  }
}
body.menu-open .top {
  visibility: hidden;
}
.menu-screen {
  padding: 12px;
  background: #0d1d501c;
  align-items: safe center;
  overflow-x: hidden;
}
.menu-shell {
  position: relative;
  isolation: isolate;
  width: min(660px, 100%);
  text-align: center;
  color: #434276;
  animation: menu-arrive 0.6s cubic-bezier(0.18, 0.9, 0.22, 1.15) both;
}
.menu-frame {
  position: absolute;
  z-index: -1;
  inset: 140px 0 0;
  width: 100%;
  height: calc(100% - 140px);
  pointer-events: none;
}
.menu-brand {
  display: flex;
  align-items: end;
  justify-content: center;
  margin: 0;
  line-height: 1;
}
.menu-brand img {
  display: block;
  width: 460px;
  max-width: 80%;
  height: auto;
  animation: menu-mascot 5.5s ease-in-out infinite;
  transform-origin: center 88%;
  filter: drop-shadow(0 5px 3px #75639415);
}
.menu-body {
  padding: 2px 38px 42px;
}
.menu-tagline {
  margin: 0;
  color: #8b88b9;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
}
.mode-switch {
  display: flex;
  gap: 8px;
  padding: 4px;
  margin: 14px auto 0;
  max-width: 400px;
  border-radius: 18px;
  background: #ebe9f7;
  box-shadow: inset 0 2px 3px #a6a0c71c;
}
.mode-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  border: 0;
  border-radius: 14px;
  min-height: 36px;
  padding: 6px 9px;
  background: transparent;
  font: 600 15px/1.15 var(--font-body);
  color: #8580ac;
  cursor: pointer;
  transition:
    transform 0.18s,
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}
.mode-switch button[aria-pressed="true"] {
  background: #fff;
  color: #5e568e;
  box-shadow: 0 3px 7px #6e609a20;
}
.mode-switch button:hover {
  transform: translateY(-1px);
}
.mode-switch svg {
  width: 19px;
  height: 19px;
  display: block;
}
.menu-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  font-size: 25px;
  line-height: 1.2;
  margin: 16px 0 12px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.menu-heading svg {
  display: block;
  width: 27px;
  height: 27px;
  color: #f283a0;
  transform: rotate(-14deg);
}
.menu-heading > span:last-child svg {
  transform: rotate(14deg);
}
.menu-screen .seats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}
.menu-screen .seat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  min-width: 0;
  height: 168px;
  padding: 8px 5px 7px;
  border-radius: 24px;
  border: 2px solid #ffffff80;
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--sc), white 30%),
    color-mix(in srgb, var(--sc), white 10%)
  );
  color: #1e1e3c;
  box-shadow:
    inset 0 2px 1px #ffffff66,
    inset 0 -5px 0 #0000000a,
    0 4px 0 color-mix(in srgb, var(--sc), #d7c9de 45%),
    0 7px 9px #5e506b12;
  font-family: var(--font-body);
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.16s,
    box-shadow 0.16s,
    filter 0.16s;
}
.menu-screen .seat:hover {
  transform: translateY(-5px);
  filter: brightness(1.035);
  box-shadow:
    inset 0 2px 1px #ffffff88,
    inset 0 -5px 0 #00000008,
    0 7px 0 color-mix(in srgb, var(--sc), #d7c9de 45%),
    0 13px 12px #5e506b18;
}
.menu-screen .seat:active {
  transform: translateY(3px) scale(0.97);
}
.menu-screen .seat-cat {
  display: block;
  width: 108px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 224/180;
  flex: none;
  transition: transform 0.2s;
  filter: drop-shadow(0 2px 1px #65415820);
}
.menu-screen .seat:hover .seat-cat {
  transform: translateY(-2px) rotate(-3deg);
}
.menu-screen .seat b {
  display: block;
  font: 700 22px/1.08 var(--font-body);
  letter-spacing: -0.35px;
  white-space: nowrap;
  margin: 1px 0 0;
}
.menu-screen .seat small {
  font-size: 14px;
  font-weight: 500;
  margin: 1px 0 0;
  line-height: 1.2;
  opacity: 0.95;
}
.seat-state {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  height: 23px;
}
.menu-screen .seat-state svg {
  width: 22px;
  height: 22px;
}
.menu-screen .seat.off {
  background: #e4e2ed;
  box-shadow:
    inset 0 2px 1px #fff8,
    inset 0 -5px 0 #76729012,
    0 4px 0 #ccc8df;
  color: #514c75;
}
.menu-screen .seat.off .seat-cat {
  filter: grayscale(1);
  opacity: 0.48;
}
.selection-tip {
  font-size: 13px;
  color: #9a93b6;
  line-height: 1.25;
  margin: 9px 0 0;
  font-weight: 500;
}
.menu-screen .warn {
  margin: 6px 0 0;
  min-height: 0;
  font: 600 14px/1.3 var(--font-body);
  color: #bb4970;
}
.menu-screen .warn:empty {
  display: none;
}
.menu-play {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 19px;
  width: 100%;
  height: 104px;
  border: 0;
  padding: 0 55px 5px;
  margin: 8px 0 0;
  background: linear-gradient(180deg, #ffe988 0%, #ffc73d 48%, #f7a61b 100%);
  border: 3px solid #fff1bc;
  border-radius: 999px;
  box-shadow: 0 6px 0 #c77a16, 0 12px 22px #3e397b44, inset 0 2px 0 #fff9;
  color: #754000;
  font: 700 34px/1 var(--font-body);
  cursor: pointer;
  filter: drop-shadow(0 4px 3px #bd7c2020);
  transition:
    transform 0.17s,
    filter 0.17s;
  transform-origin: center 60%;
}
.menu-play svg {
  width: 35px;
  height: 40px;
  display: block;
  transition: transform 0.2s;
}
.menu-play:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.015);
  filter: brightness(1.045) drop-shadow(0 8px 5px #bd7c202c);
}
.menu-play:hover .play-icon svg {
  transform: translateX(3px);
}
.menu-play:active:not(:disabled) {
  transform: translateY(4px) scale(0.98);
  filter: brightness(0.98);
}
.menu-play:disabled {
  filter: grayscale(0.8) opacity(0.65);
  cursor: not-allowed;
}
.menu-resume {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 4px auto 2px;
  padding: 9px 18px;
  border: 0;
  border-radius: 16px;
  background: #e8e3f6;
  color: #676099;
  font: 600 16px/1.2 var(--font-body);
  cursor: pointer;
  transition:
    background 0.18s,
    transform 0.18s;
}
.menu-resume:hover {
  background: #ded7ef;
  transform: translateY(-1px);
}
.menu-resume svg {
  display: block;
  width: 15px;
  height: 15px;
}
/* End of css/menu.css */
