/* PES 2013 retail menu proportions and demo exhibition treatment. */
.console-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #030507;
}

.console-backdrop > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.console-hero-art {
  background: url('/menu/touchline.webp') center center / cover no-repeat;
}

.console-facets { filter: drop-shadow(0 2px 6px #000); }

.console-backdrop[data-variant='top'] .backdrop-shade {
  background: linear-gradient(180deg, #0003, transparent 36%, #0002 76%, #000b);
}

.console-backdrop[data-variant='competition'] .console-hero-art {
  filter: blur(5px);
  transform: scale(1.025);
}

.console-backdrop[data-variant='competition'] .console-facets { opacity: .48; }
.console-backdrop[data-variant='competition'] .backdrop-shade { background: #000b; }

.console-backdrop[data-variant='exhibition'] .console-facets { display: none; }
.console-backdrop[data-variant='exhibition'] .console-hero-art {
  background-image: url('/menu/stadium.webp');
  filter: blur(2px) saturate(1.25);
  transform: scale(1.02);
}

.console-backdrop[data-variant='exhibition'] .backdrop-shade {
  background:
    radial-gradient(ellipse at 50% -8%, #1479c388, transparent 49%),
    linear-gradient(180deg, #02060a15, #02050aca 29%, #020405f5 55%, #030405 93%);
}

.top-menu, .console-page {
  position: relative;
  width: 100%;
  height: 100dvh;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .875rem;
  text-shadow: 0 1px 2px #000;
}

.top-menu-brand {
  position: absolute;
  top: 5%;
  left: 9%;
  font-size: clamp(1.35rem, 3.3vw, 3.5rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.065em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 2px 1px #000, 0 0 10px #0a2c53;
}

.top-menu-brand strong { color: #79c5fa; }

.top-menu-rail {
  position: absolute;
  top: 61%;
  left: 8%;
  right: 0;
  animation: rail-in .22s ease-out both;
}

@keyframes rail-in {
  from { opacity: 0; transform: translateX(3%); }
}

.top-menu-ribbon {
  position: relative;
  isolation: isolate;
  padding: .42rem 1.25rem .5rem clamp(2rem, 6vw, 6rem);
  border-block: 2px solid #4d7aaa;
  background:
    repeating-linear-gradient(135deg, #182b451f 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #132333f7 0 28%, #182f51 29%, #071b39 87%, #163255);
  box-shadow: inset 0 1px #a7c2df, inset 0 -1px #2e426a, 0 2px 8px #000;
  clip-path: polygon(2.2% 0, 100% 0, 100% 100%, 2.2% 100%, 0 50%);
}

.top-menu-selection {
  font-size: clamp(1rem, 2.6vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  margin-block: .18rem .25rem;
}

.top-menu-icons { display: flex; gap: .3rem; }

.top-menu-icons button {
  display: grid;
  place-items: center;
  grid-template-rows: auto 2.3em;
  align-content: center;
  gap: .2rem;
  width: clamp(4.1rem, 8.3vw, 8rem);
  min-height: clamp(3.5rem, 9vh, 5.5rem);
  padding: .38rem .24rem;
  border: 1px solid transparent;
  color: #c2d4e7;
  border-radius: 2px;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.top-menu-icons svg { width: clamp(1.3rem, 2.65vw, 2.45rem); height: auto; aspect-ratio: 1; }
.top-menu-icons button:hover { color: white; background-color: #7fb9ef22; }
.top-menu-icons button:focus-visible { outline: 2px solid #c4e9ff; outline-offset: -3px; }

.top-menu-icons span {
  font-size: clamp(.55rem, 1vw, .85rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.top-menu-icons button[data-active='true'] {
  color: #fff;
  background: linear-gradient(#173b5b, #145088 76%, #1f639b);
  border-color: #a8d8ff;
  box-shadow: inset 0 -2px #69c3ff, inset 0 0 7px #80c7ff45;
}

.top-menu-detail {
  margin: .55rem 1rem 0 clamp(2rem, 6vw, 6rem);
  min-height: 2.5em;
  max-width: min(48ch, 87vw);
  color: #eef6ff;
  text-shadow: 0 1px 3px #000, 0 1px 6px #000;
  font-size: clamp(.76rem, 1.3vw, 1.02rem);
  font-weight: 700;
}

.top-menu-selection span:not(.top-menu-section), .top-menu-detail span { display: inline-block; animation: selection-in .15s ease-out both; }
@keyframes selection-in { from { opacity: .5; transform: translateY(2px); } }
/* The menu's bottom bar: the same BACK / CONTINUE bar as every other screen, along the bottom edge. */
.top-menu-footer {
  position: absolute;
  bottom: max(clamp(.6rem, 4vh, 2.2rem), env(safe-area-inset-bottom));
  left: clamp(.65rem, 8vw, 10rem);
  right: clamp(.65rem, 8vw, 10rem);
}

.top-menu-footer .screen-nav-hints { color: #fff; font-size: .82rem; }

.console-page {
  display: flex;
  flex-direction: column;
  max-width: 100rem;
  margin: auto;
  padding: clamp(1rem, 6vh, 4.8rem) clamp(.65rem, 9vw, 10rem) clamp(.45rem, 3vh, 2.6rem);
}

.console-page :is(.font-display, .panel-title) {
  font-family: inherit;
  font-style: normal;
  letter-spacing: .025em;
}

.console-heading {
  display: flex;
  align-items: center;
  flex: none;
  gap: .65rem;
  min-height: 2.25rem;
  border-bottom: 1px dotted #8092a8ad;
  padding-bottom: .45rem;
}

.console-title {
  font-size: clamp(1.15rem, 2.2vw, 1.8rem);
  font-weight: 750;
  line-height: 1;
}

.console-brand {
  margin-left: auto;
  font-size: .75rem;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  color: #c4d0df;
}

.console-content {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: .55rem;
  padding: .65rem .15rem;
  animation: console-enter .18s ease-out both;
}

@keyframes console-enter { from { opacity: 0; } }

.console-footer {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem .7rem;
  padding-top: .5rem;
}

.console-page .panel {
  background: #16191ed9;
  border: 1px solid #b2c1d32a;
  box-shadow: none;
  backdrop-filter: none;
}

.console-page .row { border-radius: 2px; transition: background .1s; }

.console-page .row:is([aria-pressed='true'],[data-active='true'],:focus-visible) {
  background: linear-gradient(#153450, #0b223b 49%, #204c78);
  border-color: #93caf5;
  box-shadow: inset 0 0 5px #83c9fe, 0 0 5px #4376ab;
}

.console-page .console-button {
  padding: .3rem .85rem;
  border-radius: 4px;
  border-color: #b5bdc8;
  background: linear-gradient(#d3d6dc, #888f9c 49%, #626873 51%, #828a96);
  box-shadow: inset 0 1px #eef2fa75, 0 1px 4px #0008;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
}

.console-page .console-button:is(:hover,:focus-visible) {
  border-color: #a8dcff;
  background: linear-gradient(#8bd9ff, #1c78bb 49%, #07518e 51%, #207dbb);
}

:is(.console-page, .top-menu) .key {
  min-width: 1.5rem;
  height: 1.25rem;
  border-radius: .7rem;
  border-color: #a7b0bf;
  background: linear-gradient(#727d8a, #222a35);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .62rem;
  color: #fff;
}

:is(.console-page, .top-menu) .key[data-key='Enter'] { background: linear-gradient(#83ad50, #34580e); }
:is(.console-page, .top-menu) .key[data-key='Esc'] { background: linear-gradient(#c16e63, #862419); }

.console-rule {
  font-size: .75rem;
  font-weight: 700;
  border-bottom: 1px dotted #9ab0c582;
  padding-bottom: .28rem;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: .5rem 1rem;
  padding: .35rem .35rem .35rem 1.15rem;
  position: relative;
  border-bottom: 1px solid #a8c9f023;
}

.setting-row:focus-within::before {
  content: '▸';
  position: absolute;
  left: .25rem;
  top: .4rem;
}

.setting-label { font-weight: 700; }
.setting-values { display: flex; justify-content: center; flex-wrap: wrap; gap: .28rem; }
.setting-value { padding: .15rem .45rem; font-size: .78rem; font-weight: 700; }
/* Contact Me: the Settings board layout with one developer card and a large VISIT LINKEDIN button. */
.console-page .contact-board {
  width: min(100%, 40rem);
  align-self: center;
  margin-top: clamp(.25rem, 6vh, 3rem);
  border: 0;
  border-top: 1px dotted #8799ab;
  padding: .35rem 0 .8rem;
  background: transparent;
}
.contact-details { margin: .3rem 0 0; }
.contact-row {
  display: grid;
  grid-template-columns: minmax(6rem, 34%) minmax(0, 1fr);
  align-items: center;
  gap: .8rem;
  padding: .55rem .35rem .55rem 1.15rem;
  border-bottom: 1px solid #a8c9f023;
}
.contact-row dt { font-weight: 700; color: #c2d4e7; text-transform: uppercase; letter-spacing: .03em; }
.contact-row dd { margin: 0; font-weight: 800; color: #fff; overflow-wrap: anywhere; }
.contact-row a { color: #79c5fa; text-decoration: underline; text-underline-offset: .18em; }
.contact-row a:is(:hover, :focus-visible) { color: #c4e9ff; }
.contact-cta { display: flex; justify-content: center; margin-top: clamp(.9rem, 4vh, 1.8rem); }
.contact-cta > * { min-width: min(100%, 16rem); }

.console-page .settings-board {
  width: min(100%, 48rem);
  align-self: center;
  margin-top: clamp(.25rem, 6vh, 3rem);
  border: 0;
  border-top: 1px dotted #8799ab;
  padding: .35rem 0;
  background: transparent;
}

.position-label {
  color: #fff;
  background: linear-gradient(#2e3035, #101116);
  border-left: 2px solid #83b526;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1.1;
  padding: .08rem .2rem;
  text-align: center;
  text-shadow: 0 1px #000;
}

.position-label[data-position='GK'] { border-left-color: #e6ae32; }
.position-label[data-position='DF'] { border-left-color: #28a8cf; }
.position-label[data-position='FW'] { border-left-color: #e54837; }



.player-model canvas { display: block; margin: auto; }
.player-sheet { max-height: 88dvh; overflow: auto; }
.player-sheet canvas { max-height: min(22vh, 10rem); }



.exhibition-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
  width: min(100%, 61rem);
  margin: .15rem auto 0;
  flex: none;
  align-items: end;
}

.exhibition-model { height: clamp(8rem, 28vh, 16rem); }
.exhibition-model canvas { max-width: 100%; }
.exhibition-sides {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  padding: .3rem;
  border: 1px solid #696e78;
  background: #25262b;
}

.exhibition-side { min-width: 0; background: #131417; }
.exhibition-side-label {
  background: linear-gradient(#d7dbe2, #a0a8b5);
  color: #15191e;
  text-shadow: none;
  font-weight: 800;
  text-transform: uppercase;
  font-size: .68rem;
  padding: .1rem .45rem;
}

.exhibition-side:last-child .exhibition-side-label { text-align: right; }
.exhibition-side-label span { font-weight: normal; }
.exhibition-side-team { display: flex; align-items: center; gap: .5rem; padding: .2rem .4rem; }
.exhibition-order { padding: .1rem .45rem; min-height: 5.3rem; }
.exhibition-order li {
  display: flex;
  gap: .45rem;
  align-items: center;
  border-bottom: 1px solid #3d424b80;
  font-size: .68rem;
  font-weight: 750;
  min-height: 1.05rem;
  text-transform: uppercase;
}

.exhibition-ready { display: flex; justify-content: space-between; gap: .3rem; padding: .15rem .4rem; font-size: .67rem; }
.exhibition-vs { position: absolute; top: 2.55rem; left: 50%; transform: translateX(-50%); background: #111b26; color: #d8e6f8; padding: .02rem .22rem; font-size: .65rem; font-weight: 800; }
.exhibition-status { display: flex; justify-content: center; align-items: center; gap: .4rem; }
.exhibition-status > * { font-size: .68rem; }

.competition-select {
  margin: auto;
  width: 100%;
  text-align: center;
}

.competition-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: .4rem;
}

.competition-rail .competition-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-width: 0;
  min-height: clamp(8.2rem, 32vh, 16rem);
  padding: .55rem .25rem;
  color: #ececf0;
  background: linear-gradient(#17181ac9, #12161dcc);
  border-color: #8999af20;
  font-size: clamp(.62rem, 1.2vw, .93rem);
  font-weight: 700;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.competition-rail .competition-badge[data-active='true'] {
  background: linear-gradient(#252f41df, #1f2739ef 57%, #29517d);
}

.competition-trophy {
  display: grid;
  place-items: center;
  width: 86%;
  height: clamp(3.3rem, 18vh, 8.2rem);
  background: radial-gradient(ellipse, #acc9ed19, transparent 68%);
}
.competition-trophy img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 6px 6px #000a);
  transition: transform .18s ease, filter .18s ease;
}
.competition-badge[data-active='true'] .competition-trophy img {
  transform: translateY(-2px);
  filter: brightness(1.08) drop-shadow(0 7px 7px #001326cc);
}
.competition-credits { display: inline-block; margin-top: .35rem; color: #acc9e1; font-size: .68rem; text-decoration: underline; }
.competition-detail { min-height: 2.8rem; margin-top: .85rem; font-size: .79rem; }

.console-page .cup-overview, .console-page .champion-board {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  background: radial-gradient(ellipse at 50% 20%, #4e95be5c, transparent 61%),
    linear-gradient(180deg, #0a458e28, #020a13e8 88%), url('/menu/stadium.webp') center 36% / cover;
  border-color: #7ab5e380;
}

.console-page .cup-overview {
  min-height: clamp(15rem, 46vh, 28rem);
  padding-block: .75rem;
  background:
    radial-gradient(ellipse at 50% 18%, #a2ddffbf, #347bb27d 38%, transparent 68%),
    linear-gradient(180deg, #11528825, #03102080 62%, #020711ed),
    url('/menu/stadium.webp') center 45% / cover;
}
.cup-overview .panel-title { color: #ecf3ff; }
.cup-overview > *:not(.cup-overview-light) { position: relative; }
.cup-overview-light {
  position: absolute;
  z-index: -1;
  top: 40%;
  left: 29%;
  right: 29%;
  height: 42%;
  transform: perspective(310px) rotateX(33deg);
  background:
    linear-gradient(90deg, transparent 49.7%, #dbe3cc8c 49.8% 50.2%, transparent 50.3%),
    repeating-linear-gradient(90deg, #1a4a26 0 8%, #286233 8% 16%);
  border: 2px solid #e0efd57a;
  box-shadow: 0 0 0 13px #35545e7e, 0 0 30px 15px #3486b153;
}

.cup-overview-light::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 11%;
  aspect-ratio: 1;
  border: 1px solid #dbe3cca0;
  border-radius: 50%;
}

.cup-overview-trophy { width: 3.6rem; filter: drop-shadow(0 2px 3px #000); }
.cup-overview-fixture {
  display: flex;
  flex: 1;
  width: 100%;
  align-items: center;
  justify-content: space-around;
  gap: 18%;
  font-weight: 700;
  text-align: center;
}
.cup-overview-nation { display: grid; justify-items: center; gap: .35rem; width: 25%; text-transform: uppercase; }
.cup-overview-flag { width: clamp(2rem, 4.7vw, 4rem); }

.cup-tree {
  --tree-line: #b3c1d1a8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(5rem, .65fr);
  gap: clamp(1.5rem, 4.5vw, 4rem);
  padding: .75rem .1rem;
  min-height: 15rem;
}

.tree-stage { position: relative; display: grid; gap: .45rem; min-width: 0; align-content: center; padding-top: 1.3rem; }
.tree-stage > .panel-title { position: absolute; top: 0; left: 0; right: 0; border-bottom: 1px dotted #8498ad55; }
.tree-winner { justify-items: center; }
.tree-winner > .panel-title { text-align: center; }
.tree-fixture {
  min-height: 6.1rem;
  border-block: 1px solid #a9c9e763;
  padding: .25rem;
  background: linear-gradient(90deg, #18305296, #15202f20);
  position: relative;
}

.tree-fixture > div:not(:first-child) { padding-block: .09rem; }
.tree-fixture .console-button { padding-block: 0; }

.tree-semis > .tree-fixture::after, .tree-final > .tree-fixture::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: clamp(.75rem, 2.25vw, 2rem);
  height: 1px;
  background: var(--tree-line);
}

.tree-semis::after {
  content: '';
  position: absolute;
  top: calc(50% - 2.65rem);
  height: 6.55rem;
  left: calc(100% + clamp(.75rem, 2.25vw, 2rem));
  width: 1px;
  background: var(--tree-line);
}

.tree-final > .tree-fixture::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  width: clamp(.75rem, 2.25vw, 2rem);
  height: 1px;
  background: var(--tree-line);
}

.tree-final > .tree-fixture::after { width: clamp(1.5rem, 4.5vw, 4rem); }

.offline-tree { display: flex; overflow-x: auto; gap: 1.35rem; padding-bottom: .55rem; }
.offline-round { display: flex; flex: 1 0 9rem; flex-direction: column; gap: .35rem; }
.offline-fixtures { display: flex; flex: 1; flex-direction: column; justify-content: space-around; gap: .35rem; }
.offline-fixture { position: relative; padding: .18rem .4rem; border-block: 1px solid #c2d3e15c; background: #1129498c; }
.offline-round:not(:last-child) .offline-fixture::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  width: .69rem;
  height: calc(50% + .18rem);
  border-top: 1px solid #b3c1d1a8;
  border-right: 1px solid #b3c1d1a8;
}
.offline-round:not(:last-child) .offline-fixture:nth-child(even)::after { top: auto; bottom: 50%; border-top: 0; border-bottom: 1px solid #b3c1d1a8; }
.offline-round + .offline-round .offline-fixture::before { content: ''; position: absolute; right: 100%; top: 50%; width: .69rem; height: 1px; background: #b3c1d1a8; }

.broadcast-intro {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: .8rem;
  background: #152627 url('/menu/stadium.webp') center / cover no-repeat;
  font-family: Arial, Helvetica, sans-serif;
  text-shadow: 0 1px 2px #000;
}

.broadcast-board { width: min(52%, 66rem); animation: console-enter .24s ease-out both; }
.broadcast-title {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-inline: -5%;
  padding: .35em .7em;
  border-block: 2px solid #b3bdc9;
  clip-path: polygon(2% 0, 98% 0, 100% 50%, 98% 100%, 2% 100%, 0 50%);
  background: linear-gradient(#8795a6, #3c4656 48%, #0a0e16 51%, #151b26);
  color: #fff;
  font-size: clamp(.88rem, 1.75vw, 1.55rem);
  font-weight: 750;
}

.broadcast-venue {
  color: #0a0b10;
  background: linear-gradient(#b5b9c1, #fbfbfc 76%, #e2e1e7);
  text-shadow: none;
  text-align: center;
  padding: .18em .5em;
  font-size: clamp(.7rem, 1.6vw, 1.35rem);
  font-weight: 800;
  text-transform: uppercase;
}

.broadcast-teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  text-align: center;
  border: 1px solid #9eabba87;
  border-radius: 0 0 1rem 1rem;
  background: linear-gradient(127deg, #353e46eb 49%, #1c232be8 49.2%);
  box-shadow: 0 7px 18px #000a;
}

.broadcast-team { min-width: 0; padding: clamp(.6rem, 3.7vw, 4rem) .3rem .55rem; }
.broadcast-flag { display: block; width: 49%; margin-inline: auto; }
.broadcast-team p { margin-top: clamp(.6rem, 3vw, 3rem); font-weight: 800; font-size: clamp(.76rem, 1.7vw, 1.55rem); text-transform: uppercase; }
.broadcast-team span { display: block; font-size: clamp(.58rem, 1.15vw, .92rem); color: #d5dce6; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 1023px) {
  .console-page { padding-inline: clamp(.65rem, 4vw, 3rem); }
}

@media (max-width: 639px) {
  .console-page { padding-top: .75rem; }
  .console-brand { font-size: .57rem; }
  .console-hero-art { background-position: 49% center; }
  .console-facets { opacity: .8; }
  .console-backdrop[data-variant='top'] .console-hero-art { background-position: 44% center; }
  .top-menu-rail { left: 0; top: auto; bottom: clamp(5rem, 16dvh, 9.5rem); }
  .top-menu-icons { gap: .15rem; }
  .top-menu-icons span { font-size: clamp(.54rem, 2.4vw, .73rem); }
  .top-menu-ribbon { padding-inline: .55rem; clip-path: none; }
  /* Five items share the row equally, so the last never spills past the screen edge. */
  .top-menu-icons button { width: auto; flex: 1 1 0; min-width: 0; }
  .top-menu-rail[data-level='section'] .top-menu-icons button { width: 50%; }
  .top-menu-icons button[data-minor='true'] { margin-left: 0; }
  .top-menu-detail { margin-left: .55rem; }
  .top-menu-footer { left: .7rem; right: .7rem; }
  .exhibition-board { display: block; }
  .exhibition-model { display: none; }
  .exhibition-ready { flex-wrap: wrap; }
  .competition-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .competition-rail .competition-badge { min-height: 6.6rem; }
  .competition-trophy { height: 4.2rem; }
  .cup-tree { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.3rem; }
  .tree-winner { grid-column: 1 / -1; }
  .tree-semis::after { left: calc(100% + .65rem); }
  .tree-semis > .tree-fixture::after, .tree-final > .tree-fixture::before { width: .65rem; }
  .tree-final > .tree-fixture::after { display: none; }
  .broadcast-board { width: min(92%, 31rem); }
}

@media (prefers-reduced-motion: reduce) {
  .top-menu-rail, .top-menu-selection span, .top-menu-detail span, .console-content, .wizard-step, .broadcast-board { animation: none; }
}

[data-phase='vs'] .match-scoreboard { opacity: 0; }

.exhibition-page .exhibition-board { margin-block-start: clamp(.4rem, 4vh, 2rem); }
.exhibition-page .exhibition-model { height: clamp(8rem, 33vh, 18rem); }

@media (min-width: 1024px) {
  .screen-lineup:not(.exhibition-page) {
    padding-top: clamp(.65rem, 2vh, 1.5rem);
    padding-inline: 7vw;
  }
}


.console-page .console-button[data-variant='primary']:enabled {
  border-color: #7db6e7;
  background: linear-gradient(#62b6ea, #1665b4 49%, #0d4a8b 51%, #1768a9);
}
.console-page .console-button[data-variant='primary']:is(:hover,:focus-visible):enabled { filter: brightness(1.2); }

.console-page .champion-board {
  min-height: 18rem;
  justify-content: center;
  background:
    repeating-conic-gradient(from 260deg at 50% 140%, transparent 0 10deg, #54bbff24 12deg, transparent 17deg),
    linear-gradient(#030d23, #0c2b50 55%, #1e639f);
}

.champion-title {
  width: min(18rem, 100%);
  padding: .3rem .8rem;
  background: linear-gradient(#61b4ed, #0754a2 50%, #09295a);
  clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
}

.champion-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: min(32rem, 85vw);
  background: linear-gradient(#226aae, #052953);
  border-bottom: 1px solid #7aadde;
  font-size: .85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.champion-score span { overflow: hidden; text-overflow: ellipsis; padding: .1rem .4rem; }
.champion-score strong { padding: .25rem .55rem; background: linear-gradient(#f7f9fd,#bdc8d5); color: #111a29; text-shadow: none; }

.audio-volume {
  display: grid;
  grid-template-columns: 1fr minmax(5rem, 1fr) 3.1rem;
  align-items: center;
  gap: .55rem;
  min-height: 2.4rem;
  padding-inline: 1rem;
  border-bottom: 1px solid #c2d9ee26;
  font-weight: 700;
}
.audio-volume input { width: 100%; min-height: 1.75rem; accent-color: #66baff; cursor: pointer; }
.audio-volume output { text-align: right; font-size: .76rem; color: #b9dcfa; font-variant-numeric: tabular-nums; }

/* Background Music: a settings block in the same dotted-rule console style, not a separate player app. */
.music-settings { display: flex; flex-direction: column; }
.music-heading {
  margin: .7rem 0 0;
  padding: .3rem 1rem;
  background: linear-gradient(90deg, #1d4f86, #0b2747 70%, transparent);
  border-top: 1px solid #6aa5dc;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.music-now {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .4rem .8rem;
  padding: .45rem 1rem;
  border-bottom: 1px solid #c2d9ee26;
  background: linear-gradient(#0f1a28cc, #070c14cc);
}
.music-now-index { font-size: .7rem; font-weight: 800; color: #8fc4f0; font-variant-numeric: tabular-nums; }
.music-now-text { min-width: 0; }
.music-now-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 800; }
.music-now-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; color: #a9bfd4; }
.music-transport { display: flex; gap: .3rem; }
.console-page .music-transport-button {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 1.75rem;
  padding: 0;
}
.music-transport-button svg { width: .8rem; height: .8rem; fill: currentColor; }
.console-page .music-transport-button[aria-pressed='true'] {
  border-color: #a8dcff;
  background: linear-gradient(#8bd9ff, #1c78bb 49%, #07518e 51%, #207dbb);
}
.music-list { display: flex; flex-direction: column; padding: .2rem 0; border-bottom: 1px solid #c2d9ee26; }
.music-track {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1.2fr) minmax(0, 1fr) 2.6rem;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 1.75rem;
  padding: .12rem 1rem;
  border: 1px solid transparent;
  text-align: left;
  font-size: .8rem;
}
.music-track:hover { background: #ffffff0d; }
.music-track-no { font-size: .68rem; color: #7f98b1; font-variant-numeric: tabular-nums; }
.music-track-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.music-track-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a9bfd4; font-size: .74rem; }
.music-track-time { justify-self: end; font-size: .72rem; color: #b9dcfa; font-variant-numeric: tabular-nums; }
.music-track[data-active='true'] .music-track-no { color: #fff; }
.music-eq { width: .8rem; height: .8rem; fill: #66baff; }
.music-eq rect { transform-origin: bottom; animation: music-eq .9s ease-in-out infinite alternate; }
.music-eq rect:nth-child(2) { animation-delay: -.3s; }
.music-eq rect:nth-child(3) { animation-delay: -.6s; }
@keyframes music-eq { to { transform: scaleY(.35); } }
@media (prefers-reduced-motion: reduce) { .music-eq rect { animation: none; } }
.music-credits { display: flex; flex-direction: column; gap: .35rem; padding: .45rem 1rem .6rem; font-size: .72rem; color: #b8c9da; }
.music-credit { padding-bottom: .3rem; border-bottom: 1px dotted #9ab0c540; }
.music-credit dt { font-weight: 800; color: #fff; }
.music-credit dt span { font-weight: 600; color: #a9bfd4; }
.music-credit a { color: #9fd3ff; text-decoration: underline; }
.music-credit-line { margin-top: .1rem; color: #8ea6bd; font-size: .66rem; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .music-now { grid-template-columns: minmax(0, 1fr) auto; }
  .music-now-index { display: none; }
  .music-track { grid-template-columns: 1.4rem minmax(0, 1fr) 2.4rem; padding-inline: .6rem; }
  .music-track-artist { display: none; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .top-menu-rail { top: auto; bottom: 2.3rem; }
  .top-menu-selection { font-size: 1.05rem; }
  .top-menu-icons button { min-height: 3rem; padding: .18rem; }
  .top-menu-icons svg { width: 1.35rem; }
  .top-menu-detail { min-height: 0; font-size: .72rem; }
  .top-menu-footer { bottom: .45rem; }
  .top-menu-footer .nav-btn { min-height: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .top-menu-icons button, .competition-badge, .competition-trophy img { transition: none; }
}

/* Main menu levels. */
.top-menu-heading { display: flex; align-items: center; gap: .55rem; }
.top-menu-section {
  color: #79c5fa;
}
.top-menu-section::after {
  content: '›';
  margin-inline: .4em;
  color: #c2d4e7;
}
.top-menu-icons button[data-minor='true'] { color: #a9bdd3; }
.top-menu-icons button[data-minor='true'][data-active='true'] { color: #fff; }
.top-menu-icons button:not([data-minor='true']) + button[data-minor='true'] { margin-left: clamp(.4rem, 1.6vw, 1.5rem); }
.top-menu-rail[data-level='section'] { animation: section-in .2s ease-out both; }
.top-menu-rail[data-level='section'] .top-menu-icons button { width: clamp(6rem, 11vw, 10.5rem); }
@keyframes section-in { from { opacity: 0; transform: translateY(6px); } }

/* Setup wizard. */
.wizard-progress {
  display: flex;
  flex: none;
  margin-inline: auto;
  width: min(100%, 52rem);
  filter: drop-shadow(0 1px 3px #000a);
}

.wizard-progress li {
  --cut: .55rem;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-width: 0;
  min-height: 1.75rem;
  margin-right: calc(var(--cut) * -1 + 2px);
  padding-inline: calc(var(--cut) + .4rem);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, 0 100%, var(--cut) 50%);
  background: linear-gradient(#2f3640, #16191f 55%, #1d222b);
  color: #8e9db0;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: background-color .18s ease, color .18s ease;
}

.wizard-progress li:first-child { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, 0 100%); }
.wizard-progress li:last-child { margin-right: 0; }
.wizard-progress li[data-state='done'] { background: linear-gradient(#1e4366, #0f2a47 55%, #17395c); color: #a9dcff; }
.wizard-progress li[data-state='current'] { background: linear-gradient(#67b9ed, #1768af 52%, #15558a); color: #fff; }

.wizard-progress-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #0007;
  font-size: .62rem;
}

.wizard-progress-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wizard-step {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  min-height: 0;
  animation: wizard-step-in .18s ease-out both;
}

@keyframes wizard-step-in { from { opacity: 0; transform: translateX(10px); } }

.console-page .wizard-form { margin-top: clamp(.25rem, 4vh, 2rem); padding-inline: .35rem; }
.wizard-form .console-button { align-self: center; }
.wizard-form input:focus-visible { outline: 1px solid #93caf5; }

.wizard-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
  padding-block: .6rem;
}

.wizard-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  min-height: 4.6rem;
  padding: .55rem .7rem;
  background: linear-gradient(#17181ac9, #12161dcc);
  text-align: left;
  cursor: pointer;
}

.wizard-choice strong { font-size: clamp(.9rem, 1.6vw, 1.15rem); font-weight: 800; text-transform: uppercase; }
.wizard-choice span { color: #c1cedd; font-size: .76rem; }

.wizard-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .35rem .35rem .5rem;
  font-weight: 700;
  animation: selection-in .15s ease-out both;
}

.wizard-code input {
  width: min(13rem, 55%);
  border: 1px solid #a7bdd050;
  background: #050a11e8;
  padding: .25rem .4rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .24em;
  text-align: center;
}
.wizard-code input::placeholder { color: #5d6c7e; }

.wizard-watch { display: block; margin: .55rem auto .2rem; }

.setting-fixed { color: #c8d9ea; font-size: .78rem; font-weight: 700; text-align: center; }

.review-board {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr) minmax(0, 1.05fr);
  gap: .9rem;
  width: min(100%, 62rem);
  margin: auto;
  padding: .7rem;
  border: 1px solid #7ab5e34d;
  background: linear-gradient(#16202fe6, #0d131ce6);
}

.review-team {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .4rem;
  min-width: 0;
  padding: .6rem;
  background: linear-gradient(#26272df2, #1c1d23fa);
  text-align: center;
}

.review-flag { width: clamp(4rem, 9vw, 7.5rem); box-shadow: 0 3px 10px #000a; }
.review-flag-unknown { display: grid; place-items: center; width: 5rem; aspect-ratio: 4 / 3; border: 1px dashed #93caf5; color: #93caf5; font-size: 2rem; font-weight: 800; }
.review-team h2 { max-width: 100%; font-size: clamp(.95rem, 1.9vw, 1.4rem); font-weight: 800; line-height: 1.1; text-transform: uppercase; overflow-wrap: anywhere; }
.review-team p { color: #c8d9ea; font-weight: 700; overflow-wrap: anywhere; }

.review-lineup { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.review-keeper { font-weight: 700; }
.review-keeper span { display: inline-block; min-width: 1.5rem; color: #f3d878; font-variant-numeric: tabular-nums; }
.review-lineup ol { display: grid; gap: .16rem; }
.review-lineup li {
  display: grid;
  grid-template-columns: 1.5rem 1.8rem minmax(0, 1fr);
  align-items: center;
  gap: .3rem;
  min-height: 1.6rem;
  padding-inline: .3rem;
  background: linear-gradient(90deg, #182a40ed, #0b142280);
  font-weight: 700;
}
.review-lineup li > span:first-child { color: #79c5fa; font-variant-numeric: tabular-nums; }

.review-rows { display: flex; flex-direction: column; justify-content: center; gap: .15rem; min-width: 0; }
.review-rows > div { padding: .3rem .1rem; border-bottom: 1px dotted #9ab0c56b; }
.review-rows dt { color: #a9bdd3; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.review-rows dd { font-weight: 700; overflow-wrap: anywhere; }

.lobby-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .3rem .7rem;
  margin-top: .35rem;
}

/* The lineup needs the height, so its progress bar shares the title row. */
@media (min-width: 1024px) {
  .screen-lineup .wizard-progress {
    position: absolute;
    top: clamp(.65rem, 2vh, 1.5rem);
    right: calc(7vw + 6.5rem);
    width: min(55vw, 46rem);
  }
  .screen-lineup .wizard-progress li { font-size: .64rem; letter-spacing: .02em; padding-inline: calc(var(--cut) + .15rem); }
}

@media (max-width: 1023px) {
  .review-board { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .review-rows { grid-column: 1 / -1; }
}

@media (max-width: 639px) {
  .wizard-progress li { flex: 0 0 auto; padding-inline: calc(var(--cut) + .2rem); }
  .wizard-progress li[data-state='current'] { flex: 1 1 auto; }
  .wizard-progress li:not([data-state='current']) .wizard-progress-label { display: none; }
  .wizard-choices { grid-template-columns: minmax(0, 1fr); }
  .wizard-choice { min-height: 3.6rem; }
  .review-board { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-progress li, .wizard-code, .top-menu-rail[data-level='section'] { animation: none; transition: none; }
}

/* Penalty lineup: one list where a row's position is the job. */
.lineup-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
  width: min(100%, 66rem);
  height: clamp(22rem, 74vh, 42rem);
  margin: auto;
}

.lineup-panel, .lineup-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: .55rem .7rem;
  border: 1px solid #b2c1d32a;
  border-radius: 5px;
  background: #16191ee6;
  box-shadow: 0 3px 12px #0009;
}

.lineup-head { display: flex; flex: none; align-items: center; gap: .55rem; padding: .1rem .15rem .4rem; }
.lineup-head h2 { min-width: 0; overflow: hidden; font-size: .95rem; font-weight: 800; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.lineup-columns { display: grid; grid-template-columns: 1.7rem 2.4rem; gap: .2rem; margin-left: auto; color: #8f9eb1; font-size: .6rem; font-weight: 700; text-align: right; }

.lineup-main, .lineup-rest { display: grid; align-content: start; gap: 1px; }
.lineup-main { flex: none; }
.lineup-rest { flex: 1; min-height: 3rem; padding-right: .15rem; }
.lineup-main li:nth-child(6) { margin-top: .32rem; }

.lineup-row {
  position: relative;
  display: grid;
  grid-template-columns: .9rem 1.45rem 1.9rem minmax(0, 1fr) 1.7rem 2.4rem;
  gap: .2rem;
  align-items: center;
  width: 100%;
  min-height: 1.5rem;
  padding: .06rem .2rem;
  color: #e8edf3;
  font-size: .8rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: opacity .12s ease;
}

.lineup-order {
  display: grid;
  place-items: center;
  height: 1.1rem;
  background: linear-gradient(#3a3f47, #1b1e24);
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}
.lineup-row[data-kind='keeper'] .lineup-order { background: linear-gradient(#a57f26, #5f4710); }
.lineup-row[data-kind='squad'] { color: #c0cad6; font-weight: 600; }
.lineup-row[data-kind='squad'] .lineup-order { background: none; color: #8f9eb1; }
.lineup-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lineup-shirt, .lineup-rating { font-variant-numeric: tabular-nums; text-align: right; }
.lineup-rating { color: #f3d878; }

.lineup-arrow { opacity: 0; font-size: .62rem; line-height: 1; }

/* The cursor: an arrow and a bar of light travelling under the row. */
.lineup-row::after {
  content: '';
  position: absolute;
  left: 1rem;
  right: 0;
  bottom: -1px;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, #2f7fc4 0%, #d7f1ff 22%, #2f7fc4 44%, #2f7fc4 100%) 0 0 / 220% 100%;
  box-shadow: 0 0 7px #58b6ff;
}

.lineup-row[data-cursor='true'] { background: linear-gradient(90deg, #1b5f9c66, #1b5f9c1f); }
.lineup-row[data-cursor='true'] .lineup-arrow { opacity: 1; color: #fff; animation: lineup-arrow 1s ease-in-out infinite; }
.lineup-row[data-cursor='true']::after { opacity: 1; animation: lineup-light 1.5s linear infinite; }

/* The picked row keeps a dimmed copy of the cursor while the live one goes looking. */
.lineup-row[data-picked='true'] { background: #5d6b7a30; }
.lineup-row[data-picked='true'] .lineup-arrow { opacity: .55; animation: none; color: #cfd8e3; }
.lineup-row[data-picked='true']::after { opacity: .4; animation: none; background: #8fa3b8; box-shadow: none; }
.lineup-row[data-blocked='true'] { opacity: .38; }
.lineup-row[data-swapped='true'] { animation: lineup-swap .38s ease-out; }
.lineup-row[data-refused='true'] { animation: lineup-refuse .22s ease-in-out; }

@keyframes lineup-arrow { 50% { opacity: .55; } }
@keyframes lineup-light { from { background-position: 180% 0; } to { background-position: -80% 0; } }
@keyframes lineup-swap { from { background-color: #7cc8ff80; } }
@keyframes lineup-refuse { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.lineup-divider {
  flex: none;
  margin: .32rem 0 .12rem;
  padding: .1rem .2rem;
  border-top: 1px solid #ffffff1f;
  color: #8f9eb1;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lineup-status { flex: none; min-height: 1.3rem; padding: .22rem .2rem 0; border-top: 1px solid #ffffff2e; color: #b9c8d8; font-size: .7rem; }
.lineup-status[data-refused='true'] { color: #ffb4a8; }

.lineup-info .player-model canvas { max-height: 15rem; }
.lineup-info .font-display { font-size: clamp(1rem, 1.55vw, 1.45rem); }
.lineup-summary { display: none; }

@media (max-width: 1023px) {
  .lineup-board { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .lineup-info { display: none; }
  .lineup-summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .15rem .3rem; }
}

@media (max-width: 639px) {
  .lineup-board { height: max(26rem, 66dvh); }
  .lineup-row { min-height: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lineup-row[data-cursor='true'] .lineup-arrow,
  .lineup-row[data-cursor='true']::after,
  .lineup-row[data-swapped='true'], .lineup-row[data-refused='true'] { animation: none; }
}

/* Team selection: paired HOME / AWAY boards over a selector strip, after the 2012 exhibition demo. */
.screen-team .wizard-progress { opacity: .75; }
.screen-team .wizard-step { flex: 1 1 0; }
.ts {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  flex: 1 1 0;
  min-height: 22rem;
  width: min(100%, 86rem);
  margin: 0 auto;
  gap: clamp(.35rem, 1.6vh, 1rem);
}

.ts-heading { display: flex; align-items: baseline; justify-content: center; gap: .7rem; }
.ts-heading h2 { font-size: clamp(1rem, 2vw, 1.6rem); font-weight: 800; letter-spacing: .02em; }
.ts-heading p { color: #b8c6d8; font-size: .78rem; font-weight: 700; }

.ts-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.6rem, 4vw, 4.5rem);
  min-height: 0;
}

.ts-side {
  display: grid;
  align-self: center;
  height: 100%;
  grid-template-columns: minmax(0, .66fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  gap: .4rem;
}
.ts-side[data-side='away'] { grid-template-columns: minmax(0, 1fr) minmax(0, .66fr); }
.ts-side[data-side='away'] .ts-model { order: 2; }

.ts-model { display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.ts-model canvas { height: 100%; max-width: 100%; max-height: 37rem; filter: drop-shadow(0 6px 10px #000c); }

.ts-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 12.5rem;
  max-height: 37rem;
  background: linear-gradient(#2b2c2f, #222326 28%, #1d1e21);
  border: 1px solid #54575e66;
  box-shadow: 0 10px 26px #000c, inset 0 1px #ffffff12;
  transition: box-shadow .15s, border-color .15s;
}

.ts-panel[data-active='true'] {
  border-color: #8fcaf5;
  box-shadow: 0 0 0 1px #3f8fd2, 0 0 18px #2f86d688, 0 10px 26px #000c;
}

.ts-panel-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex: none;
  height: clamp(2.4rem, 6.5vh, 3.6rem);
  background:
    linear-gradient(#0000 55%, #0b0c0e 55%),
    repeating-linear-gradient(45deg, #2f3135 0 2px, #26282b 2px 4px);
  border-bottom: 1px solid #000;
}

.ts-panel-tab {
  padding: .3rem 2.1rem .28rem clamp(.8rem, 3vw, 2.6rem);
  background: #0b0c0e;
  clip-path: polygon(0 0, calc(100% - .9rem) 0, 100% 100%, 0 100%);
  font-size: clamp(.8rem, 1.25vw, 1.15rem);
  font-weight: 800;
  letter-spacing: .03em;
}

.ts-panel-owner {
  max-width: 50%;
  overflow: hidden;
  padding: 0 .6rem .32rem;
  color: #9fb1c6;
  font-size: .7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ts-side[data-side='away'] .ts-panel-head { flex-direction: row-reverse; }
.ts-side[data-side='away'] .ts-panel-tab {
  padding: .3rem clamp(.8rem, 3vw, 2.6rem) .28rem 2.1rem;
  clip-path: polygon(.9rem 0, 100% 0, 100% 100%, 0 100%);
}

.ts-panel-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.3rem, 2vh, 1.4rem);
  min-height: 0;
  overflow: hidden;
  padding: clamp(.4rem, 1.6vh, 1.3rem) .6rem;
  text-align: center;
  animation: console-enter .16s ease-out both;
}

.ts-panel-body h3 {
  font-size: clamp(.95rem, min(1.75vw, 3.2vh), 1.8rem);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.ts-flag {
  position: relative;
  width: clamp(4rem, min(12vw, 19vh), 12rem);
  transform: perspective(380px) rotateY(-9deg) rotateZ(-1.5deg) skewY(-2deg);
  filter: drop-shadow(0 5px 7px #000d);
}
.ts-flag img { position: relative; box-shadow: none; }
.ts-flag::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, #0000 8%, #ffffff30 22%, #0000 36%, #0003 52%, #ffffff22 70%, #0000 84%);
}

.ts-ratings {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: .15rem clamp(.6rem, 1.8vw, 1.6rem);
  font-size: clamp(.78rem, min(1.35vw, 2.6vh), 1.5rem);
  font-weight: 700;
}
.ts-ratings > div { display: grid; grid-template-columns: 2.4em 1.5em 1.1em; align-items: center; gap: .3em; cursor: default; }
.ts-ratings dt { text-align: left; }
.ts-ratings dd { text-align: right; }

.ts-ratings .ts-grade {
  font-style: italic;
  font-weight: 900;
  font-size: 1.12em;
  text-align: center;
  background: linear-gradient(#fff6cf, #e6b545 45%, #94651a 55%, #f2cc6a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 1px 1px #000);
}
.ts-ratings .ts-grade[data-grade='A'] { background-image: linear-gradient(#fff8d6, #ffd255 45%, #b67b10 55%, #ffe082); }
.ts-ratings .ts-grade:is([data-grade='D'], [data-grade='E']) { background-image: linear-gradient(#f0f2f5, #aeb6c2 50%, #6c7480 55%, #c7ced8); }

.ts-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  width: clamp(4rem, 9vw, 8rem);
  transform: perspective(300px) rotateY(-8deg);
  filter: drop-shadow(0 4px 6px #000c);
}

.ts-count { color: #c3ccd8; font-size: clamp(.7rem, 1.1vw, .95rem); font-weight: 700; }
.ts-count strong { margin-left: .35rem; color: #fff; font-size: 1.35em; }

.ts-unknown {
  display: grid;
  place-items: center;
  width: clamp(4rem, 9vw, 7.5rem);
  aspect-ratio: 4 / 3;
  background: linear-gradient(#34363b, #16171a);
  border: 1px solid #5c6069;
  color: #9fa7b3;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 900;
}

.ts-kinds { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; padding: 0 .7rem .7rem; }
.ts-kinds button {
  padding: .3rem .4rem;
  border: 1px solid #6a707b;
  border-radius: 3px;
  background: linear-gradient(#56595f, #303237 50%, #232428 51%, #34363b);
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
}
.ts-kinds button[aria-pressed='true'] {
  border-color: #9fd6ff;
  background: linear-gradient(#5fb6ec, #1768b4 49%, #0c4a8a 51%, #1a6aac);
  box-shadow: 0 0 8px #3d97e0aa;
}
.ts-kinds button:disabled { opacity: .45; cursor: not-allowed; }

.ts-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .3rem; width: min(100%, 58rem); margin: 0 auto; }
.ts-arrow { width: 1.6rem; color: #addbff; font-size: 1.9rem; line-height: 1; cursor: pointer; }
.ts-arrow:disabled { opacity: .3; cursor: default; }

.ts-tiles {
  display: flex;
  gap: clamp(.3rem, 1vw, .8rem);
  overflow-x: auto;
  padding: .45rem .3rem;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.ts-tiles::-webkit-scrollbar { display: none; }
.ts-strip[data-stage='category'] .ts-tiles { justify-content: safe center; }

.ts-tile {
  display: grid;
  place-items: center;
  flex: 0 0 clamp(3.4rem, min(6.4vw, 11vh), 6.2rem);
  aspect-ratio: 1;
  padding: .55rem;
  background: linear-gradient(#18191c, #0b0c0e);
  border: 1px solid #ffffff14;
  border-radius: 3px;
  opacity: .62;
  cursor: pointer;
  transition: opacity .12s, box-shadow .12s, border-color .12s;
}
.ts-tile img { transform: perspective(160px) rotateY(-10deg); box-shadow: 0 2px 5px #000b; }
.ts-tile:is(:hover, :focus-visible) { opacity: .9; }
.ts-tile[aria-pressed='true'] {
  opacity: 1;
  border-color: #a6dcff;
  background: linear-gradient(#173a5c, #0a1b2e 55%, #12365a);
  box-shadow: inset 0 0 8px #7cc6ff, 0 0 12px #2f8be0aa;
}
.ts-tile:disabled { opacity: .25; cursor: default; }
.ts-tile-region { flex-basis: clamp(5.5rem, 10vw, 9rem); aspect-ratio: auto; gap: .35rem; padding: .55rem .5rem .4rem; }
.ts-tile-region .ts-mosaic { width: 72%; transform: none; filter: none; }
.ts-tile-region span { font-size: clamp(.62rem, .95vw, .82rem); font-weight: 800; text-align: center; }

.ts-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:is(.console-page, .top-menu) .key[data-key='R'] { background: linear-gradient(#5aa3e8, #144f94); }

@media (max-width: 767px) {
  .ts-model { display: none; }
  .ts-side, .ts-side[data-side='away'] { grid-template-columns: minmax(0, 1fr); }
  .ts-board { gap: .4rem; }
  .ts-panel { min-height: 14rem; max-height: none; }
  .ts-panel-tab { padding-inline: .6rem 1.4rem; }
  .ts-side[data-side='away'] .ts-panel-tab { padding-inline: 1.4rem .6rem; }
  .ts-panel-owner { display: none; }
  .ts-ratings { grid-template-columns: auto; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) { .ts-panel-body { animation: none; } }

/* The shared BACK / NEXT bar (components/ScreenNav.tsx). Loaded after console.css. */

/*
 * Every menu screen ends in this bar. It lives in the page footer, a flex:none row under the scrolling
 * content of a 100dvh page, so it is always on screen and never covers content. BACK sits bottom-left as a
 * silver button, the main action bottom-right as the blue primary, and between them the reason NEXT refused,
 * the screen's secondary actions (room code, Copy Link, Ready), and the key hints, which stay small: a
 * reminder, not the way through. An empty slot keeps its place, so NEXT is always in the same corner.
 */

.console-footer-nav {
  display: block;
  padding-top: clamp(.4rem, 1.2vh, .8rem);
  border-top: 1px dotted #8092a86b;
}

.console-page { padding-bottom: max(clamp(.45rem, 2.2vh, 1.8rem), env(safe-area-inset-bottom)); }

.screen-nav {
  display: grid;
  grid-template-columns: minmax(8.5rem, auto) minmax(0, 1fr) minmax(10.5rem, auto);
  align-items: center;
  gap: .5rem clamp(.6rem, 1.5vw, 1.25rem);
  width: 100%;
}

.screen-nav-slot { display: flex; min-width: 0; }
.screen-nav-slot[data-slot='back'] { justify-content: flex-start; }
.screen-nav-slot[data-slot='next'] { justify-content: flex-end; }

.screen-nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem .7rem;
  min-width: 0;
}

/* Beats console.css's .console-page .console-button rules, which are sized for small inline actions. */
.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 3rem;
  padding: .35rem clamp(1rem, 2vw, 1.75rem);
  border: 1px solid;
  border-radius: 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(.95rem, 1.25vw, 1.15rem);
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: filter .12s ease, box-shadow .12s ease, transform .06s ease;
}

/* The top half's shine, as on the console's buttons. */
.nav-btn::before {
  content: '';
  position: absolute;
  inset: 1px 1px 50% 1px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(#ffffff59, #ffffff12);
  pointer-events: none;
}

.nav-btn-arrow { position: relative; top: -.08em; font-size: 1.3em; line-height: .8; transition: transform .12s ease; }
.nav-btn-text { position: relative; }

.nav-btn[data-role='back'] {
  justify-self: start;
  border-color: #eef2f7 #8b95a3 #5f6875;
  background: linear-gradient(#f3f5f8, #cdd2da 47%, #9aa3b0 53%, #bcc3cd);
  box-shadow: inset 0 1px #fff, inset 0 -2px 3px #0000002e, 0 2px 6px #000b;
  color: #18212c;
  text-shadow: 0 1px #ffffffa6;
}

.nav-btn[data-role='back']:is(:hover, :focus-visible):enabled {
  border-color: #fff #a2acb9 #6c7684;
  background: linear-gradient(#ffffff, #dde1e7 47%, #aeb6c2 53%, #cdd3dc);
  filter: none;
}

.nav-btn[data-role='next'] {
  justify-self: end;
  min-width: min(100%, 11rem);
  border-color: #b5e1ff #3a8fd6 #0c3f7a;
  background: linear-gradient(#8ed2ff, #2b8ae0 47%, #0e58ad 53%, #2a7fcf);
  box-shadow: inset 0 1px #ffffffb3, inset 0 -2px 4px #00204466, 0 2px 8px #000c, 0 0 14px #2f8ee455;
  color: #fff;
  text-shadow: 0 1px 2px #00244d;
}

.nav-btn[data-role='next']:is(:hover, :focus-visible):enabled {
  border-color: #d6efff #56a8ec #134d8e;
  background: linear-gradient(#a9deff, #3c9cf0 47%, #1468c4 53%, #3a92e2);
  filter: none;
}

/* The finish commits the setup, so it stands out a little more than a page turn. */
.nav-btn[data-role='next'][data-final] { min-width: min(100%, 14rem); }

.nav-btn[data-role='next']:hover:enabled .nav-btn-arrow { transform: translateX(3px); }
.nav-btn[data-role='back']:hover:enabled .nav-btn-arrow { transform: translateX(-3px); }

.nav-btn:active:enabled {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px #0006, 0 1px 3px #000a;
}

.nav-btn:focus-visible {
  outline: 3px solid #ffd54d;
  outline-offset: 3px;
}

.nav-btn:disabled {
  cursor: not-allowed;
  border-color: #6f7884;
  background: linear-gradient(#7d8590, #545b66 50%, #4a515b);
  box-shadow: none;
  color: #c5ccd5;
  text-shadow: none;
  opacity: .7;
}

.screen-nav-middle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem 1.2rem;
  min-width: 0;
}

/* A smaller action of the same family, between BACK and NEXT. */
.nav-btn[data-role='secondary'] {
  min-height: 2.35rem;
  padding-inline: clamp(.75rem, 1.4vw, 1.1rem);
  font-size: clamp(.78rem, 1vw, .9rem);
  border-color: #eef2f7 #8b95a3 #5f6875;
  background: linear-gradient(#e4e8ee, #b9c0ca 47%, #8a94a2 53%, #aab2be);
  box-shadow: inset 0 1px #fff, inset 0 -2px 3px #0000002e, 0 2px 5px #000a;
  color: #18212c;
  text-shadow: 0 1px #ffffff8c;
}

.nav-btn[data-role='secondary']:is(:hover, :focus-visible):enabled,
.nav-btn[data-role='secondary'][aria-pressed='true']:enabled {
  border-color: #b5e1ff #3a8fd6 #0c3f7a;
  background: linear-gradient(#8ed2ff, #2b8ae0 47%, #0e58ad 53%, #2a7fcf);
  color: #fff;
  text-shadow: 0 1px 2px #00244d;
}

/* A destructive commit (Quit) keeps the primary's shape in red. */
.nav-btn[data-role='next'][data-danger] {
  border-color: #ffc2cb #e0475f #7a0c1f;
  background: linear-gradient(#ff9aa9, #e23a55 47%, #ad1430 53%, #cf2f4b);
  box-shadow: inset 0 1px #ffffffb3, inset 0 -2px 4px #44000f66, 0 2px 8px #000c;
  text-shadow: 0 1px 2px #4d0010;
}
.nav-btn[data-role='next'][data-danger]:is(:hover, :focus-visible):enabled {
  border-color: #ffd6dc #f0607a #8e1428;
  background: linear-gradient(#ffb3bf, #ef4d68 47%, #c01c3a 53%, #df3d59);
}

/* A list cursor that has reached its end rests on NEXT (the penalty lineup's Confirm). */
.nav-btn[data-role='next'][data-cursor]:enabled {
  outline: 3px solid #ffd54d;
  outline-offset: 3px;
  animation: nav-btn-cursor 1.2s ease-in-out infinite;
}
@keyframes nav-btn-cursor { 50% { outline-color: #ffd54d66; } }

.screen-nav-message {
  display: flex;
  align-items: center;
  gap: .55rem;
  max-width: 100%;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: 3px;
  padding: .45rem .8rem;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.25;
  animation: screen-nav-in .16s ease-out both;
}

.screen-nav-message[data-tone='error'] { border-color: #fb7185aa #fb718555 #fb718555 #fb7185; background: #4c0519e6; color: #ffe4e6; }
.screen-nav-message[data-tone='info'] { border-color: #6fd3ff88 #6fd3ff44 #6fd3ff44 #6fd3ff; background: #0b2340e6; color: #bfeaff; }

.screen-nav-message-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: linear-gradient(#ff8a9b, #be123c);
  color: #fff;
  font-size: .8rem;
  font-weight: 900;
}

@keyframes screen-nav-in { from { opacity: 0; transform: translateY(4px); } }

.screen-nav-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .3rem .9rem;
  color: #8e9db0;
  font-size: .78rem;
}

/* The progress bar is the map of the setup; it stays at full strength on every step. */
.screen-team .wizard-progress { opacity: 1; }

/* Small screens: the message gets its own row and the two actions split the width, thumb-sized. */
@media (max-width: 767px) {
  .screen-nav-hints { display: none; }
  .screen-nav { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .screen-nav-middle { grid-column: 1 / -1; grid-row: 1; }
  .screen-nav-middle:not(:has(.screen-nav-message, .screen-nav-actions)) { display: none; }
  .nav-btn[data-role='secondary'] { width: auto; }
  .nav-btn { width: 100%; min-width: 0; padding-inline: .6rem; gap: .45rem; font-size: .9rem; letter-spacing: .04em; }
  .nav-btn-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .nav-btn[data-role='next'][data-final] { min-width: 0; }
  .screen-nav-message { font-size: .85rem; }
}

@media (max-width: 380px) {
  .nav-btn { letter-spacing: .03em; gap: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .screen-nav-message, .nav-btn-arrow, .nav-btn, .nav-btn[data-role='next'][data-cursor]:enabled { animation: none; transition: none; }
}

/* In a dialog or result card the bar is the card's last row: BACK and NEXT split its width. */
.screen-nav[data-compact] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: .35rem; }
.screen-nav[data-compact] .screen-nav-middle { grid-column: 1 / -1; grid-row: 1; }
.screen-nav[data-compact] .screen-nav-middle:empty { display: none; }
.screen-nav[data-compact] .nav-btn:not([data-role='secondary']) { width: 100%; min-width: 0; padding-inline: .75rem; white-space: normal; }
.screen-nav[data-compact] .screen-nav-slot:empty { display: none; }
.screen-nav[data-compact]:has(.screen-nav-slot:empty) { grid-template-columns: minmax(0, 1fr); }

/*
 * The public information pages. The build puts the game's own console.css and styles/screen-nav.css in front of
 * this file (see plugin.ts), so the backdrop, the heading, the panels and the BACK bar are the game's real styles.
 * This file only adds what the React screens get from Tailwind, and the bits of a text page the game has no use for.
 */
:root { color-scheme: dark; }

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: #050d1e;
  color: #fff;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* index.css in the game. */
.scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(143, 170, 205, .4) transparent;
}

.min-w-0 { min-width: 0; }

.key {
  display: inline-grid;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 .3rem;
  place-items: center;
  border: 1px solid rgba(215, 224, 236, .5);
  border-radius: 3px;
  background: rgba(255, 255, 255, .08);
  font-size: .75rem;
  font-weight: 600;
}

.hint { display: flex; align-items: center; gap: .375rem; }

.skip { position: absolute; left: -999px; top: .5rem; z-index: 3; padding: .4rem .8rem; background: #0a1a38; color: #fff; }
.skip:focus { left: .5rem; }

/* Breadcrumb under the title, where a game screen shows its subtitle. */
.info-crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 0; padding: 0; list-style: none; font-size: .78rem; color: #8ea3bf; }
.info-crumbs li + li::before { content: '›'; margin-right: .35rem; }
.info-crumbs a { color: #c4d0df; text-decoration: none; }
.info-crumbs a:is(:hover, :focus-visible) { color: #fff; text-decoration: underline; }

/* The guide's own pages: a quiet row of links along the heading, never a main-menu item. */
.info-tabs { flex: none; padding: .45rem .15rem 0; }
.info-tabs ul { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; margin: 0; padding: 0; list-style: none; }
.info-tabs a {
  display: inline-block;
  padding: .2rem 0;
  border-bottom: 2px solid transparent;
  color: #8e9db0;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.info-tabs a:is(:hover, :focus-visible) { color: #fff; }
.info-tabs a[aria-current='page'] { color: #fff; border-bottom-color: #3fb6ff; }

/* Content: each section is a game card (the Card component: .panel p-3 sm:p-4). */
.console-content { gap: .55rem; }
.info-content > * { flex: none; }

.info-content > section,
.info-content > .info-lead {
  margin: 0;
  padding: .75rem;
  background: #16191ed9;
  border: 1px solid #b2c1d32a;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .info-content > section, .info-content > .info-lead { padding: 1rem; }
}

.info-lead { color: #fff; font-size: .95rem; }

.info-content h2 {
  margin: 0 0 .5rem;
  color: #3fb6ff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1.2;
  text-transform: uppercase;
}

.info-content section:nth-of-type(even) h2 { color: #7fe6ff; }

.info-content h3 { margin: .9rem 0 .35rem; color: #fff; font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.info-content p, .info-content ul { margin: 0 0 .55rem; color: #ffffffd9; }
.info-content p:last-child, .info-content ul:last-child { margin-bottom: 0; }
.info-content ul { padding-left: 1.2rem; }
.info-content li + li { margin-top: .3rem; }
.info-content strong, .info-content b { color: #fff; }
.info-content a { color: #7fe6ff; text-underline-offset: .15em; }
.info-content a:is(:hover, :focus-visible) { color: #fff; }

.info-content kbd {
  padding: 0 .4rem;
  border-radius: .25rem;
  background: #ffffff26;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .85em;
}

.facts { display: flex; flex-direction: column; gap: .5rem; margin: .6rem 0; }
.facts div { display: flex; flex-wrap: wrap; gap: 0 .35rem; }
.facts dt { font-weight: 700; color: #fff; }
.facts dt::after { content: ':'; }
.facts dd { margin: 0; color: #ffffffd9; }

.table-wrap { overflow-x: auto; margin: .4rem 0 .6rem; }
.info-content table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.info-content th, .info-content td { padding: .4rem .55rem; border-bottom: 1px solid #a8c9f023; text-align: left; vertical-align: top; }
.info-content th { color: #c4d0df; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }

/* BACK TO GAME is a link here, so it needs the hover the game gives its enabled buttons. */
a.nav-btn, a.console-brand { text-decoration: none; }
a.nav-btn[data-role='back']:is(:hover, :focus-visible) {
  border-color: #fff #a2acb9 #6c7684;
  background: linear-gradient(#ffffff, #dde1e7 47%, #aeb6c2 53%, #cdd3dc);
}
a.nav-btn[data-role='back']:hover .nav-btn-arrow { transform: translateX(-3px); }
a.nav-btn:active { transform: translateY(1px); box-shadow: inset 0 2px 5px #0006, 0 1px 3px #000a; }

.info-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .9rem; margin: 0; padding: 0; list-style: none; font-size: .74rem; }
.info-footer-links a { color: #8e9db0; text-decoration: none; }
.info-footer-links a:is(:hover, :focus-visible) { color: #fff; text-decoration: underline; }

@media (max-width: 640px) {
  .info-tabs ul { gap: .1rem .8rem; }
  /* The game hides the middle row on phones; the footer links stay reachable in the tab row above. */
}
