
.menu-shell:is([data-view="modes"], [data-view="players"], [data-view="ask"]) .menu-brand {
  display: none;
}
.menu-shell:is([data-view="modes"], [data-view="players"], [data-view="ask"]) .menu-body {
  flex: 0 1 auto;
  overflow: auto;
  padding: 22px 24px 24px;
  border-radius: 30px;
  background: #f9f8ff;
  box-shadow: 0 8px 0 #8e9bd566, 0 16px 42px #111b5966, inset 0 0 0 2px #fff;
}
.modes-more:not([hidden]) {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 0 0 24px 24px;
  background: #f9f8ff;
  color: #514987;
  box-shadow: 0 8px 0 #8e9bd566, 0 16px 42px #111b5966;
  font: 700 13px/1.2 var(--font-body);
  white-space: nowrap;
  pointer-events: none;
}
.menu-shell.modes-has-more .menu-body { border-radius: 30px 30px 0 0; }
#modeSetup,
#playerSetup,
#askLudo {
  flex: 0 0 auto;
  justify-content: flex-start;
}
#modeSetup .menu-heading {
  margin: 0 0 3px;
}
.mode-subtitle {
  margin: 0 0 16px;
  color: #7770a8;
  font-size: 15px;
  font-weight: 600;
}
.game-modes {
  width: 100%;
  gap: 10px;
}
.game-modes button {
  min-height: 100px;
  padding: 7px 16px 7px 10px;
  border-radius: 22px;
  box-shadow:
    0 3px 0 #d4c8e2,
    0 6px 13px #67558116;
}
.game-modes button img {
  width: 100px;
  height: 90px;
}
.game-modes button b {
  font-size: 22px;
}
.game-modes button small {
  font-size: 15px;
}
.game-modes button[data-game-mode="classic"] b {
  color: #c63768;
}
.game-modes button[data-game-mode="quick"] b {
  color: #388962;
}
.game-modes button[data-game-mode="teams"] b {
  color: #3775bd;
}
.game-modes button[data-game-mode="custom"] b {
  color: #b66a12;
}
.mode-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: #ded8f2;
  color: #665d9d;
}
.menu-shell[data-view="players"] .menu-body {
  padding-top: 24px;
}
.menu-shell[data-view="players"] .game-mode-description {
  margin: 0 0 16px;
  color: #5e588f;
  font-size: 16px;
  font-weight: 600;
}
.menu-shell[data-view="players"] .selection-tip {
  color: #746e9a;
  font-size: 14px;
}
.menu-shell[data-view="players"] .menu-play {
  margin-top: 14px;
}
@media (max-width: 700px) {
  .menu-shell:is(
    [data-view="home"],
    [data-view="modes"],
    [data-view="players"],
    [data-view="ask"]
  ) {
    width: min(440px, 100%);
    max-height: calc(100dvh - 72px);
    margin-top: 52px;
  }
  .menu-shell[data-view="home"] .menu-brand img {
    width: min(390px, 92vw);
  }
  .menu-shell[data-view="home"] .menu-body {
    width: 100%;
    box-sizing: border-box;
    padding: 0 12px;
  }
  .menu-shell[data-view="home"] .menu-tagline {
    font-size: 18px;
    margin: 0 0 20px;
  }
  .menu-shell:is([data-view="modes"], [data-view="players"], [data-view="ask"]) .menu-body {
    padding: 18px 16px 20px;
    border-radius: 24px;
  }
  #modeSetup .menu-heading {
    font-size: 22px;
    gap: 7px;
  }
  .mode-subtitle {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .game-modes {
    gap: 8px;
  }
  .game-modes button {
    min-height: 82px;
    padding: 5px 10px 5px 7px;
    gap: 8px;
  }
  .game-modes button img {
    width: 76px;
    height: 72px;
  }
  .game-modes button b {
    font-size: 18px;
  }
  .game-modes button small {
    font-size: 13px;
  }
  .mode-arrow {
    width: 32px;
    height: 32px;
    font-size: 24px;
  }
  .menu-shell[data-view="players"] .game-mode-description {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .menu-shell[data-view="players"] .selection-tip {
    font-size: 12px;
  }
}
@media (max-width: 420px) and (orientation: portrait) {
  .menu-shell[data-view="players"] .seats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .menu-shell[data-view="players"] .seat {
    height: 96px;
    padding: 5px;
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-rows: 34px 18px 18px;
    row-gap: 2px;
    column-gap: 3px;
    align-content: center;
    justify-items: start;
    text-align: left;
  }
  .menu-shell[data-view="players"] .seat-cat {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 68px;
    max-height: 68px;
    align-self: center;
  }
  .menu-shell[data-view="players"] .seat b {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
    line-height: 1.05;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .menu-shell[data-view="players"] .seat small {
    grid-column: 2;
    grid-row: 2;
    font-size: 13px;
  }
  .menu-shell[data-view="players"] .seat-state { grid-column: 2; grid-row: 3; }
  .menu-shell[data-view="players"] .seat .sym { position: absolute; right: 5px; top: 5px; }
}
@media (max-width: 340px) and (orientation: portrait) {
  .menu-shell[data-view="players"] .seat { grid-template-columns: 54px minmax(0, 1fr); }
  .menu-shell[data-view="players"] .seat-cat { width: 54px; max-height: 54px; }
}
@media (max-height: 700px) {
  .menu-shell[data-view="home"] .menu-brand img {
    width: min(360px, 65vh, 80vw);
  }
  .menu-shell[data-view="home"] .menu-tagline {
    margin-bottom: 10px;
  }
}
@media (min-width: 701px) and (max-height: 500px) {
  .menu-shell[data-view="home"] {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: min(780px, 100%);
  }
  .menu-shell[data-view="home"] .menu-brand {
    width: 48%;
  }
  .menu-shell[data-view="home"] .menu-brand img {
    width: 100%;
  }
  .menu-shell[data-view="home"] .menu-body {
    width: 52%;
    height: auto;
    padding: 0 20px;
  }
  .menu-shell:is([data-view="modes"], [data-view="players"], [data-view="ask"]) {
    width: min(760px, 100%);
  }
  .game-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .game-modes button {
    min-height: 75px;
  }
  .game-modes button img {
    width: 65px;
    height: 62px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .seat-zzz i {
    animation: none;
    opacity: 1;
  }
  .seat-zzz i:nth-child(1) {
    transform: translate(0, 0);
  }
  .seat-zzz i:nth-child(2) {
    transform: translate(7px, -12px);
  }
  .seat-zzz i:nth-child(3) {
    transform: translate(15px, -26px);
  }
}

/* A consistent, high-contrast back control stays at the start of every step. */
.menu-screen .menu-view > .menu-back {
  align-self: flex-start;
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  margin: 0 0 8px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 15px;
  background: #ded9f3;
  color: #514780;
  box-shadow: 0 3px 0 #bbb2dd;
  font-size: 0;
  line-height: 1;
}
.menu-screen .menu-view > .menu-back::before {
  content: "←";
  font: 700 29px/1 var(--font-body);
}
.menu-screen .menu-view > .menu-back:hover {
  background: #d0c9ed;
  transform: translateY(-2px);
}
.tutorial-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  margin: 0 0 12px;
  padding: 8px 14px;
  border: 2px solid #fff;
  border-radius: 17px;
  background: #e5dff8;
  color: #504681;
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: 0 3px 0 #c8bfdf;
  transition:
    transform 0.16s,
    background 0.16s;
}
.tutorial-entry:hover {
  background: #d8d0f1;
  transform: translateY(-2px);
}
.tutorial-entry:active {
  transform: translateY(1px);
}
.tutorial-entry > span:first-child {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #fff7;
  color: #7261af;
  font-size: 22px;
}
.tutorial-entry > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}
.tutorial-entry b {
  font-size: 16px;
  line-height: 1.1;
}
.tutorial-entry small {
  font-size: 14px;
  color: #5b527f;
}
.tutorial-entry > span:last-child {
  font-size: 25px;
  line-height: 1;
}
@media (max-width: 700px) {
  .menu-screen .menu-view > .menu-back {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 13px;
    margin-bottom: 7px;
  }
  .tutorial-entry {
    min-height: 52px;
    margin-bottom: 9px;
    padding: 6px 10px;
  }
}

/* Keep the back arrow in the header instead of reserving a separate row. */
.menu-view:has(> .menu-back) {
  position: relative;
}
.menu-screen .menu-view > .menu-back {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 44px;
  height: 44px;
  min-width: 44px;
  margin: 0;
  border: 1px solid #fff;
  border-radius: 14px;
  background: linear-gradient(145deg, #f5f3ff, #dcd8f3);
  box-shadow:
    0 3px 0 #b8addd,
    0 5px 10px #62559324;
  transition:
    transform 0.16s,
    box-shadow 0.16s;
}
.menu-screen #modeSetup > .menu-back,
.menu-screen #playerSetup > .menu-back,
.menu-screen #customRules > .menu-back {
  margin: 0;
}
.menu-screen .menu-view > .menu-back::before {
  content: "";
  width: 25px;
  height: 25px;
  background: center/contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23564b92' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5m7-7-7 7 7 7'/%3E%3C/svg%3E");
}
#modeSetup > .menu-heading,
#askLudo > .menu-heading,
#customRules > .menu-heading,
.menu-shell[data-view="players"] .game-mode-description {
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-shell[data-view="players"] .game-mode-description {
  line-height: 1.3;
}
@media (max-width: 700px) {
  #modeSetup > .menu-heading,
  #askLudo > .menu-heading,
  #customRules > .menu-heading,
  .menu-shell[data-view="players"] .game-mode-description {
    padding-inline: 48px;
  }
  .menu-shell[data-view="players"] .game-mode-description {
    padding-inline: 58px 38px;
  }
  #modeSetup > .menu-heading {
    min-height: 54px;
  }
  #modeSetup > .menu-back {
    top: 5px;
  }
}
@media (min-width: 701px) and (max-height: 500px) {
  .menu-shell[data-view="players"] .menu-heading {
    min-height: 44px;
    padding-inline: 52px;
  }
}

/* Illustrated mode cards, with the same color and scale hierarchy as the concept. */
#modeSetup .game-modes {
  gap: 12px;
}
/* End of css/menu-07.css */
