@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@700;800;900&display=swap");

/* ==========================================================================
   Foundations
   ========================================================================== */

:root {
  --ink: #153348;
  --navy: #0c2638;
  --cream: #fff6df;
  --sand: #f5b765;
  --coral: #ff6d61;
  --teal: #2e938c;
  --blue: #3f9fe1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 1000px;
  background: radial-gradient(circle at 50% 0%, #3b7f91, #14364b 65%);
  color: var(--cream);
  font-family: Nunito, sans-serif;
}
button {
  font: inherit;
  cursor: pointer;
}

/* ==========================================================================
   Home screen
   ========================================================================== */

.home-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  background:
    linear-gradient(rgba(5, 35, 45, 0.16), rgba(5, 35, 45, 0.32)),
    url("assets/beach.png") center/cover no-repeat;
}
.home-screen[hidden] {
  display: none !important;
}
.home-logo {
  width: min(520px, 52vw);
  height: auto;
  filter: drop-shadow(0 8px 12px rgba(7, 25, 32, 0.5));
}
.start-game {
  padding: 12px 34px;
  border: 2px solid rgba(255, 248, 214, 0.94);
  border-radius: 99px;
  background: transparent;
  color: #fff9df;
  font:
    700 clamp(24px, 2.3vw, 36px) Fredoka,
    sans-serif;
  letter-spacing: 0.07em;
  text-shadow: 0 3px 5px rgba(5, 27, 35, 0.65);
  box-shadow: 0 3px 8px rgba(5, 27, 35, 0.22);
  transition:
    transform 0.18s,
    background 0.18s,
    color 0.18s;
}
.start-game:hover,
.start-game:focus-visible {
  background: rgba(255, 248, 214, 0.18);
  transform: translateY(-3px);
  outline: none;
}
.start-game:active {
  transform: translateY(0);
}

/* ==========================================================================
   Match shell and player panels
   ========================================================================== */

.match-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 76px 1fr 128px 34px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(9, 41, 58, 0.45), transparent 40%), #163b51;
}
.match-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 4.5vw;
  background: rgba(7, 28, 42, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.match-header .settings {
  justify-self: end;
}
.brand,
.team-tag,
.turn-badge {
  font-family: Fredoka, sans-serif;
  letter-spacing: 0.08em;
}
.brand {
  display: flex;
  align-items: center;
  height: 58px;
}
.brand img {
  display: block;
  max-width: 210px;
  max-height: 58px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}
.match-score {
  text-align: center;
}
.scoreboard {
  font: 700 34px Fredoka;
  letter-spacing: 0.1em;
  color: #fff9e9;
  text-shadow: 0 3px #0c2536;
}
.scoreboard i {
  color: #ffba5d;
  font-style: normal;
  margin: 0 8px;
}
.match-score small {
  display: block;
  color: #a8d7dc;
  font: 700 9px Fredoka;
  letter-spacing: 0.1em;
  margin-top: -3px;
}
.settings {
  background: #2a6076;
  color: white;
  border: 0;
  border-radius: 10px;
  width: 42px;
  height: 34px;
  letter-spacing: 3px;
}
.battlefield {
  display: grid;
  grid-template-columns: minmax(308px, 1fr) minmax(300px, 1.2fr) minmax(
      308px,
      1fr
    );
  align-items: center;
  gap: 12px;
  padding: 18px 1vw;
  min-height: 0;
}
.team-panel {
  position: relative;
  align-self: center;
  height: calc(100% - 64px);
  display: flex;
  flex-direction: row;
  justify-content: stretch;
  gap: 8px;
  padding-top: 28px;
  z-index: 2;
}
.player-team {
  text-align: left;
}
.opponent-team {
  text-align: right;
}
.team-tag {
  position: absolute;
  top: 2px;
  left: 6px;
  margin: 0;
  font-size: 13px;
  color: #a8d7dc;
}
.opponent-team .team-tag {
  right: 6px;
  left: auto;
  color: #ffc281;
}
.player-card {
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 8px;
  border-radius: 16px;
  background: rgba(13, 47, 65, 0.79);
  box-shadow: 0 8px 18px #09243555;
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.active-card {
  border-color: #ffaf72;
  box-shadow:
    0 0 0 2px #ff7e59,
    0 10px 20px #09243588;
}
.opponent-team .player-card {
  flex-direction: column;
}
.portrait {
  width: 100%;
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 11px;
  background: transparent;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}
.blue,
.purple,
.yellow {
  background: transparent;
}
.card-info {
  min-width: 0;
  text-align: center;
}
.card-info h2 {
  margin: 0;
  font: 700 20px Fredoka;
}
.card-info p {
  margin: 2px 0 8px;
  font-size: 11px;
  color: #a7d5dd;
}
.opponent-team .card-info p {
  color: #ffd1a0;
}
.stamina {
  font-size: 11px;
  color: #9dcbd1;
}
.stamina b {
  color: #fff;
  font-size: 17px;
  margin-left: 4px;
}
.stamina em {
  font-style: normal;
  opacity: 0.6;
}
.player-card .stat-list {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 5px 0 0;
  text-align: left;
}
.stat-list span {
  display: grid;
  grid-template-columns: 26px 1fr 22px;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: #b9dce3;
}
.stat-list b {
  display: block;
}
.stat-list i {
  display: block;
  margin: 0;
  width: calc(var(--stat) * 6%);
  height: 6px;
  max-width: 100%;
  background: #5dd4c1;
  border-radius: 5px;
}
.opponent-stats i {
  background: #ffae64;
}
.stat-list em {
  font-size: 10px;
  font-style: normal;
  color: white;
  font-weight: 800;
  text-align: right;
}

/* Keep the opt-out action legible in the horizontal reception menu. */
.action[data-choice="No Reception"] {
  min-width: 180px;
}
.action[data-choice="No Reception"] b {
  white-space: nowrap;
}

/* ==========================================================================
   Court, player positions, and rally interactions
   ========================================================================== */

.court-wrap {
  position: relative;
  width: min(100%, calc(100vh - 255px));
  max-width: 620px;
  justify-self: center;
  padding-top: 28px;
}
.court {
  display: block;
  width: 100%;
  border-radius: 22px;
  filter: drop-shadow(0 15px 20px rgba(3, 19, 29, 0.45));
}
.turn-badge {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 5;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 99px;
  background: #10344a;
  color: #fff5d5;
  border: 1px solid #6dc0bd;
  font-size: 11px;
}
.turn-badge span {
  color: #ffcf5b;
}
.court-player {
  position: absolute;
  z-index: 2;
  width: 58px;
  height: 83px;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 3px #192a31;
  filter: drop-shadow(0 5px 3px rgba(42, 25, 16, 0.38));
  opacity: 0;
  transition:
    opacity 0.2s,
    left 0.45s cubic-bezier(0.22, 0.7, 0.2, 1),
    top 0.45s cubic-bezier(0.22, 0.7, 0.2, 1),
    transform 0.45s cubic-bezier(0.22, 0.7, 0.2, 1);
}
.court-player.show {
  opacity: 1;
}
.court-player::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 18px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #f4bb91;
  border: 3px solid #5b3f36;
  box-shadow: inset 7px -2px #d58460;
}
.court-player::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 11px;
  width: 37px;
  height: 39px;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(
    90deg,
    #ff725f 0 45%,
    #f4f2dc 45% 55%,
    #ff725f 55%
  );
  border: 3px solid #244557;
  box-shadow: inset 0 -8px rgba(0, 0, 0, 0.12);
}
.court-player span {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #14374a;
  padding: 2px 5px;
  border-radius: 5px;
}
.court-player.at-seven {
  left: 12%;
  top: 28%;
}
.court-player.at-eight {
  left: 12%;
  top: 60%;
}
.court-player.partner-at-one {
  left: 36%;
  top: 28%;
}
.court-player.partner-at-three {
  left: 36%;
  top: 60%;
}
.grid-guide {
  position: absolute;
  inset: 28px 0 0;
  z-index: 1;
  opacity: 0.65;
  pointer-events: none;
}
.coord {
  position: absolute;
  width: 20px;
  height: 20px;
  text-align: center;
  border-radius: 50%;
  background: #133f4f;
  color: #d9f0e6;
  font: 700 11px/20px Fredoka;
}
.one {
  left: 40%;
  top: 34%;
}
.two {
  left: 40%;
  top: 50%;
}
.three {
  left: 40%;
  top: 66%;
}
.four {
  left: 26%;
  top: 34%;
}
.five {
  left: 26%;
  top: 50%;
}
.six {
  left: 26%;
  top: 66%;
}
.serve-spots {
  position: absolute;
  inset: 28px 0 0;
  z-index: 4;
  opacity: 0.6;
  pointer-events: none;
  transition: 0.2s;
}
.serve-spots.show {
  opacity: 1;
  pointer-events: auto;
}
.serve-spot,
.zero {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font: 700 15px/28px Fredoka;
  text-align: center;
}
.serve-spot {
  border: 2px solid #ffe19b;
  background: #143f51;
  color: #fff;
}
.serve-spot:hover,
.serve-spot.selected {
  background: #ff785f;
  border-color: #fff4c8;
  transform: scale(1.12);
}
.seven {
  left: 12%;
  top: 34%;
}
.zero {
  left: 12%;
  top: 50%;
  border: 2px dashed #809ba0;
  background: #263f47;
  color: #b7ccca;
}
.eight {
  left: 12%;
  top: 66%;
}
.selectable-card {
  cursor: pointer;
}
.selectable-card:hover {
  border-color: #ffbc78;
}
.selectable-card.selected-server {
  border-color: #ffaf72;
  box-shadow:
    0 0 0 2px #ff7e59,
    0 10px 20px #09243588;
}
.confirm:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.3);
}
.action-dock {
  display: grid;
  grid-template-columns: 190px 1fr 145px;
  gap: 20px;
  align-items: center;
  padding: 13px 4.5vw;
  background: #092c3d;
  border-top: 1px solid #518998;
  box-shadow: 0 -8px 25px #061e2b88;
}
.action-prompt span {
  display: block;
  font: 12px Fredoka;
  letter-spacing: 0.12em;
  color: #ffc66f;
}
.action-prompt strong {
  font: 700 18px Fredoka;
}
.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.action {
  min-width: 146px;
  padding: 10px 12px;
  color: #d6edf0;
  background: #194b60;
  border: 1px solid #417487;
  border-radius: 12px;
  text-align: left;
  transition: 0.18s;
}
.action:hover {
  transform: translateY(-3px);
  background: #245d71;
}
.action.selected {
  color: #173648;
  background: #ffe1a1;
  border-color: #fff2c9;
  box-shadow: 0 0 0 2px #ff8962;
}
.action .icon {
  float: left;
  font-size: 24px;
  margin: 2px 10px 0 0;
  color: #ff9b61;
}
.action b,
.action em {
  display: block;
}
.action em {
  font-size: 11px;
  font-style: normal;
  opacity: 0.75;
}
.action.muted {
  opacity: 0.5;
}
.confirm {
  height: 56px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff8868, #f65e59);
  color: white;
  font: 700 18px Fredoka;
  box-shadow: 0 4px #ba454c;
}
.confirm:active {
  transform: translateY(3px);
  box-shadow: 0 1px #ba454c;
}
.resolution {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 34px;
  background: #082434;
  color: #a8dce1;
}
.special-skill-action {
  border-color: #ffc45d;
  background: linear-gradient(135deg, #4b2b4d, #734126);
  min-width: 205px;
}
.special-skill-action:hover {
  background: linear-gradient(135deg, #61375f, #8b5230);
}
.special-skill-action img {
  float: left;
  width: 38px;
  height: 38px;
  margin: 0 10px 0 0;
  object-fit: contain;
}
.special-skill-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: grayscale(0.85);
  transform: none;
}
.skill-bonus {
  margin: 5px 0 0 !important;
  color: #ffdd73 !important;
  font: 700 10px Fredoka;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px #092434;
}
.stat-list span {
  grid-template-columns: 26px 1fr 22px auto;
}
.stat-list i.has-stat-bonus {
  background: linear-gradient(
    90deg,
    #5dd4c1 0 var(--bonus-start),
    #ff665c var(--bonus-start) 100%
  );
}
.opponent-stats i.has-stat-bonus {
  background: linear-gradient(
    90deg,
    #ffae64 0 var(--bonus-start),
    #ff665c var(--bonus-start) 100%
  );
}
.stat-bonus {
  color: #ff665c;
  font:
    800 10px Nunito,
    sans-serif;
  white-space: nowrap;
  text-shadow: 0 1px 2px #092434;
}
.ability-panel {
  width: 100%;
  margin-top: auto;
  text-align: left;
}
.ability-panel > b,
.ability-panel small {
  display: block;
}
.ability-panel > b {
  font: 700 13px Fredoka;
  color: #ffda8a;
}
.ability-panel small {
  font-size: 11px;
  font-weight: 700;
  color: #b9dce3;
}
.ability-meter {
  display: flex;
  gap: 3px;
  margin: 5px 0;
}
.ability-meter i {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: #315a68;
}
.ability-meter i.filled {
  background: #ffd35f;
  box-shadow: 0 0 7px #ff9d54;
}
.ability-panel button {
  width: 100%;
  border: 1px solid #ffd36c;
  border-radius: 7px;
  background: #653447;
  color: #fff6db;
  font: 700 10px Fredoka;
  padding: 5px;
}
.ability-panel button img {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  object-fit: contain;
  margin-right: 5px;
}
.card-icon-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 6px 0;
}
.ability-icon,
.skill-icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}
.skill-icon.on-cooldown {
  filter: grayscale(1) brightness(0.68);
  opacity: 0.58;
}
.skill-line {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 1px;
  margin: 1px 0 0;
  color: #a8d7dc;
  font:
    700 11px Nunito,
    sans-serif;
}
.skill-line small {
  font:
    700 10px Nunito,
    sans-serif;
  color: #b9dce3;
}

/* Keep the stamina cost on a third line in every action button. */
.action b,
.action em,
.action small {
  display: block;
}
.action .action-cost {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
  color: #b9dce3;
}
.action--character .action-detail {
  font-size: 2em;
}
.ability-action {
  border-color: #ffd36c;
  background: linear-gradient(135deg, #653447, #8a4a36);
  min-width: 205px;
}
.ability-action:hover {
  background: linear-gradient(135deg, #7a4058, #a55a40);
}
.ability-action img {
  float: left;
  width: 38px;
  height: 38px;
  margin: 0 10px 0 0;
  object-fit: contain;
}

/* ==========================================================================
   Match history and tutorial overlays
   ========================================================================== */

/* Match history and first-match draft stay inside the page, so no browser UI is needed. */
.log-modal,
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(3, 20, 30, 0.74);
  backdrop-filter: blur(5px);
}
.log-modal[hidden],
.tutorial-overlay[hidden] {
  display: none;
}
.log-window,
.tutorial-window {
  width: min(680px, 90vw);
  max-height: min(680px, 86vh);
  overflow: auto;
  border: 1px solid #4f8995;
  border-radius: 18px;
  background: linear-gradient(145deg, #123e53, #082b3c);
  box-shadow: 0 22px 60px #03131dcc;
  padding: 22px;
}
.log-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #4f8995;
}
.log-heading h2 {
  margin: 0 0 12px;
  font: 700 24px Fredoka;
}
.log-heading button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #255d70;
  color: #fff;
  font-size: 24px;
}
.log-window ol {
  margin: 14px 0 0;
  padding-left: 26px;
  max-height: 500px;
  overflow: auto;
}
.log-window li {
  padding: 9px 6px;
  color: #d8eff1;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.tutorial-window {
  text-align: center;
}
.tutorial-window > p {
  margin: 0;
  color: #ffc867;
  font: 700 11px Fredoka;
  letter-spacing: 0.15em;
}
.tutorial-window h1 {
  margin: 8px 0;
  font: 700 30px Fredoka;
}
.tutorial-window > strong {
  display: block;
  color: #abd8dd;
  font-size: 13px;
}
.tutorial-choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.tutorial-choices button {
  padding: 8px;
  border: 1px solid #4d8190;
  border-radius: 13px;
  background: #194b60;
  color: #fff;
  text-align: left;
  transition: 0.18s;
}
.tutorial-choices button:hover {
  transform: translateY(-5px);
  border-color: #ffd071;
  background: #28637a;
}
.tutorial-choices img {
  width: 100%;
  aspect-ratio: 0.66;
  object-fit: cover;
  border-radius: 8px;
}
.tutorial-choices b,
.tutorial-choices span {
  display: block;
}
.tutorial-choices b {
  margin-top: 7px;
  font: 700 13px Fredoka;
}
.tutorial-choices span {
  font-size: 10px;
  color: #abd8dd;
}
/* Court v2 has wider exterior sand margins; keep play positions inside its teal boundary. */
.court-player.at-seven {
  left: 23%;
}
.court-player.at-eight {
  left: 23%;
}
.court-player.partner-at-one {
  left: 39%;
}
.court-player.partner-at-three {
  left: 39%;
}
.court-player.opponent-at-seven {
  left: 93%;
  top: calc(34.083% + 18.5px);
}
.court-player.opponent-at-eight {
  left: 93%;
  top: calc(66.417% + 9.4px);
}
.one,
.two,
.three {
  left: 43%;
}
.four,
.five,
.six {
  left: 33%;
}
.seven,
.zero,
.eight {
  left: 23%;
}
.three,
.six,
.eight {
  top: 61%;
}
.court-player.at-eight,
.court-player.partner-at-three {
  top: 44%;
}
.court-player.show {
  transform: translate(-50%, -50%);
}

/* Temporary placement grid: four in-court columns by three rows. */
.grid-guide::before {
  content: "";
  position: absolute;
  left: 13.5%;
  top: 26%;
  width: 73%;
  height: 48.5%;
  border: 2px solid rgba(234, 250, 235, 0.75);
  background-image:
    linear-gradient(90deg, rgba(234, 250, 235, 0.72) 2px, transparent 2px),
    linear-gradient(rgba(234, 250, 235, 0.72) 2px, transparent 2px),
    repeating-conic-gradient(
      rgba(17, 72, 76, 0.17) 0 25%,
      rgba(255, 222, 112, 0.1) 0 50%
    );
  background-size:
    25% 100%,
    100% 33.333%,
    50% 66.666%;
  background-position: -1px -1px;
  box-shadow: inset 0 0 0 1px rgba(18, 75, 78, 0.45);
}

/* Serve squares are deliberately outside the left sideline. */
.court-player.at-seven,
.court-player.at-eight {
  left: 5%;
}
.seven,
.zero,
.eight {
  left: 6%;
}

/* Grow the court into the fixed gutter; team cards keep their original columns. */
.court-wrap {
  width: min(calc(100% + 248px), calc(100vh - 190px));
  max-width: 900px;
}

.turn-badge {
  top: -20px;
}

.court-player span {
  display: none;
}

/* Label centers match the temporary 4 × 3 checkerboard exactly. */
.one,
.two,
.three {
  left: calc(40.875% - 10px);
}
.four,
.five,
.six {
  left: calc(22.625% - 10px);
}
.one,
.four {
  top: calc(34.083% - 10px);
}
.two,
.five {
  top: calc(50.25% - 10px);
}
.three,
.six {
  top: calc(66.417% - 10px);
}
.seven,
.zero,
.eight {
  left: calc(7% - 16px);
}
.seven {
  top: calc(34.083% - 16px);
}
.zero {
  display: none;
}
.eight {
  top: calc(66.417% - 16px);
}

/* Mirrored placement labels for the right-side team. */
.opponent-coord {
  background: #855d3d;
  color: #fff0cf;
}
.opponent-one,
.opponent-two,
.opponent-three {
  left: calc(59.125% - 10px);
}
.opponent-four,
.opponent-five,
.opponent-six {
  left: calc(77.375% - 10px);
}
.opponent-one,
.opponent-four {
  top: calc(34.083% - 10px);
}
.opponent-two,
.opponent-five {
  top: calc(50.25% - 10px);
}
.opponent-three,
.opponent-six {
  top: calc(66.417% - 10px);
}

/* Court-player anchors use the exact centers of the testing grid. */
.court-player {
  transform: translate(-50%, -50%);
}
.court-player.show {
  transform: translate(-50%, -50%);
}
.court-player.opponent.show {
  transform: translate(-50%, -50%) scaleX(-1);
}

/* On-court portraits share one fixed size, including future characters. */
.court-player {
  width: 90px;
  height: 90px;
}
.court-player::before,
.court-player::after {
  display: none;
}
.court-player > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid #f7f0d9;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  box-shadow: 0 3px 6px rgba(11, 34, 42, 0.65);
  transform: none;
}
.court-player.at-seven {
  left: 7%;
  top: calc(34.083% + 18.5px);
}
.court-player.at-eight {
  left: 7%;
  top: calc(66.417% + 9.4px);
}
.court-player.partner-at-one {
  left: 40.875%;
  top: calc(34.083% + 18.5px);
}
.court-player.partner-at-three {
  left: 40.875%;
  top: calc(66.417% + 9.4px);
}

.court-ball {
  position: absolute;
  z-index: 5;
  width: 30px;
  height: 30px;
  object-fit: contain;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.attack-callout {
  position: absolute;
  z-index: 7;
  transform: translate(-50%, -50%);
  padding: 5px 9px;
  border: 1px solid #ffe19b;
  border-radius: 99px;
  background: #592b37;
  color: #fff5d5;
  font: 700 10px Fredoka;
  letter-spacing: 0.08em;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(25, 12, 18, 0.45);
  animation: attack-callout-in 0.24s ease-out;
}
.attack-callout.reception-fail-callout {
  background: #7e2636;
  border-color: #ffb0a2;
}
.attack-callout.bad-reception-callout {
  background: #8a6224;
  border-color: #ffe291;
}
.attack-callout.skill-sunfire-serve {
  background: #8a3925;
  border-color: #ffd06e;
}
.attack-callout.skill-overjoyed {
  background: #8c3d68;
  border-color: #ffc0dd;
}
.attack-callout.skill-perfect-calculations {
  background: #256d61;
  border-color: #a2f4d2;
}
.attack-callout.skill-way-of-water {
  background: #25629b;
  border-color: #a9efff;
}
.pass-dialogue-callout {
  position: absolute;
  z-index: 8;
  transform: translate(-50%, -50%);
  max-width: 175px;
  padding: 7px 10px;
  border: 1px solid #9ee6f4;
  border-radius: 10px;
  background: #1d6178;
  color: #effdff;
  font:
    700 11px/1.2 Nunito,
    sans-serif;
  text-align: center;
  box-shadow: 0 3px 8px rgba(5, 28, 38, 0.5);
  animation: attack-callout-in 0.24s ease-out;
}
.pass-dialogue-callout::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: #1d6178;
  border-right: 1px solid #9ee6f4;
  border-bottom: 1px solid #9ee6f4;
  transform: translateX(-50%) rotate(45deg);
}
@keyframes attack-callout-in {
  from {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
.court-ball.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.court-ball.at-seven {
  left: calc(7% + 45px);
  top: calc(34.083% + 18.5px - 40px);
}
.court-ball.at-eight {
  left: calc(7% + 45px);
  top: calc(66.417% + 9.4px - 40px);
}
.court-ball.opponent-at-seven {
  left: calc(93% - 45px);
  top: calc(34.083% + 18.5px - 40px);
}
.court-ball.opponent-at-eight {
  left: calc(93% - 45px);
  top: calc(66.417% + 9.4px - 40px);
}
.court-ball.normal-toss {
  animation: normal-toss 0.65s ease-in-out forwards;
}
.court-ball.jump-lob {
  animation: jump-lob 0.85s ease-in-out forwards;
}

/* Serve preparation: left-side serving motions; opponent variants mirror them for future right-side serves. */
.court-player.serve-normal-toss {
  animation: normal-serve-toss 0.65s ease-in-out both;
}
.court-player.serve-jump-toss {
  animation: jump-serve-toss 0.85s ease-in-out both;
}
.court-player.serve-normal-strike,
.court-player.serve-jump-strike {
  animation: serve-strike 0.18s ease-in-out 2 alternate;
}
.court-player.opponent.serve-normal-toss {
  animation-name: normal-serve-toss-opponent;
}
.court-player.opponent.serve-jump-toss {
  animation-name: jump-serve-toss-opponent;
}
.court-player.opponent.serve-normal-strike,
.court-player.opponent.serve-jump-strike {
  animation-name: serve-strike-opponent;
}
@keyframes normal-toss {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, calc(-50% - 80px)) scale(1);
  }
}
@keyframes jump-lob {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  30% {
    transform: translate(calc(-50% - 40px), -50%) scale(1);
  }
  65% {
    transform: translate(calc(-50% + 20px), calc(-50% - 120px)) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes normal-serve-toss {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, calc(-50% - 4px));
  }
}
@keyframes jump-serve-toss {
  0% {
    transform: translate(-50%, -50%);
  }
  30% {
    transform: translate(calc(-50% - 40px), -50%);
  }
  100% {
    transform: translate(-50%, -50%);
  }
}
@keyframes serve-strike {
  from {
    transform: translate(-50%, -50%);
  }
  to {
    transform: translate(calc(-50% + 20px), -50%);
  }
}
@keyframes normal-serve-toss-opponent {
  0%,
  100% {
    transform: translate(-50%, -50%) scaleX(-1);
  }
  50% {
    transform: translate(-50%, calc(-50% - 4px)) scaleX(-1);
  }
}
@keyframes jump-serve-toss-opponent {
  0% {
    transform: translate(-50%, -50%) scaleX(-1);
  }
  30% {
    transform: translate(calc(-50% + 40px), -50%) scaleX(-1);
  }
  100% {
    transform: translate(-50%, -50%) scaleX(-1);
  }
}
@keyframes serve-strike-opponent {
  from {
    transform: translate(-50%, -50%) scaleX(-1);
  }
  to {
    transform: translate(calc(-50% - 20px), -50%) scaleX(-1);
  }
}

/* Serve-choice dots are shown only until a position has been selected. */
.serve-spots:not(.show) {
  opacity: 0;
  visibility: hidden;
}

/* Clickable opponent-court targets, revealed after a serve type is selected. */
.target-spots {
  position: absolute;
  inset: 28px 0 0;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.target-spots.show {
  opacity: 1;
  pointer-events: auto;
}
.target-spots.resolution-preview {
  pointer-events: none;
}
.target-spots.diagonal-aim button:not(.target-one):not(.target-three) {
  visibility: hidden;
  pointer-events: none;
}
.target-spots button {
  position: absolute;
  width: calc(18.25% - 6px);
  height: calc(16.167% - 10px);
  margin: 3px;
  border: 1px solid transparent;
  background: transparent;
  cursor:
    url("assets/volleyball-ball-cursor.png") 16 16,
    pointer;
}
.target-spots button:hover {
  border-color: #ff7b69;
  background: rgba(241, 78, 65, 0.18);
}
.target-spots button.selected {
  border: 3px solid #ff4c46;
  background: rgba(239, 57, 47, 0.1);
  box-shadow: inset 0 0 20px rgba(255, 78, 61, 0.1);
}
.target-one,
.target-four {
  top: 26%;
}
.target-two,
.target-five {
  top: 42.167%;
}
.target-three,
.target-six {
  top: 58.334%;
}
.target-one,
.target-two,
.target-three {
  left: 50%;
}
.target-four,
.target-five,
.target-six {
  left: 68.25%;
}
.target-spots.target-left .target-one,
.target-spots.target-left .target-two,
.target-spots.target-left .target-three {
  left: 32%;
}
.target-spots.target-left .target-four,
.target-spots.target-left .target-five,
.target-spots.target-left .target-six {
  left: 13.75%;
}

/* Serve flight: the ball rises while travelling to the net, then continues to its target. */
.court-ball {
  transition:
    left 0.85s cubic-bezier(0.22, 0.7, 0.2, 1),
    top 0.85s cubic-bezier(0.22, 0.7, 0.2, 1),
    opacity 0.2s,
    transform 0.2s;
}
.court-ball.to-net {
  left: 50%;
  top: var(--target-y);
  animation: none;
}
.court-ball.attack-to-net {
  left: 50%;
  top: var(--target-y);
  animation: none;
}
.court-ball.feint-to-target {
  left: var(--target-x);
  top: var(--target-y);
  animation: feint-arc 0.9s ease-in-out;
}
.court-ball.at-net {
  left: 50%;
  top: var(--target-y);
}
.court-ball.to-target {
  left: var(--target-x);
  top: var(--target-y);
}
@keyframes ball-lift {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -150%) scale(1.25);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes feint-arc {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, calc(-50% - 100px)) scale(1.05);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Player anchors for opponent target squares. */
.court-player.target-one {
  left: 59.125%;
  top: calc(34.083% + 18.5px);
}
.court-player.target-two {
  left: 59.125%;
  top: calc(50.25% + 13.9px);
}
.court-player.target-three {
  left: 59.125%;
  top: calc(66.417% + 9.4px);
}
.court-player.target-four {
  left: 77.375%;
  top: calc(34.083% + 18.5px);
}
.court-player.target-five {
  left: 77.375%;
  top: calc(50.25% + 13.9px);
}
.court-player.target-six {
  left: 77.375%;
  top: calc(66.417% + 9.4px);
}
.court-player.target-1 {
  left: 59.125%;
  top: calc(34.083% + 18.5px);
}
.court-player.target-2 {
  left: 59.125%;
  top: calc(50.25% + 13.9px);
}
.court-player.target-3 {
  left: 59.125%;
  top: calc(66.417% + 9.4px);
}
.court-player.target-4 {
  left: 77.375%;
  top: calc(34.083% + 18.5px);
}
.court-player.target-5 {
  left: 77.375%;
  top: calc(50.25% + 13.9px);
}
.court-player.target-6 {
  left: 77.375%;
  top: calc(66.417% + 9.4px);
}

/* Matching anchors for the left-side team, used after a serve and during defense. */
.court-player.player-target-1 {
  left: 40.875%;
  top: calc(34.083% + 18.5px);
}
.court-player.player-target-2 {
  left: 40.875%;
  top: calc(50.25% + 13.9px);
}
.court-player.player-target-3 {
  left: 40.875%;
  top: calc(66.417% + 9.4px);
}
.court-player.player-target-4 {
  left: 22.625%;
  top: calc(34.083% + 18.5px);
}
.court-player.player-target-5 {
  left: 22.625%;
  top: calc(50.25% + 13.9px);
}
.court-player.player-target-6 {
  left: 22.625%;
  top: calc(66.417% + 9.4px);
}

@media (max-height: 760px) {
  .match-screen {
    grid-template-rows: 60px 1fr 115px 27px;
  }
  .battlefield {
    padding: 6px 3vw;
  }
  .player-card {
    min-height: 78px;
  }
  .portrait {
    height: auto;
  }
  .team-panel {
    gap: 5px;
  }
  .card-info p {
    margin-bottom: 3px;
  }
}

/* A selected defender becomes the movement cursor; Overjoyed is communicated without resizing cards. */
.target-spots.moving-player-cursor button {
  cursor: var(--move-cursor), pointer;
}
.player-card.overjoyed-active {
  border-color: #ff9fc8;
  box-shadow:
    0 0 0 2px #ef6da8,
    0 0 24px rgba(255, 115, 179, 0.7),
    0 10px 20px #09243588;
}
.court-player.planned-defense-position {
  opacity: 0.6;
}
.court-player.planned-defense-position > img {
  filter: none;
  box-shadow: 0 3px 6px rgba(11, 34, 42, 0.65);
}
.court-player.skill-aura > img {
  animation: skill-aura-pulse 1.35s ease-in-out infinite alternate;
}
.court-player.skill-aura-sunfire-serve > img {
  border-color: #ffe09a;
  box-shadow:
    0 0 0 3px rgba(255, 177, 67, 0.82),
    0 0 20px 9px rgba(255, 97, 42, 0.66),
    0 3px 6px rgba(11, 34, 42, 0.65);
}
.court-player.skill-aura-overjoyed > img {
  border-color: #ffd4e7;
  box-shadow:
    0 0 0 3px rgba(255, 129, 188, 0.74),
    0 0 18px 8px rgba(255, 91, 166, 0.6),
    0 3px 6px rgba(11, 34, 42, 0.65);
}
.court-player.skill-aura-way-of-water > img {
  border-color: #c9f8ff;
  box-shadow:
    0 0 0 3px rgba(86, 218, 255, 0.8),
    0 0 20px 9px rgba(31, 154, 255, 0.62),
    0 3px 6px rgba(11, 34, 42, 0.65);
}
.court-player.skill-aura-perfect-calculations > img {
  border-color: #daf6b4;
  box-shadow:
    0 0 0 3px rgba(163, 224, 94, 0.8),
    0 0 20px 9px rgba(75, 165, 77, 0.62),
    0 3px 6px rgba(11, 34, 42, 0.65);
}
@keyframes skill-aura-pulse {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.18);
  }
}
.court-player.show.shared-square-upper {
  transform: translate(-50%, calc(-50% - 23px));
}
.court-player.show.shared-square-lower {
  transform: translate(-50%, calc(-50% + 23px));
}
/* Keep stacked profile pictures identical to every other on-court portrait. */
.court-player > img {
  width: 100%;
  height: 100%;
}

/* The tutorial draft previews the court alone; player cards appear only after drafting. */
body.tutorial-active .team-panel,
body.tutorial-active .action-dock,
body.tutorial-active .resolution {
  visibility: hidden;
}
body.tutorial-active .team-panel.draft-has-selection {
  visibility: visible;
}
body.tutorial-active .team-panel .player-card:not(.tutorial-draft-selected) {
  display: none;
}
body.tutorial-active .team-panel {
  flex-wrap: wrap;
}
body.tutorial-active .player-team {
  justify-content: flex-start;
}
body.tutorial-active .opponent-team {
  justify-content: flex-end;
}
body.tutorial-active .team-panel .tutorial-draft-selected {
  flex: 0 0 100%;
}
body.tutorial-active .team-panel.draft-two .tutorial-draft-selected {
  flex-basis: calc(50% - 4px);
}
body.tutorial-active .player-team .tutorial-draft-selected {
  margin-right: auto;
}
body.tutorial-active .opponent-team .tutorial-draft-selected {
  margin-left: auto;
}

/* Drafted background cards retain a card-sized silhouette instead of widening across the side panel. */
body.tutorial-active .team-panel .tutorial-draft-selected {
  flex: 0 0 min(300px, 100%);
}
body.tutorial-active .team-panel.draft-two .tutorial-draft-selected {
  flex-basis: min(300px, calc(50% - 4px));
}

/* Keep whichever draft cards remain centered in the modal. */
.tutorial-choices {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.tutorial-choices button {
  width: 150px;
  flex: 0 0 150px;
}

/* ==========================================================================
   Recruitment and banner screens
   ========================================================================== */

.home-screen.menu-open {
  justify-content: center;
  padding: 0;
  gap: 0;
}
.home-screen.menu-open .home-logo,
.home-screen.menu-open .start-game {
  display: none;
}
.main-menu,
.recruit-menu {
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  width: min(1500px, 96vw);
  height: 100vh;
  padding: 28px 0;
}
.home-screen.menu-open .main-menu:not([hidden]),
.home-screen.menu-open .recruit-menu:not([hidden]) {
  display: grid;
}
.main-menu button,
.recruit-menu button {
  min-width: 0;
  border: 1px solid #fff1bf;
  border-radius: 20px;
  background: #103d50cc;
  color: #fff9df;
  font: 700 30px Fredoka;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.main-menu img {
  width: 180px;
  height: 58%;
  object-fit: contain;
}
.main-menu button:disabled {
  opacity: 0.45;
}
.recruit-menu {
  grid-template-columns: repeat(2, 1fr);
  max-width: 900px;
}
.recruit-menu button {
  padding: 0;
  overflow: hidden;
  position: relative;
}
.recruit-menu img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recruit-menu span {
  position: absolute;
  inset: auto 0 0;
  padding: 20px;
  background: #082c3bcc;
  text-align: center;
  font: 700 30px Fredoka;
}
.main-menu button:not(:disabled),
.recruit-menu button {
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}
.main-menu button:not(:disabled):hover,
.main-menu button:not(:disabled):focus-visible {
  background: #246f88e8;
  box-shadow:
    0 0 0 2px #ffe69a,
    0 12px 28px #062533aa;
  transform: translateY(-7px);
  outline: none;
}
.recruit-menu button:hover,
.recruit-menu button:focus-visible {
  background: #246f88e8;
  box-shadow:
    0 0 0 2px #ffe69a,
    0 12px 28px #062533aa;
  transform: translateY(-7px);
  outline: none;
}
.main-menu,
.recruit-menu {
  width: 100%;
  max-width: none;
  height: calc(100vh - 100px);
  gap: 40px;
  padding: 0 40px;
}
.main-menu button,
.recruit-menu button {
  border-radius: 16px;
  background: rgba(16, 61, 80, 0.9);
}
.recruit-menu img {
  object-fit: contain;
  background: #103d50;
}
.recruit-menu {
  max-width: none;
}
.recruit-menu {
  grid-template-columns: repeat(5, 1fr);
}
.recruit-menu {
  grid-template-columns: repeat(2, calc((100vw - 240px) / 5));
  justify-content: center;
}
.recruit-menu img {
  height: 100%;
  object-fit: cover;
}
.recruit-menu .banner-title {
  position: absolute;
  left: 8%;
  bottom: 5%;
  width: 84%;
  height: auto;
  max-height: 24%;
  object-fit: contain;
  background: transparent;
  opacity: 1;
  transform: none;
}
.recruit-menu {
  position: relative;
}
.recruit-menu .recruit-back {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: auto;
  min-width: auto;
  height: auto;
  padding: 10px 16px;
  border-radius: 12px;
  background: #12475b;
  color: #fff8db;
  font: 700 17px Fredoka;
}
.recruit-menu .recruit-back:hover,
.recruit-menu .recruit-back:focus-visible {
  transform: none;
  background: #236f83;
  box-shadow: 0 0 0 2px #ffe69a;
  outline: none;
}
.banner-page {
  width: min(1500px, 96vw);
  height: calc(100vh - 64px);
  margin: auto;
  color: #fff8db;
  overflow: auto;
  padding: 32px 0;
  box-sizing: border-box;
}
.banner-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.banner-topbar button,
.pull-actions button,
#priority-options button {
  border: 1px solid #ffe7a4;
  border-radius: 12px;
  background: #12475b;
  color: #fff8db;
  padding: 10px 16px;
  font: 700 17px Fredoka;
  cursor: pointer;
}
.banner-topbar button:hover,
.pull-actions button:hover,
#priority-options button:hover {
  background: #236f83;
}
.sand-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 18px Fredoka;
  color: #ffe5a1;
}
.sand-wallet img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.sand-wallet span {
  font: 600 14px Nunito;
  color: #b8e5e9;
}
.banner-detail {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
  gap: 38px;
  align-items: center;
  margin: 28px 0;
}
.banner-showcase {
  height: min(63vh, 760px);
  position: relative;
  border: 1px solid #ffe8ae;
  border-radius: 18px;
  overflow: hidden;
  background: #0c3446;
}
.banner-showcase > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.banner-showcase #banner-logo {
  position: absolute;
  bottom: 4%;
  left: 9%;
  width: 82%;
  max-height: 20%;
  object-fit: contain;
}
.banner-controls {
  padding: 22px 26px;
  border: 1px solid rgba(135, 220, 224, 0.35);
  border-radius: 20px;
  background: rgba(7, 42, 56, 0.82);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}
.eyebrow {
  margin: 0;
  color: #f5c96a;
  font: 700 14px Fredoka;
  letter-spacing: 0.12em;
}
.banner-controls h1 {
  margin: 6px 0;
  font: 700 clamp(36px, 4vw, 62px) Fredoka;
}
.banner-controls > p:not(.eyebrow) {
  font: 700 18px Nunito;
  color: #c3e8eb;
}
.rate-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 18px 0;
  padding: 13px 16px;
  border-radius: 12px;
  background: #092f40;
}
.rate-summary b {
  font: 700 25px Fredoka;
  color: #ffd56a;
}
.rate-summary small {
  width: 100%;
  color: #99d8dd;
}
.priority-picker {
  margin: 20px 0;
  padding: 14px;
  border: 1px solid #6dd6d1;
  border-radius: 14px;
}
.priority-picker h2,
.daily-quests h2 {
  margin: 0;
  font: 700 23px Fredoka;
}
.priority-picker p {
  margin: 5px 0 12px;
  color: #c4e7e9;
  font: 600 14px Nunito;
}
.priority-picker div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.priority-picker button.selected {
  background: #f5c96a;
  color: #153a48;
  box-shadow: 0 0 0 2px #fff7cc;
}
.banner-rules {
  margin: 16px 0;
  color: #cde7e9;
  font: 700 15px Nunito;
  line-height: 1.55;
}
.pull-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pull-actions button {
  min-width: 172px;
  font-size: 19px;
}
.pull-actions button.primary {
  background: #d66e42;
  border-color: #ffe79d;
}
.pull-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.daily-quests {
  padding: 18px 24px;
  border: 1px solid rgba(135, 220, 224, 0.35);
  border-radius: 18px;
  background: rgba(6, 37, 50, 0.83);
}
.daily-quests ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.daily-quests li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #0c4053;
  font: 700 15px Nunito;
}
.daily-quests b {
  color: #ffd56a;
}
.recruit-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 20, 29, 0.78);
}
.recruit-modal > section {
  width: min(680px, 94vw);
  max-height: 82vh;
  overflow: auto;
  position: relative;
  padding: 30px;
  border: 1px solid #85d9dc;
  border-radius: 20px;
  background: #0b3c50;
  color: #f8f5dd;
}
.recruit-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}
.recruit-modal h2 {
  margin: 0 0 14px;
  font: 700 32px Fredoka;
}
.recruit-modal h3 {
  margin: 20px 0 8px;
  font: 700 20px Fredoka;
  color: #ffd76d;
}
.recruit-modal ul {
  padding-left: 20px;
  line-height: 1.7;
  font: 700 16px Nunito;
}
.pull-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.pull-result {
  padding: 12px;
  border-radius: 10px;
  background: #0e5167;
  font: 700 16px Nunito;
}
.pull-result.vial,
.pull-result.character {
  background: #685137;
  color: #fff2ad;
}
.pull-result.character {
  background: #704e83;
}
.pull-history-list {
  padding-left: 20px;
  font: 700 15px Nunito;
  line-height: 1.5;
}
@media (max-width: 850px) {
  .banner-page {
    height: 100vh;
    padding: 16px;
  }
  .banner-detail {
    grid-template-columns: 1fr;
  }
  .banner-showcase {
    height: 53vh;
  }
  .daily-quests ul {
    grid-template-columns: 1fr 1fr;
  }
  .banner-topbar {
    flex-wrap: wrap;
  }
  .banner-controls h1 {
    font-size: 38px;
  }
}
.recruit-modal[hidden] {
  display: none !important;
}
.banner-showcase {
  background: transparent;
  border: 0;
  border-radius: 0;
}
.banner-showcase > img:first-child {
  object-fit: contain;
}
.banner-rules {
  line-height: 1.7;
}
.pull-actions {
  justify-content: center;
}

/* Retro seaside marquee: all labels and controls remain live DOM elements. */
.home-screen.menu-open {
  display: block;
  overflow: hidden;
  background: #2c2340 url("assets/menu/retro-sunset-marquee-wide-4k.png")
    center/cover no-repeat;
}
.home-screen.menu-open .home-logo {
  display: block;
  position: absolute;
  z-index: 6;
  top: 7.5%;
  left: 50%;
  width: min(34vw, 540px);
  max-width: 54vw;
  max-height: 23vh;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 5px 1px rgba(8, 42, 55, 0.55))
    drop-shadow(0 10px 10px rgba(0, 0, 0, 0.28));
}
.home-screen.menu-open .main-menu:not([hidden]) {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 7;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
.home-screen.menu-open .main-menu .retro-menu-button {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 0.7vw, 12px);
  width: 14.5%;
  height: 29%;
  margin: 0;
  padding: 2% 1%;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: #113b4b;
  font: 700 clamp(17px, 2vw, 36px) Fredoka;
  text-shadow:
    0 2px 0 #fff0bc,
    0 3px 5px rgba(6, 42, 53, 0.25);
  box-shadow: none;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
  cursor: pointer;
}
.home-screen.menu-open .main-menu .retro-menu-button img {
  width: clamp(48px, 6.5vw, 112px);
  height: clamp(48px, 7.3vw, 124px);
  object-fit: contain;
  filter: drop-shadow(0 4px 2px rgba(44, 29, 14, 0.3));
}
.home-screen.menu-open .main-menu .retro-menu-button span {
  display: block;
  line-height: 0.95;
}
.home-screen.menu-open .main-menu .menu-cards {
  left: 7.5%;
  top: 42%;
}
.home-screen.menu-open .main-menu .menu-formation {
  left: 23%;
  top: 42%;
}
.home-screen.menu-open .main-menu .menu-play {
  left: 39.25%;
  top: 36.5%;
  width: 21.5%;
  height: 36%;
  color: #fff7d8;
  font-size: clamp(28px, 4vw, 70px);
  text-shadow:
    0 3px 0 #8d382c,
    0 6px 4px rgba(69, 27, 19, 0.35);
}
.home-screen.menu-open .main-menu .menu-play img {
  width: clamp(58px, 8vw, 140px);
  height: clamp(58px, 8vw, 140px);
}
.home-screen.menu-open .main-menu .menu-training {
  left: 61.75%;
  top: 42%;
}
.home-screen.menu-open .main-menu .menu-recruit {
  left: 78%;
  top: 42%;
}
.home-screen.menu-open .main-menu .retro-menu-button:not(:disabled):hover,
.home-screen.menu-open
  .main-menu
  .retro-menu-button:not(:disabled):focus-visible {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 242, 174, 0.18),
    rgba(255, 242, 174, 0) 68%
  );
  box-shadow:
    inset 0 0 0 4px #fff3b8,
    0 0 0 3px rgba(213, 91, 52, 0.95),
    0 0 25px 8px rgba(255, 201, 89, 0.55);
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.12);
  outline: none;
}
.home-screen.menu-open .main-menu .retro-menu-button:disabled {
  opacity: 0.42;
  filter: grayscale(0.7);
}
.home-screen.menu-open:has(.recruit-menu:not([hidden])) .home-logo,
.home-screen.menu-open:has(.banner-page:not([hidden])) .home-logo {
  display: none;
}
@media (max-aspect-ratio: 4/3) {
  .home-screen.menu-open .home-logo {
    top: 8%;
    width: min(48vw, 470px);
  }
  .home-screen.menu-open .main-menu .retro-menu-button {
    border-radius: 12px;
    font-size: clamp(13px, 2.4vw, 24px);
  }
  .home-screen.menu-open .main-menu .menu-play {
    font-size: clamp(22px, 4.8vw, 48px);
  }
}

/* The marquee artwork supplies its own period typography and panel icons. */
.home-screen.menu-open .main-menu .retro-menu-button img,
.home-screen.menu-open .main-menu .retro-menu-button span {
  display: none;
}
.home-screen.menu-open .main-menu .retro-menu-button:not(:disabled):hover,
.home-screen.menu-open
  .main-menu
  .retro-menu-button:not(:disabled):focus-visible {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 244, 181, 0.22),
    rgba(255, 244, 181, 0) 70%
  );
}
.home-screen.menu-open .main-menu .menu-play:not(:disabled):hover,
.home-screen.menu-open .main-menu .menu-play:not(:disabled):focus-visible {
  border-radius: 48%;
  box-shadow:
    inset 0 0 0 5px #fff3b8,
    0 0 0 4px rgba(213, 91, 52, 0.95),
    0 0 28px 10px rgba(255, 201, 89, 0.6);
}

/* Keep click zones in the exact same 16:9 coordinate space as the contained artwork. */
.home-screen.menu-open .main-menu:not([hidden]) {
  inset: auto;
  left: 50%;
  top: 50%;
  width: min(100vw, 177.7778vh);
  height: min(100vh, 56.25vw);
  aspect-ratio: 16/9;
  transform: translate(-50%, -50%);
}
.home-screen.menu-open .main-menu .retro-menu-button {
  border-radius: 0;
  clip-path: polygon(
    13% 0,
    87% 0,
    100% 11%,
    100% 89%,
    87% 100%,
    13% 100%,
    0 89%,
    0 11%
  );
  background: rgba(255, 255, 255, 0.001);
}
.home-screen.menu-open .main-menu .menu-play {
  clip-path: polygon(
    50% 0,
    57% 16%,
    68% 6%,
    69% 23%,
    85% 16%,
    77% 31%,
    100% 35%,
    81% 45%,
    96% 57%,
    76% 59%,
    83% 77%,
    66% 68%,
    62% 100%,
    50% 77%,
    38% 100%,
    34% 68%,
    17% 77%,
    24% 59%,
    4% 57%,
    19% 45%,
    0 35%,
    23% 31%,
    15% 16%,
    31% 23%,
    32% 6%,
    43% 16%
  );
}
.home-screen.menu-open .main-menu .retro-menu-button:not(:disabled):hover,
.home-screen.menu-open
  .main-menu
  .retro-menu-button:not(:disabled):focus-visible {
  background: rgba(255, 243, 184, 0.24);
  box-shadow: none;
  transform: none;
  filter: drop-shadow(3px 0 0 #fff3b8) drop-shadow(-3px 0 0 #fff3b8)
    drop-shadow(0 3px 0 #fff3b8) drop-shadow(0 -3px 0 #fff3b8)
    drop-shadow(0 0 11px #ffb14a);
  outline: none;
}
.home-screen.menu-open .main-menu .menu-play:not(:disabled):hover,
.home-screen.menu-open .main-menu .menu-play:not(:disabled):focus-visible {
  border-radius: 0;
  box-shadow: none;
}

/* Generated hover states preserve the irregular painted ticket and starburst edges exactly. */
.home-screen.menu-open .main-menu .retro-menu-button,
.home-screen.menu-open .main-menu .retro-menu-button:hover,
.home-screen.menu-open .main-menu .retro-menu-button:focus-visible {
  clip-path: none !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}
.home-screen.menu-open .main-menu .menu-cards {
  left: 10.68%;
  top: 39.35%;
  width: 14.84%;
  height: 32.87%;
}
.home-screen.menu-open .main-menu .menu-formation {
  left: 25.26%;
  top: 39.35%;
  width: 13.54%;
  height: 32.87%;
}
.home-screen.menu-open .main-menu .menu-play {
  left: 38.02%;
  top: 34.26%;
  width: 24.22%;
  height: 39.35%;
}
.home-screen.menu-open .main-menu .menu-training {
  left: 60.94%;
  top: 39.35%;
  width: 13.54%;
  height: 32.87%;
}
.home-screen.menu-open .main-menu .menu-recruit {
  left: 74.74%;
  top: 39.35%;
  width: 13.8%;
  height: 32.87%;
}

/* The widened, 2:1 marquee is the same geometry used by the cover background. */
.home-screen.menu-open .main-menu:not([hidden]) {
  width: max(100vw, 200vh);
  height: max(100vh, 50vw);
  aspect-ratio: 2/1;
}
.home-screen.menu-open .main-menu .menu-cards {
  left: 20.57%;
  top: 42.86%;
  width: 10.7%;
  height: 27.6%;
}
.home-screen.menu-open .main-menu .menu-formation {
  left: 31.12%;
  top: 42.86%;
  width: 10.99%;
  height: 27.6%;
}
.home-screen.menu-open .main-menu .menu-play {
  left: 41.98%;
  top: 37.19%;
  width: 16.64%;
  height: 35.52%;
}
.home-screen.menu-open .main-menu .menu-training {
  left: 58.9%;
  top: 42.86%;
  width: 10.99%;
  height: 27.6%;
}
.home-screen.menu-open .main-menu .menu-recruit {
  left: 70.18%;
  top: 42.86%;
  width: 10.99%;
  height: 27.6%;
}

/* Recruit selection board: art provides the presentation; live buttons preserve navigation. */
.home-screen.menu-open .recruit-menu:not([hidden]) {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 12;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #2c2340 url("assets/recruit/recruit-board.png") center/cover
    no-repeat;
}
.home-screen.menu-open .recruit-menu button {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  cursor: pointer;
  transform: none;
}
.home-screen.menu-open .recruit-menu .recruit-back {
  top: 4%;
  left: 1%;
  width: 10%;
  height: 11%;
  min-width: 0;
  font-size: 0;
}
.home-screen.menu-open .recruit-menu [data-banner="new"] {
  left: 20%;
  top: 21%;
  width: 23%;
  height: 62%;
}
.home-screen.menu-open .recruit-menu [data-banner="jade"] {
  left: 57%;
  top: 21%;
  width: 23%;
  height: 62%;
}
.home-screen.menu-open .recruit-menu button img {
  display: none;
}
.home-screen.menu-open .recruit-menu button:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}
.home-screen.menu-open .recruit-menu button:focus-visible {
  opacity: 1;
  background: rgba(255, 244, 186, 0.18);
  box-shadow: inset 0 0 0 3px #fff2b4;
  outline: none;
}

/* Live recruitment board.  The artwork is part of the board rather than a spare illustration slot. */
.home-screen.menu-open .banner-page:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: clamp(12px, 1.8vw, 30px);
  overflow: auto;
  box-sizing: border-box;
  flex-direction: column;
  gap: clamp(8px, 1vw, 16px);
  color: #302114;
  background: linear-gradient(145deg, #173e43 0%, #0c252d 100%);
}
.recruit-marquee {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-height: clamp(72px, 10vw, 150px);
  border: clamp(5px, 0.5vw, 9px) solid #1b4b4d;
  border-radius: 22px 22px 12px 12px;
  background: linear-gradient(
    #7a2d26 0 12%,
    #d5b677 13% 17%,
    #efe0b7 18% 81%,
    #7a2d26 82% 100%
  );
  box-shadow:
    inset 0 0 0 3px #583225,
    inset 0 0 0 8px rgba(255, 232, 167, 0.32),
    0 8px 0 #102e31;
  color: #8c3328;
  font:
    900 clamp(43px, 7vw, 112px)/0.8 Georgia,
    serif;
  letter-spacing: 0.08em;
  text-shadow:
    1px 1px #f6dca8,
    -1px -1px #592b24;
}
.home-screen.menu-open .banner-page .banner-topbar {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 clamp(4px, 0.4vw, 8px);
  color: #fff5d7;
}
.home-screen.menu-open .banner-page .banner-topbar button {
  border: 2px solid #e8c47c;
  border-radius: 7px;
  background: #1a5252;
  color: #fff3d4;
  padding: 8px 14px;
  box-shadow:
    inset 0 0 0 2px #12383a,
    0 3px 0 #0b272a;
  font:
    800 clamp(14px, 1.3vw, 19px) Georgia,
    serif;
  text-transform: uppercase;
}
.home-screen.menu-open .banner-page .banner-topbar button:hover,
.home-screen.menu-open .banner-page .banner-topbar button:focus-visible {
  background: #296f69;
  outline: 2px solid #ffdb83;
  outline-offset: 2px;
}
.home-screen.menu-open .banner-page .sand-wallet {
  padding: 6px 14px;
  border: 2px solid #9d7040;
  border-radius: 7px;
  background: #302b26;
  color: #ffdb83;
  box-shadow: inset 0 0 0 2px #65513b;
  font-family: Georgia, serif;
}
.home-screen.menu-open .banner-page .sand-wallet img {
  width: 27px;
  height: 27px;
}
.home-screen.menu-open .banner-page .sand-wallet span {
  color: #f8dfac;
  font-family: Georgia, serif;
}
.home-screen.menu-open .banner-page .banner-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(340px, 0.83fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  flex: 1;
  min-height: 0;
  margin: 0;
  border: clamp(5px, 0.45vw, 9px) solid #1d5555;
  border-radius: 17px;
  background: #255456;
  box-shadow:
    inset 0 0 0 3px #102f31,
    0 12px 28px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}
.home-screen.menu-open .banner-page .banner-showcase {
  position: relative;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #5b3525;
}
.home-screen.menu-open .banner-page .banner-showcase > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
  filter: saturate(0.86) sepia(0.12);
}
.home-screen.menu-open .banner-page .banner-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(25, 36, 33, 0.03), rgba(25, 36, 33, 0.37)),
    linear-gradient(0deg, rgba(30, 30, 21, 0.64), transparent 55%);
  pointer-events: none;
}
.home-screen.menu-open .banner-page #banner-logo {
  display: none;
}
.banner-copy {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  padding: clamp(18px, 3vw, 48px);
  color: #fff0c3;
  text-shadow:
    0 2px 2px #3b1f17,
    0 0 13px #3b1f17;
}
.banner-copy .eyebrow {
  color: #ffdb7d;
  font:
    800 clamp(11px, 1vw, 15px) Georgia,
    serif;
  letter-spacing: 0.15em;
}
.banner-copy h1 {
  margin: 5px 0 7px;
  font:
    900 clamp(34px, 5vw, 80px)/0.92 Georgia,
    serif;
  letter-spacing: 0.025em;
}
.banner-copy #banner-description {
  max-width: 740px;
  margin: 0;
  font:
    700 clamp(14px, 1.25vw, 20px)/1.3 Georgia,
    serif;
}
.home-screen.menu-open .banner-page .banner-controls {
  display: flex;
  min-height: 0;
  padding: clamp(14px, 2vw, 30px);
  border: 0;
  border-radius: 0;
  background: #e5cf9e;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(95, 63, 39, 0.08),
    rgba(95, 63, 39, 0.08) 1px,
    transparent 1px,
    transparent 5px
  );
  box-shadow: inset 5px 0 #704231;
  color: #32241a;
  flex-direction: column;
  gap: clamp(9px, 1vw, 16px);
  overflow: auto;
}
.featured-panel h2,
.priority-picker h2 {
  margin: 0 0 8px;
  color: #204d4c;
  font:
    900 clamp(19px, 2vw, 31px) Georgia,
    serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.featured-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.featured-player {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-top: 1px solid rgba(68, 59, 39, 0.42);
  border-bottom: 1px solid rgba(255, 250, 217, 0.66);
  font:
    800 clamp(13px, 1.15vw, 18px)/1.05 Georgia,
    serif;
}
.featured-player img {
  width: clamp(34px, 3.2vw, 52px);
  aspect-ratio: 1;
  border: 2px solid #8e4f38;
  border-radius: 5px;
  object-fit: cover;
  background: #3e5d5a;
}
.featured-player span {
  overflow-wrap: anywhere;
}
.home-screen.menu-open .banner-page .rate-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 8px;
  align-items: end;
  margin: 0;
  padding: 11px 13px;
  border: 2px solid #75513a;
  border-radius: 7px;
  background: rgba(255, 244, 202, 0.5);
  font:
    800 clamp(14px, 1.2vw, 18px) Georgia,
    serif;
  text-transform: uppercase;
}
.home-screen.menu-open .banner-page .rate-summary b {
  font:
    900 clamp(28px, 3vw, 48px)/0.8 Georgia,
    serif;
  color: #9f3c2d;
}
.home-screen.menu-open .banner-page .rate-summary small {
  grid-column: 1/-1;
  color: #5c4834;
  font:
    700 13px/1.2 Georgia,
    serif;
  text-transform: none;
}
.vial-display {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border: 2px solid #75513a;
  border-radius: 7px;
  background: rgba(255, 244, 202, 0.5);
}
.vial-icon {
  position: relative;
  display: block;
  width: 40px;
  height: 58px;
  border: 3px solid #5c493a;
  border-radius: 9px 9px 14px 14px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.75),
    rgba(255, 255, 255, 0.16)
  );
  overflow: hidden;
}
.vial-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 60%;
  border-radius: 5px 5px 10px 10px;
  background: linear-gradient(90deg, #e4a328, #ffd96b, #b87311);
}
.vial-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: -8px;
  height: 10px;
  border: 3px solid #5c493a;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #825a34;
}
.vial-display[data-sand="jade"] .vial-icon::before {
  background: linear-gradient(90deg, #137c60, #68d59a, #1c8c68);
}
.vial-display b {
  display: block;
  color: #244f4d;
  font:
    900 clamp(15px, 1.3vw, 20px) Georgia,
    serif;
  text-transform: uppercase;
}
.vial-display small {
  display: block;
  margin-top: 3px;
  color: #594331;
  font:
    700 13px/1.2 Georgia,
    serif;
}
.home-screen.menu-open .banner-page .priority-picker {
  margin: 0;
  padding: 11px;
  border: 2px solid #477b70;
  border-radius: 7px;
  background: rgba(227, 246, 213, 0.48);
}
.home-screen.menu-open .banner-page .priority-picker h2 {
  font-size: clamp(17px, 1.65vw, 25px);
}
.home-screen.menu-open .banner-page .priority-picker p {
  margin: 0 0 9px;
  color: #4c3e2e;
  font:
    700 13px/1.25 Georgia,
    serif;
}
.home-screen.menu-open .banner-page #priority-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.home-screen.menu-open .banner-page #priority-options button {
  min-width: 0;
  padding: 7px 4px;
  border: 2px solid #366862;
  border-radius: 5px;
  background: #e7d2a0;
  color: #264b49;
  font:
    800 clamp(11px, 1vw, 15px)/1.1 Georgia,
    serif;
}
.home-screen.menu-open .banner-page #priority-options button.selected {
  background: #276d64;
  color: #fff2c6;
  box-shadow: inset 0 0 0 2px #a7d6a2;
}
.home-screen.menu-open .banner-page .banner-rules {
  margin: 0;
  color: #60432f;
  font:
    700 clamp(12px, 1vw, 16px)/1.35 Georgia,
    serif;
}
.home-screen.menu-open .banner-page .pull-actions {
  grid-column: 1/-1;
  display: flex;
  min-height: clamp(100px, 12vw, 172px);
  margin: 0;
  padding: clamp(12px, 1.5vw, 24px);
  border-top: clamp(4px, 0.45vw, 8px) solid #1a4c4d;
  background: linear-gradient(90deg, #1f4c4d, #28605b, #1f4c4d);
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 34px);
  box-shadow: inset 0 3px rgba(255, 234, 174, 0.18);
}
.home-screen.menu-open .banner-page .pull-actions button {
  display: flex;
  min-width: min(92vw, 360px);
  padding: clamp(13px, 1.5vw, 22px) clamp(28px, 4vw, 70px);
  border: 3px solid #f9d48b;
  border-radius: 10px;
  background: #2b716a;
  color: #fff5d5;
  box-shadow:
    inset 0 0 0 3px #15544f,
    0 5px 0 #153e3e;
  font-family: Georgia, serif;
  flex-direction: column;
  align-items: center;
  text-transform: uppercase;
}
.home-screen.menu-open .banner-page .pull-actions button.primary {
  background: #ad4732;
}
.home-screen.menu-open .banner-page .pull-actions button strong {
  font:
    900 clamp(26px, 3.2vw, 51px)/0.95 Georgia,
    serif;
}
.home-screen.menu-open .banner-page .pull-actions button small {
  margin-top: 5px;
  color: #ffe8a5;
  font:
    800 clamp(14px, 1.2vw, 19px) Georgia,
    serif;
  text-transform: none;
}
.home-screen.menu-open .banner-page .pull-actions button:hover,
.home-screen.menu-open .banner-page .pull-actions button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.13);
  outline: 3px solid #fff1ac;
  outline-offset: 3px;
}
.home-screen.menu-open
  .banner-page
  .banner-detail[data-banner="jade"]
  .banner-copy
  .eyebrow,
.home-screen.menu-open
  .banner-page
  .banner-detail[data-banner="jade"]
  .banner-copy
  h1 {
  color: #d5ffe1;
}
.home-screen.menu-open
  .banner-page
  .banner-detail[data-banner="jade"]
  .pull-actions
  button.primary {
  background: #1e7866;
}
@media (max-width: 900px) {
  .home-screen.menu-open .banner-page:not([hidden]) {
    padding: 9px;
    overflow: auto;
  }
  .recruit-marquee {
    min-height: 68px;
  }
  .home-screen.menu-open .banner-page .banner-detail {
    grid-template-columns: 1fr;
    grid-template-rows: 300px auto auto;
    overflow: visible;
  }
  .home-screen.menu-open .banner-page .banner-controls {
    overflow: visible;
  }
  .featured-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-screen.menu-open .banner-page .pull-actions {
    grid-column: auto;
    min-height: 96px;
    flex-wrap: wrap;
  }
  .home-screen.menu-open .banner-page .pull-actions button {
    min-width: min(84vw, 330px);
  }
  .banner-copy {
    padding: 22px;
  }
  .home-screen.menu-open .banner-page .banner-topbar {
    gap: 7px;
  }
  .home-screen.menu-open .banner-page .sand-wallet {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .home-screen.menu-open .banner-page #priority-options {
    grid-template-columns: 1fr;
  }
}

/* Exact first-pass reconstruction: the approved board is a single canvas while controls remain live hit areas. */
.home-screen.menu-open .banner-page:not([hidden]) {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  transform: none !important;
  background: #172d31 url("assets/recruit/recruit-banner-new-recruits.png")
    center/cover no-repeat !important;
  color: transparent !important;
}
.home-screen.menu-open .banner-page .recruit-marquee {
  display: none !important;
}
.home-screen.menu-open .banner-page .banner-topbar {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  min-height: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}
.home-screen.menu-open .banner-page .banner-topbar button,
.home-screen.menu-open .banner-page .sand-wallet {
  position: absolute !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  pointer-events: auto;
}
.home-screen.menu-open .banner-page #banner-back {
  left: 6.3% !important;
  top: 82% !important;
  width: 11.5% !important;
  height: 12.5% !important;
}
.home-screen.menu-open .banner-page #pull-history {
  left: 69.5% !important;
  top: 73% !important;
  width: 12% !important;
  height: 11% !important;
}
.home-screen.menu-open .banner-page #drop-help {
  left: 82.5% !important;
  top: 73% !important;
  width: 12% !important;
  height: 11% !important;
}
.home-screen.menu-open .banner-page .sand-wallet {
  left: 77% !important;
  top: 4% !important;
  width: 16% !important;
  height: 11% !important;
  pointer-events: none;
}
.home-screen.menu-open .banner-page .banner-detail {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  pointer-events: none;
}
.home-screen.menu-open .banner-page .banner-showcase,
.home-screen.menu-open .banner-page .banner-controls {
  display: none !important;
}
.home-screen.menu-open .banner-page .pull-actions {
  position: absolute !important;
  left: 39% !important;
  top: 80% !important;
  display: flex !important;
  width: 23% !important;
  height: 16% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: auto;
}
.home-screen.menu-open .banner-page .pull-actions button {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  color: transparent !important;
  cursor: pointer;
}
.home-screen.menu-open .banner-page .pull-actions button:not(.primary) {
  display: none !important;
}
.home-screen.menu-open .banner-page .banner-topbar button:focus-visible,
.home-screen.menu-open .banner-page .pull-actions button:focus-visible {
  opacity: 1 !important;
  outline: 3px solid #fff0b6 !important;
  outline-offset: -3px !important;
  background: rgba(255, 244, 181, 0.17) !important;
}
.home-screen.menu-open .banner-page .sand-wallet {
  left: 74% !important;
  top: 12.8% !important;
  display: block !important;
  width: 12.7% !important;
  height: 7.4% !important;
  padding: 0 !important;
  opacity: 1 !important;
  color: #173f42 !important;
  font-family: "Roboto Slab", Georgia, serif !important;
  letter-spacing: 0.01em;
  transform: none;
}
.home-screen.menu-open .banner-page .sand-wallet img {
  display: none !important;
}
.home-screen.menu-open .banner-page .sand-wallet b {
  position: absolute !important;
  top: 51% !important;
  left: 50% !important;
  margin: 0 !important;
  color: #1e3840 !important;
  font:
    900 clamp(24px, 2.55vw, 42px)/0.95 "Roboto Slab",
    Georgia,
    serif !important;
  letter-spacing: 0.015em;
  text-align: center;
  transform: translateX(-50%);
  text-shadow: 0 1px 0 rgba(255, 241, 194, 0.75);
  white-space: nowrap;
}

/* New Recruits roster is layered over the cleared live-board rows. */
.home-screen.menu-open .banner-page .banner-roster {
  position: absolute;
  z-index: 4;
  left: 71.4%;
  top: 57.2%;
  display: grid;
  width: 20.5%;
  height: 15.2%;
  grid-template-rows: repeat(3, 1fr);
  pointer-events: none;
}
.home-screen.menu-open .banner-page .banner-roster article {
  display: flex;
  align-items: center;
  gap: clamp(7px, 0.65vw, 12px);
  min-width: 0;
  color: #1b504f;
  font:
    900 clamp(12px, 1.18vw, 20px)/1 "Roboto Slab",
    Georgia,
    serif;
}
.home-screen.menu-open .banner-page .banner-roster img {
  width: clamp(27px, 2.45vw, 44px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border: 1px solid #805039;
  border-radius: 3px;
  object-fit: cover;
  background: #e5cf9e;
}
.home-screen.menu-open .banner-page .banner-roster span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Four featured rows and the compact bottom-plank utility controls. */
.home-screen.menu-open .banner-page #pull-history {
  left: 83.7% !important;
  top: 82.7% !important;
  width: 8.9% !important;
  height: 5.1% !important;
}
.home-screen.menu-open .banner-page #drop-help {
  left: 83.7% !important;
  top: 89.5% !important;
  width: 8.9% !important;
  height: 5.1% !important;
}
.home-screen.menu-open .banner-page .banner-roster {
  left: 70.8%;
  top: 57.9%;
  width: 21.7%;
  height: 19.7%;
  grid-template-rows: repeat(4, 1fr);
}
.home-screen.menu-open .banner-page .banner-roster article {
  gap: clamp(7px, 0.65vw, 12px);
  font-size: clamp(11px, 1.08vw, 19px);
}
.home-screen.menu-open .banner-page .banner-roster img {
  width: clamp(25px, 2.3vw, 41px);
}
.home-screen.menu-open .banner-page .banner-roster b {
  margin-left: auto;
  color: #9f3c2d;
  font:
    900 clamp(10px, 1vw, 18px)/1 "Roboto Slab",
    Georgia,
    serif;
  white-space: nowrap;
}
.home-screen.menu-open .banner-page .banner-roster .tutorial-reward b {
  color: #9a7131;
  font-size: clamp(8px, 0.75vw, 13px);
  text-transform: uppercase;
}

/* Interaction zones for the wider outpainted recruitment board. */
.home-screen.menu-open .banner-page #banner-back {
  left: 18.3% !important;
  top: 72.7% !important;
  width: 9% !important;
  height: 8% !important;
}
.home-screen.menu-open .banner-page .pull-actions {
  left: 43.5% !important;
  top: 70.5% !important;
  width: 15.5% !important;
  height: 11% !important;
}
.home-screen.menu-open .banner-page #pull-history {
  left: 67.4% !important;
  top: 64.4% !important;
  width: 7.2% !important;
  height: 4.5% !important;
}
.home-screen.menu-open .banner-page #drop-help {
  left: 75.7% !important;
  top: 64.4% !important;
  width: 7.5% !important;
  height: 4.5% !important;
}

/* One deliberate, readable discount strike across the baked 1,000 price. */
.home-screen.menu-open .banner-page #pull-actions {
  isolation: isolate;
}
.home-screen.menu-open .banner-page #pull-actions::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 34%;
  top: 61%;
  width: 20%;
  height: clamp(3px, 0.34vw, 6px);
  border-radius: 999px;
  background: #7c251d;
  box-shadow: 0 1px 0 rgba(255, 224, 157, 0.35);
  transform: rotate(-9deg);
  transform-origin: center;
  pointer-events: none;
}

/* ==========================================================================
   Live gameplay shell — ported from temporary-court.html
   ========================================================================== */

body:has(.match-screen) {
  min-width: 320px;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #071e28 url("assets/beach.png") center / cover no-repeat;
}

.match-screen {
  position: relative;
  display: block;
  width: min(177.7778vh, 100vw);
  min-height: 0;
  height: 100vh;
  overflow: hidden;
  background: url("assets/ui-concepts/concept-17-clean-gameplay-shell-css-court-grid-4k.png")
    center / 100% 100% no-repeat;
}

.match-header,
.battlefield,
.action-dock,
.resolution {
  position: absolute;
  inset-inline: 0;
  z-index: 5;
}

.match-header {
  top: 0;
  height: 15%;
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
}

.match-header .brand {
  display: none;
}

.match-header .settings {
  position: absolute;
  top: 3.8%;
  right: 3%;
  z-index: 2;
  width: 3.4%;
  min-width: 34px;
  height: 36%;
  min-height: 28px;
  border: 1px solid #d9b46a;
  border-radius: 8px;
  background: rgb(13 69 74 / 82%);
  color: #f4d891;
}

.match-score {
  position: static;
}

.scoreboard {
  display: block;
  font:
    400 clamp(1.25rem, 4.1vw, 4.9rem) / 1 "Oswald",
    "Arial Narrow",
    sans-serif;
  letter-spacing: 0;
  color: #f2d798;
  text-shadow:
    0 2px 0 #65301d,
    1px 0 0 #65301d,
    -1px 0 0 #65301d;
}

.scoreboard span {
  position: absolute;
  top: 26.7%;
  width: 7.9%;
  text-align: center;
}

.scoreboard span:first-child {
  left: 29%;
}

.scoreboard span:last-child {
  left: 62.7%;
}

.scoreboard i {
  display: none;
}

.match-score small {
  position: absolute;
  top: 75.3%;
  left: 50%;
  display: grid;
  width: 17%;
  height: 25.3%;
  margin: 0;
  place-items: center;
  color: #173f3f;
  font:
    600 clamp(0.6rem, 1.1vw, 1.1rem) / 1 "Oswald",
    "Arial Narrow",
    sans-serif;
  letter-spacing: 0.1em;
  text-align: center;
  text-shadow: 0 1px 0 rgb(255 224 165 / 40%);
  transform: translateX(-50%);
}

.battlefield {
  inset-block: 0;
  display: block;
  padding: 0;
  pointer-events: none;
}

.team-panel,
.team-panel.player-team,
.team-panel.opponent-team {
  position: absolute;
  top: 17.6%;
  display: block;
  width: 23.5%;
  height: 57.4074%;
  padding: 0;
  pointer-events: auto;
}

.team-panel.player-team {
  left: 1.5%;
}

.team-panel.opponent-team {
  left: 74%;
}

.team-panel .team-tag {
  display: none;
}

.team-panel .player-card {
  position: absolute;
  top: 0;
  width: 49.85%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.team-panel .player-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: url("assets/ui-concepts/empty-player-card-template-narrow-transparent-450x1240.png")
    center / 100% 100% no-repeat;
}

.team-panel .player-card:first-of-type {
  left: 0;
}

.team-panel .player-card + .player-card {
  right: 0;
}

.team-panel .player-card:hover,
.team-panel .player-card.selected-server,
.team-panel .player-card.active-card {
  filter: drop-shadow(0 0 10px rgb(243 204 114 / 82%));
  border: 0;
  box-shadow: none;
}

.team-panel .portrait {
  position: absolute;
  top: 11.5%;
  left: 11%;
  width: 80%;
  height: 43%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  z-index: 1;
}

.team-panel .portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.team-panel .card-info {
  position: absolute;
  inset: 0;
  min-width: 0;
  text-align: center;
  pointer-events: none;
  z-index: 3;
}

.team-panel .card-info h2 {
  position: absolute;
  top: calc(4.2% - 5px);
  left: 6%;
  width: 88%;
  margin: 0;
  color: #6e2d1c;
  font:
    700 clamp(0.8rem, 1.52vw, 1.6rem) / 1 "Oswald",
    "Arial Narrow",
    sans-serif;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgb(255 230 170 / 35%);
}

.team-panel .card-info p {
  position: absolute;
  top: 8.4%;
  left: 6%;
  width: 88%;
  margin: 0;
  color: #0a503b;
  font:
    600 clamp(0.5rem, 0.9vw, 0.9rem) / 1 "Oswald",
    "Arial Narrow",
    sans-serif;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.team-panel .stamina {
  position: absolute;
  top: 94.3%;
  left: 31%;
  display: flex;
  align-items: baseline;
  gap: 0.22em;
  margin: 0;
  color: #173f3f;
  font:
    600 clamp(0.55rem, 1vw, 1rem) / 1 "Oswald",
    "Arial Narrow",
    sans-serif;
  white-space: nowrap;
}

.team-panel .stamina > span {
  font-size: 0;
}

.team-panel .stamina > span::after {
  content: "STAMINA";
  font-size: clamp(0.55rem, 1vw, 1rem);
}

.team-panel .stamina b {
  color: #6e2d1c;
  font-size: inherit;
  margin: 0;
}

.team-panel .stamina em {
  color: #6e2d1c;
  opacity: 1;
}

.team-panel .player-card .stat-list {
  position: absolute;
  top: 58.2%;
  left: 12.6%;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  width: 77.4%;
  height: 20.35%;
  margin: 0;
  padding: 0;
  gap: 0;
  z-index: 3;
}

.team-panel .stat-list span {
  display: grid;
  grid-template-columns: 15% 1fr 11% auto;
  align-items: center;
  gap: 4px;
  color: #173f3f;
  font:
    600 clamp(0.55rem, 1vw, 1rem) / 1 "Oswald",
    "Arial Narrow",
    sans-serif;
}

.team-panel .stat-list i {
  width: calc(var(--stat) * 100% / 15);
  height: 28%;
  min-height: 5px;
  transform: translate(-2px, 1px);
  background: linear-gradient(90deg, #8f251a, #bd472d);
  border-radius: 999px;
}

.team-panel .opponent-stats i {
  background: linear-gradient(90deg, #8f251a, #bd472d);
}

.team-panel .stat-list em {
  color: #173f3f;
  font-size: inherit;
  font-style: normal;
  text-align: right;
}

.team-panel .card-skill-table {
  position: absolute;
  top: 81.7%;
  left: 10.4%;
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  width: 79%;
  height: 7.75%;
  margin: 0;
  padding: 0;
  color: #6e2d1c;
  font:
    600 clamp(0.45rem, 0.79vw, 0.78rem) / 1 "Oswald",
    "Arial Narrow",
    sans-serif;
  text-align: center;
  z-index: 3;
}

.team-panel .card-skill-table div {
  display: grid;
  /* Matches the left label cells already drawn into the card template. */
  grid-template-columns: 35% 1fr;
  min-width: 0;
}

.team-panel .card-skill-table dt,
.team-panel .card-skill-table dd {
  display: grid;
  min-width: 0;
  margin: 0;
  place-items: center;
  white-space: nowrap;
}

.team-panel .card-skill-table dt {
  color: #6e2d1c;
  background: rgb(199 146 67 / 88%);
  box-shadow:
    inset 0 1px 0 rgb(255 231 176 / 55%),
    inset -1px 0 0 rgb(93 54 24 / 42%);
}

.team-panel .card-skill-table dd {
  padding-inline: 3%;
  color: #6e2d1c;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-panel .ability-panel {
  display: none;
}

.court-wrap {
  position: absolute;
  inset: 0;
  width: auto;
  max-width: none;
  height: auto;
  padding: 0;
  z-index: 1;
  /* The original desktop layout centred this container as a grid item. In the
     full-screen shell it must stretch to the entire board instead. */
  justify-self: stretch;
  align-self: stretch;
  pointer-events: auto;
}

.court-wrap > .court {
  display: none;
}

.turn-badge {
  top: 15.2%;
  left: 50%;
  z-index: 8;
  padding: 5px 12px;
  color: #fff5d5;
  font:
    600 clamp(0.55rem, 0.9vw, 0.85rem) / 1 "Oswald",
    sans-serif;
}

.grid-guide {
  display: none;
}

.live-court-grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.live-court-grid__side {
  position: absolute;
  top: calc(24% + 1px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  height: calc(42.8% - 8px);
}

/* The clickable targets follow these exact grid cells; when a target phase is
   active the grid remains visible underneath the player/ball markers. */

.live-court-grid__side--left {
  left: calc(32.3% - 14px);
  width: calc(16.7% - 5px);
}

.live-court-grid__side--right {
  left: calc(50.9% + 5px);
  width: calc(16.7% + 5px);
}

.live-court-grid__side span {
  border: 2px dashed rgb(255 241 190 / 92%);
  border-radius: 5%;
  background: rgb(244 218 148 / 18%);
  box-shadow: inset 0 0 0 1px rgb(92 62 29 / 26%);
}

.target-spots {
  inset: 0;
  z-index: 4;
}

.target-spots button {
  width: calc(8.35% - 5px);
  height: calc(14.2667% - 6px);
  margin: 0;
}

.target-one,
.target-two,
.target-three {
  left: calc(50.9% + 5px);
}

.target-four,
.target-five,
.target-six {
  left: calc(59.25% + 5px);
}

.target-one,
.target-four {
  top: calc(24% + 1px);
}

.target-two,
.target-five {
  top: 38.2667%;
}

.target-three,
.target-six {
  top: calc(52.5334% - 1px);
}

/* The target overlay must use the exact same measurements as the visible
   left/right CSS grids. These override the older desktop target-left rules. */
.target-spots.target-left .target-one,
.target-spots.target-left .target-two,
.target-spots.target-left .target-three {
  left: calc(32.3% - 14px);
  width: calc(8.35% - 5px);
}

.target-spots.target-left .target-four,
.target-spots.target-left .target-five,
.target-spots.target-left .target-six {
  left: calc(40.65% - 14px);
  width: calc(8.35% - 5px);
}

.target-spots:not(.target-left) .target-one,
.target-spots:not(.target-left) .target-two,
.target-spots:not(.target-left) .target-three {
  left: calc(50.9% + 5px);
  width: 8.35%;
}

.target-spots:not(.target-left) .target-four,
.target-spots:not(.target-left) .target-five,
.target-spots:not(.target-left) .target-six {
  left: calc(59.25% + 5px);
  width: 8.35%;
}

.serve-spots {
  inset: 0;
  z-index: 6;
}

.serve-spot {
  width: 4.5%;
  height: auto;
  aspect-ratio: 1;
  font-size: 0;
}

.serve-spot.seven {
  left: 27.4%;
  top: 31.1%;
}

.serve-spot.eight {
  left: 27.4%;
  top: 59.2%;
}

.court-player {
  z-index: 5;
  width: 4.5%;
  height: auto;
  aspect-ratio: 1;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 50%;
  background: #f7f0d9;
}

.court-player > img {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 0;
  border: 2px solid #f7f0d9;
  border-radius: inherit;
  box-shadow: none;
  object-fit: cover;
  object-position: center;
}

.court-player.player-target-1,
.court-player.player-target-2,
.court-player.player-target-3 {
  left: calc(44.825% - 16.5px);
}

.court-player.player-target-4,
.court-player.player-target-5,
.court-player.player-target-6 {
  left: calc(36.475% - 16.5px);
}

.court-player.target-1,
.court-player.target-2,
.court-player.target-3 {
  left: calc(55.075% + 5px);
}

.court-player.target-4,
.court-player.target-5,
.court-player.target-6 {
  left: calc(63.425% + 5px);
}

.court-player.player-target-1,
.court-player.target-1 {
  top: calc(31.1333% - 2px);
}

.court-player.player-target-2,
.court-player.target-2 {
  top: calc(45.4% - 3px);
}

.court-player.player-target-3,
.court-player.target-3 {
  top: calc(59.6667% - 4px);
}

.court-player.player-target-4,
.court-player.target-4 {
  top: calc(31.1333% - 2px);
}

.court-player.player-target-5,
.court-player.target-5 {
  top: calc(45.4% - 3px);
}

.court-player.player-target-6,
.court-player.target-6 {
  top: calc(59.6667% - 4px);
}

.court-player.at-seven {
  left: 27.4%;
  top: 31.1%;
}

.court-player.at-eight {
  left: 27.4%;
  top: 59.2%;
}

.court-player.opponent-at-seven {
  left: 72.6%;
  top: 31.1%;
}

.court-player.opponent-at-eight {
  left: 72.6%;
  top: 59.2%;
}

.court-ball {
  z-index: 7;
  width: 2.2%;
  height: auto;
}

.court-ball.at-seven {
  left: calc(27.4% + 3.3%);
  top: calc(31.1% - 4.6%);
}

.court-ball.at-eight {
  left: calc(27.4% + 3.3%);
  top: calc(59.2% - 4.6%);
}

.court-ball.opponent-at-seven {
  left: calc(72.6% + 3.3%);
  top: calc(31.1% - 4.6%);
}

.court-ball.opponent-at-eight {
  left: calc(72.6% + 3.3%);
  top: calc(59.2% - 4.6%);
}

.action-dock {
  bottom: 1.15%;
  display: grid;
  grid-template-columns: 15% 1fr 12%;
  gap: 1.2%;
  height: 15.1852%;
  padding: 0 4.5%;
  align-items: stretch;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.action-prompt,
.confirm {
  align-self: center;
}

.action-prompt span {
  color: #ffc66f;
  font:
    600 clamp(0.5rem, 0.8vw, 0.8rem) "Oswald",
    sans-serif;
}

.action-prompt strong {
  color: #fff5d5;
  font:
    700 clamp(0.7rem, 1vw, 1.1rem) "Oswald",
    sans-serif;
}

.actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.78125%;
  overflow: hidden;
}

.action,
.special-skill-action,
.ability-action {
  position: relative;
  min-width: 0;
  flex: 0 0 auto;
  width: auto;
  height: 100%;
  aspect-ratio: 576 / 328;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("assets/ui-concepts/actions/action-card-base-empty-576x328.png")
    center / 100% 100% no-repeat;
  color: #8f251a;
  font-family: "Rye", Georgia, serif;
  text-align: center;
  text-shadow: 0 1px 0 rgb(255 223 153 / 42%);
  box-shadow: none;
  --action-ink: #8f251a;
  --action-copy-top: 5%;
  --action-copy-left: 5%;
  --action-copy-width: 42%;
  --action-title-size: clamp(0.8rem, 1.35vw, 1.32rem);
  --action-detail-size: 0.72em;
  --action-copy-line-height: 1.05;
}

/* Each decision class shares the same physical block, with distinct text
   colours only—no added bars or extra decoration over the artwork. */

.action--serve {
  --action-ink: #8f251a;
  --action-title-size: clamp(0.82rem, 1.38vw, 1.36rem);
}

.action--pass {
  --action-ink: #314e78;
  --action-title-size: clamp(0.76rem, 1.22vw, 1.2rem);
  --action-detail-size: 0.68em;
}

.action--receive {
  --action-ink: #164d68;
  --action-title-size: clamp(0.76rem, 1.2vw, 1.18rem);
  --action-detail-size: 0.68em;
}

.action--block {
  --action-ink: #1c5f62;
  --action-title-size: clamp(0.78rem, 1.24vw, 1.22rem);
}

.action--spike {
  --action-ink: #943d18;
  --action-title-size: clamp(0.8rem, 1.3vw, 1.28rem);
}

.action--feint {
  --action-ink: #8a3a60;
  --action-title-size: clamp(0.82rem, 1.34vw, 1.32rem);
  --action-detail-size: 0.66em;
}

.action--movement {
  --action-ink: #07574f;
  --action-title-size: clamp(0.76rem, 1.18vw, 1.16rem);
  --action-detail-size: 0.64em;
  --action-copy-line-height: 1;
}

.action--skill {
  --action-ink: #8f251a;
  --action-title-size: clamp(0.76rem, 1.18vw, 1.16rem);
  --action-detail-size: 0.64em;
}

.action--ability {
  --action-ink: #715212;
  --action-title-size: clamp(0.76rem, 1.16vw, 1.14rem);
  --action-detail-size: 0.64em;
}

.action--target {
  --action-ink: #73511c;
  --action-title-size: clamp(0.8rem, 1.28vw, 1.26rem);
}

.action--utility {
  --action-ink: #414542;
  --action-title-size: clamp(0.76rem, 1.18vw, 1.16rem);
}

.action--choice {
  --action-ink: #7d4619;
  --action-title-size: clamp(0.78rem, 1.24vw, 1.22rem);
}

.action:hover,
.special-skill-action:hover,
.ability-action:hover {
  background: url("assets/ui-concepts/actions/action-card-base-empty-576x328.png")
    center / 100% 100% no-repeat;
  filter: brightness(1.08) drop-shadow(0 5px 7px rgb(0 0 0 / 42%));
}

.action.selected {
  color: #5e1b15;
  border: 0;
  background: url("assets/ui-concepts/actions/action-card-base-empty-576x328.png")
    center / 100% 100% no-repeat;
  box-shadow: inset 0 0 0 3px #f4d88f;
}

.action-copy {
  position: absolute;
  top: var(--action-copy-top);
  left: var(--action-copy-left);
  display: flex;
  width: var(--action-copy-width);
  height: 90%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: var(--action-copy-line-height);
  text-align: center;
}

.action-copy b { color: var(--action-ink); }

.action-copy b {
  font-size: var(--action-title-size);
}

.action b,
.action em,
.action small {
  display: block;
  font: inherit;
}

.action em,
.action small,
.action .action-cost {
  margin-top: 0.25em;
  color: color-mix(in srgb, var(--action-ink) 78%, #173f3f);
  font-size: var(--action-detail-size);
  opacity: 1;
}

.action .icon,
.action-portrait,
.special-skill-action img,
.ability-action img {
  position: absolute;
  top: 5%;
  right: calc(4% + 10px);
  width: 45%;
  height: 90%;
  margin: 0;
  float: none;
  object-fit: contain;
}

.action .icon {
  display: grid;
  place-items: center;
  color: #8f251a;
  font-size: clamp(1.25rem, 2.1vw, 2.35rem);
}

.confirm {
  height: 56%;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #b64e38, #843225);
  color: #f4d791;
  font:
    700 clamp(0.6rem, 1vw, 1rem) / 1 "Rye",
    Georgia,
    serif;
  box-shadow: 0 3px 0 #5b241b;
}

.resolution {
  bottom: 0.1%;
  z-index: 7;
  height: 2.2%;
  background: transparent;
  color: #f5ddab;
  font:
    600 clamp(0.45rem, 0.65vw, 0.68rem) / 1 "Oswald",
    sans-serif;
}

@media (max-aspect-ratio: 4 / 3) {
  .match-screen {
    width: 100vw;
    height: 56.25vw;
    min-height: 0;
  }
}
