:root {
  --paper: #f3efe4;
  --paper-deep: #e7dfce;
  --paper-light: #fffdf7;
  --ink: #173b36;
  --ink-soft: #315149;
  --ink-faint: #506660;
  --coral: #aa3f38;
  --coral-soft: #f5c5bd;
  --gold: #f4c865;
  --mint: #dce7ce;
  --line: #cec7b8;
  --white: #ffffff;
  --error: #9c2f2f;
  --error-bg: #f7dfd9;
  --success-bg: #dde9d4;
  --shadow: 0 20px 60px rgb(23 59 54 / 0.1);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --content: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 83% 0%, rgb(244 200 101 / 0.22), transparent 28rem),
    var(--paper);
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled,
fieldset:disabled {
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex="0"]:focus-visible,
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2,
strong {
  text-wrap: balance;
}

h1 {
  margin-bottom: 0.7rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 6vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.97;
}

h2 {
  margin-bottom: 0.45rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

p {
  line-height: 1.62;
}

small {
  color: var(--ink-faint);
  line-height: 1.45;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.noscript {
  margin: 1rem;
  padding: 1rem;
  border: 2px solid var(--error);
  background: var(--error-bg);
}

.eyebrow,
.chapter {
  margin-bottom: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.chapter {
  color: var(--coral);
}

.muted {
  color: var(--ink-soft);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand-lockup img {
  flex: none;
  border-radius: 15px;
  box-shadow: 0 7px 18px rgb(23 59 54 / 0.12);
}

.brand-lockup div {
  display: grid;
  min-width: 0;
}

.brand-lockup .eyebrow {
  margin: 0;
  font-size: 0.55rem;
}

.brand-lockup strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 500;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.72rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.button:not(:disabled):hover {
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 1;
  box-shadow: none;
}

.button-primary {
  background: var(--ink);
  box-shadow: 0 8px 20px rgb(23 59 54 / 0.18);
  color: var(--white);
}

.button-primary:not(:disabled):hover {
  background: #0d2c28;
  box-shadow: 0 11px 28px rgb(23 59 54 / 0.22);
}

.button-secondary {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.button-secondary:not(:disabled):hover {
  background: var(--mint);
}

.button-ghost {
  border-color: var(--line);
  background: rgb(255 255 255 / 0.42);
}

.button-wide {
  width: 100%;
}

.feedback {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 1rem 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid;
  border-radius: var(--radius-sm);
}

.feedback p {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.45;
}

.feedback-dot {
  width: 9px;
  height: 9px;
  flex: none;
  margin-top: 0.28rem;
  border-radius: 50%;
}

.feedback-error {
  border-color: #d29689;
  background: var(--error-bg);
  color: var(--error);
}

.feedback-error .feedback-dot {
  background: var(--error);
}

.feedback-notice {
  border-color: #aabc9d;
  background: var(--success-bg);
}

.feedback-notice .feedback-dot {
  background: var(--ink);
}

.boot-shell,
.unavailable-page {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  padding: 2rem;
  text-align: center;
}

.boot-shell h1 {
  max-width: 700px;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
}

.boot-shell p:not(.eyebrow) {
  color: var(--ink-soft);
}

.boot-mark {
  margin-bottom: 1.25rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
  animation: mark-breathe 1.6s ease-in-out infinite alternate;
}

@keyframes mark-breathe {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-6px);
  }
}

/* Access */
.access-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
}

.access-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(1.4rem, 4vw, 4rem);
  background:
    linear-gradient(135deg, rgb(23 59 54 / 0.97), rgb(23 59 54 / 0.9)),
    repeating-linear-gradient(
      120deg,
      transparent 0 38px,
      rgb(255 255 255 / 0.05) 38px 40px
    );
  color: var(--paper-light);
}

.access-story > * {
  position: relative;
  z-index: 1;
}

.access-story .brand-lockup .eyebrow {
  color: #bad1c8;
}

.access-story .brand-lockup {
  color: var(--paper-light);
}

.access-copy {
  max-width: 920px;
  margin: auto 0;
  padding: 4rem 0;
}

.access-copy .chapter {
  color: var(--gold);
}

.access-copy h1 {
  max-width: 900px;
  margin-bottom: 1.4rem;
  font-size: clamp(3.4rem, 7.5vw, 8rem);
}

.access-copy > p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  color: #d9e4df;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.journey-preview {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.journey-preview li {
  display: grid;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.24);
  border-left: 1px solid rgb(255 255 255 / 0.15);
}

.journey-preview span,
.journey-preview small {
  color: #b8ccc5;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.journey-preview strong {
  padding: 0.28rem 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 500;
}

.access-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 4rem);
  background: var(--paper-light);
}

.access-panel-inner {
  width: min(100%, 440px);
}

.access-panel h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.auth-tabs {
  display: grid;
  margin: 1.8rem 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  grid-template-columns: 1fr 1fr;
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-tabs button.is-active {
  background: var(--ink);
  box-shadow: 0 4px 12px rgb(23 59 54 / 0.18);
  color: var(--white);
}

.form-stack {
  display: grid;
  gap: 1rem;
}

.form-stack label,
.club-name-card label {
  display: grid;
  gap: 0.42rem;
}

.form-stack label > span,
.club-name-card label {
  font-size: 0.76rem;
  font-weight: 820;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0.68rem 0.78rem;
  border: 1px solid #aca696;
  border-radius: 9px;
  background: var(--paper-light);
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder-color, var(--ink-faint));
  opacity: var(--placeholder-opacity, 1);
}

[data-all-pixel-contrast-masked] {
  color: transparent !important;
  caret-color: transparent !important;
  text-decoration-color: transparent !important;
  text-shadow: none !important;
}

[data-all-pixel-contrast-masked]::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

input:hover,
select:hover {
  border-color: var(--ink);
}

input:user-invalid {
  border-color: var(--error);
}

.privacy-note {
  margin: 1.25rem 0 0;
  color: var(--ink-faint);
  font-size: 0.72rem;
  text-align: center;
}

/* World and onboarding */
.selection-page {
  width: min(100%, var(--content));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem);
}

.selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.selection-intro {
  max-width: 930px;
  margin: clamp(4rem, 9vw, 8rem) 0 clamp(2rem, 5vw, 4rem);
}

.selection-intro h1 {
  font-size: clamp(3rem, 7vw, 7rem);
}

.selection-intro > p:last-child {
  max-width: 750px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.world-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.world-card {
  position: relative;
  display: grid;
  min-height: 360px;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgb(255 253 247 / 0.75);
  box-shadow: 0 12px 45px rgb(23 59 54 / 0.06);
}

.world-card:first-child {
  background: var(--mint);
}

.world-orbit {
  position: absolute;
  top: -5rem;
  right: -4rem;
  display: grid;
  width: 15rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(23 59 54 / 0.15);
  border-radius: 50%;
}

.world-orbit::before {
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border: 1px solid rgb(23 59 54 / 0.2);
  border-radius: 50%;
  content: "";
}

.world-orbit span {
  position: absolute;
  right: 29%;
  bottom: 12%;
  display: grid;
  width: 2.2rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 900;
}

.world-card-copy {
  position: relative;
  z-index: 1;
  align-self: end;
  padding-top: 5rem;
}

.world-card h2 {
  max-width: 70%;
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.world-card .button {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: start;
  margin-top: 1.4rem;
}

.occupancy {
  display: grid;
  align-items: center;
  gap: 0.65rem;
  grid-template-columns: minmax(90px, 190px) auto;
}

.occupancy progress,
.attribute-line {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
}

.occupancy progress::-webkit-progress-bar,
.attribute-line::-webkit-progress-bar {
  border-radius: 999px;
  background: rgb(23 59 54 / 0.14);
}

.occupancy progress::-webkit-progress-value,
.attribute-line::-webkit-progress-value {
  border-radius: 999px;
  background: var(--coral);
}

.occupancy progress::-moz-progress-bar,
.attribute-line::-moz-progress-bar {
  border-radius: 999px;
  background: var(--coral);
}

.occupancy > span {
  font-size: 0.78rem;
  font-weight: 850;
}

.membership-line {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.onboarding-grid {
  display: grid;
  align-items: stretch;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.6fr);
}

.club-name-card,
.world-facts {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.club-name-card {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.3rem, 4vw, 3rem);
  background: var(--paper-light);
  grid-template-columns: auto minmax(0, 1fr);
}

.club-name-card .button,
.club-name-card .feedback {
  grid-column: 1 / -1;
}

.crest-builder {
  position: relative;
  display: grid;
  width: clamp(85px, 12vw, 140px);
  aspect-ratio: 0.88;
  place-items: center;
  overflow: hidden;
  border-radius: 42% 42% 50% 50% / 28% 28% 65% 65%;
  background: var(--ink);
  box-shadow: inset 0 0 0 8px var(--gold);
}

.crest-builder::before,
.crest-builder::after {
  position: absolute;
  background: var(--coral);
  content: "";
}

.crest-builder::before {
  width: 18px;
  height: 100%;
}

.crest-builder::after {
  width: 100%;
  height: 18px;
}

.crest-builder span {
  z-index: 1;
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper-light);
}

.world-facts {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--ink);
  color: var(--paper-light);
}

.world-facts .eyebrow,
.world-facts small {
  color: #bdd0ca;
}

.world-facts h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.world-facts .occupancy progress::-webkit-progress-bar {
  background: rgb(255 255 255 / 0.18);
}

.world-facts .occupancy progress::-webkit-progress-value {
  background: var(--gold);
}

.world-facts .occupancy progress::-moz-progress-bar {
  background: var(--gold);
}

.world-facts dl {
  display: grid;
  gap: 0;
  margin: 2.5rem 0 0;
}

.world-facts dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgb(255 255 255 / 0.16);
}

.world-facts dt {
  color: #b8cbc5;
  font-size: 0.73rem;
}

.world-facts dd {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: right;
}

.candidate-empty,
.candidate-card {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-light);
}

.candidate-empty {
  display: grid;
  align-items: center;
  gap: 1.25rem;
  padding: clamp(1.4rem, 4vw, 2.6rem);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.candidate-empty > span {
  color: var(--coral);
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 850;
  line-height: 0.8;
}

.candidate-empty h2,
.candidate-header h2,
.fairness-card h3 {
  margin: 0.2rem 0 0.45rem;
}

.candidate-card {
  overflow: hidden;
}

.candidate-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.candidate-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.candidate-audit {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-light);
}

.candidate-audit > summary {
  padding: 1rem;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 820;
}

.candidate-audit .candidate-identity {
  padding: 0 1rem 1rem;
}

.candidate-identity {
  display: grid;
  margin: 0;
  padding: 0 clamp(1.25rem, 3vw, 2rem) 1.4rem;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(120px, 0.6fr));
}

.candidate-identity > div {
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-right: 0;
}

.candidate-identity > div:last-child {
  border-right: 1px solid var(--line);
}

.candidate-identity dt {
  margin-bottom: 0.3rem;
  color: var(--ink-faint);
  font-size: 0.66rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.candidate-identity dd {
  min-width: 0;
  margin: 0;
  font-size: 0.76rem;
  font-weight: 760;
}

.candidate-identity code,
.fairness-hash code,
#candidate-binding-hint code {
  overflow-wrap: anywhere;
}

.candidate-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.candidate-table,
.fairness-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 0.73rem;
}

.candidate-table th,
.candidate-table td,
.fairness-table th,
.fairness-table td {
  padding: 0.65rem 0.7rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.candidate-table th:nth-child(2),
.candidate-table td:nth-child(2),
.fairness-table th:first-child {
  text-align: left;
}

.candidate-table tbody tr:nth-child(even),
.fairness-table tbody tr:nth-child(even) {
  background: rgb(23 59 54 / 0.035);
}

.fairness-card {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.fairness-card > div:first-child {
  max-width: 760px;
}

.role-counts {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.role-counts li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-light);
}

.role-counts strong {
  color: var(--coral);
  font-family: var(--display);
  font-size: 1.6rem;
}

.role-counts span {
  font-size: 0.7rem;
  font-weight: 780;
}

.fairness-hash {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.candidate-acceptance-grid {
  margin-top: 1rem;
}

#candidate-binding-hint {
  display: block;
  margin-top: 0.45rem;
}

/* Game shell */
.game-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 232px minmax(0, 1fr);
}

.side-rail {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--ink);
  color: var(--paper-light);
}

.side-rail .brand-lockup {
  padding: 0.3rem 0.3rem 1.7rem;
}

.side-rail .brand-lockup .eyebrow {
  color: #a9c1ba;
}

.primary-nav {
  display: grid;
  gap: 0.3rem;
}

.nav-item {
  display: flex;
  min-height: 49px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.52rem 0.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #dbe5e2;
  font-size: 0.78rem;
  font-weight: 750;
  text-align: left;
}

.nav-item:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.09);
}

.nav-item.is-active {
  background: var(--paper-light);
  color: var(--ink);
}

.nav-item.is-active:is(:hover, :focus-visible):not(:disabled) {
  background: var(--paper-light);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--gold);
}

.nav-item:disabled {
  color: #a9c1ba;
}

.nav-symbol {
  display: grid;
  width: 29px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 900;
}

.rail-footer {
  display: grid;
  gap: 0.25rem;
  margin-top: auto;
}

.rail-link {
  min-height: 39px;
  padding: 0.45rem 0.55rem;
  border: 0;
  background: transparent;
  color: #a9c1ba;
  font-size: 0.7rem;
  text-align: left;
}

.rail-link:hover {
  color: var(--paper-light);
}

.rail-link kbd {
  float: right;
  padding: 0.1rem 0.35rem;
  border: 1px solid #68857d;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.08);
  font: inherit;
}

.rail-logout {
  margin-top: 0.6rem;
  border-top: 1px solid rgb(255 255 255 / 0.14);
}

.club-workspace {
  min-width: 0;
}

.club-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line);
  background: rgb(243 239 228 / 0.94);
  backdrop-filter: blur(14px);
}

.identity-strip {
  display: flex;
  min-width: 0;
  align-items: center;
}

.identity-strip > div {
  display: grid;
  min-width: 0;
  padding: 0 1.25rem;
  border-left: 1px solid var(--line);
}

.identity-strip > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.identity-strip span,
.balance-chip span {
  color: var(--ink-faint);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.identity-strip strong {
  overflow: hidden;
  max-width: 210px;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-strip small {
  font-size: 0.6rem;
}

.balance-chip {
  display: grid;
  flex: none;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-light);
  text-align: right;
}

.balance-chip strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.workspace-main {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2.8rem);
}

.workspace-main > .feedback {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin: 1rem 0 clamp(1.5rem, 4vw, 3rem);
}

.section-heading h1,
.replay-hero h1 {
  font-size: clamp(2.7rem, 6vw, 6.2rem);
}

.section-heading p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.saved-state,
.world-capacity,
.authority-badge {
  flex: none;
  padding: 0.58rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-light);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.authority-badge {
  border-color: #9bb19f;
  background: var(--success-bg);
}

.authority-badge span {
  margin-right: 0.35rem;
}

.mobile-nav {
  display: none;
}

/* Squad */
.role-summary {
  display: grid;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-light);
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.role-summary div {
  display: grid;
  min-width: 0;
  padding: 1rem;
  border-left: 1px solid var(--line);
}

.role-summary div:first-child {
  border-left: 0;
}

.role-summary span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.role-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-summary .lineup-count {
  background: var(--ink);
  color: var(--white);
}

.role-summary .lineup-count small {
  color: #c7d6d1;
}

.roster-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-card {
  display: grid;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(255 253 247 / 0.72);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.player-card.is-selected {
  border-color: #9aae97;
  background: var(--mint);
}

.player-index {
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
}

.player-info {
  min-width: 0;
}

.player-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
}

.player-heading h2 {
  overflow: hidden;
  margin: 0;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.starter-badge {
  display: inline-grid;
  width: 24px;
  aspect-ratio: 1;
  flex: none;
  place-items: center;
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.55rem;
}

.player-info p {
  margin: 0.18rem 0 0.5rem;
  color: var(--ink-faint);
  font-size: 0.68rem;
}

.attribute-line {
  display: block;
  height: 5px;
}

.rating {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.rating small {
  font-family: inherit;
  font-size: 0.58rem;
}

.provenance-note {
  margin: 1rem 0 0;
  color: var(--ink-faint);
  font-size: 0.68rem;
  text-align: right;
}

/* Tactics */
.tactics-layout {
  display: grid;
  align-items: start;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
}

.pitch-card,
.tactic-board,
.stats-card,
.timeline-card,
.table-card,
.ledger-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-light);
}

.pitch-card {
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.card-header > div {
  display: grid;
}

.card-header .eyebrow {
  margin-bottom: 0.18rem;
}

.card-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.card-header > span {
  display: grid;
  min-width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 0.64rem;
  font-weight: 900;
}

.pitch {
  position: relative;
  display: flex;
  min-height: 650px;
  flex-direction: column;
  justify-content: space-around;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 2.4rem);
  background:
    linear-gradient(rgb(225 234 206 / 0.9), rgb(210 226 197 / 0.95)),
    repeating-linear-gradient(
      90deg,
      transparent 0 70px,
      rgb(23 59 54 / 0.03) 70px 140px
    );
}

.pitch-lines > span {
  position: absolute;
  pointer-events: none;
}

.pitch-half {
  top: 50%;
  right: 0;
  left: 0;
  border-top: 1px solid rgb(23 59 54 / 0.23);
}

.pitch-circle {
  top: 50%;
  left: 50%;
  width: 120px;
  aspect-ratio: 1;
  border: 1px solid rgb(23 59 54 / 0.23);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-box {
  left: 50%;
  width: 42%;
  height: 13%;
  border: 1px solid rgb(23 59 54 / 0.23);
  transform: translateX(-50%);
}

.pitch-box-top {
  top: -1px;
  border-top: 0;
}

.pitch-box-bottom {
  bottom: -1px;
  border-bottom: 0;
}

.pitch-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.65rem;
}

.pitch-player {
  display: grid;
  width: min(100%, 150px);
  justify-items: center;
  gap: 0.25rem;
}

.pitch-player > span {
  display: grid;
  min-width: 30px;
  min-height: 25px;
  place-items: center;
  border-radius: 7px 7px 4px 4px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.58rem;
  font-weight: 900;
}

.pitch-player select {
  min-height: 38px;
  padding: 0.5rem 1.7rem 0.5rem 0.55rem;
  border-color: rgb(23 59 54 / 0.35);
  background: rgb(255 253 247 / 0.95);
  font-size: 0.67rem;
  font-weight: 750;
}

.tactic-board {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 1.2rem;
  padding: 1.25rem;
}

.tactic-board h2 {
  font-size: 2rem;
}

.tactic-board p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.tactic-controls {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr 1fr;
}

.tactic-control {
  display: grid;
  gap: 0.34rem;
}

.tactic-control:first-child {
  grid-column: 1 / -1;
}

.tactic-control span {
  font-size: 0.66rem;
  font-weight: 850;
}

.tactic-control select {
  font-size: 0.77rem;
}

/* Match */
.opponent-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.opponent-fieldset legend {
  margin-bottom: 0.7rem;
  font-size: 0.72rem;
  font-weight: 850;
}

.opponent-catalogue-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #a8b99a;
  border-radius: var(--radius-md);
  background: var(--success-bg);
}

.opponent-catalogue-status > div {
  flex: 1;
}

.opponent-catalogue-status p {
  margin: 0.18rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.opponent-catalogue-status.is-error {
  border-color: #c99086;
  background: #fff0eb;
}

.opponent-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.opponent-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 118px;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-light);
  cursor: pointer;
}

.opponent-card.is-selected {
  border: 2px solid var(--ink);
  background: var(--mint);
}

.opponent-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.opponent-card:focus-within {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.opponent-number {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  flex: none;
  place-items: center;
  border-radius: 13px;
  background: var(--ink);
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
}

.opponent-card > span:nth-of-type(2) {
  display: grid;
  min-width: 0;
}

.opponent-card small {
  font-size: 0.62rem;
}

.opponent-card strong {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-mark {
  width: 20px;
  aspect-ratio: 1;
  flex: none;
  margin-left: auto;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.opponent-card.is-selected .radio-mark {
  border: 5px solid var(--ink);
  background: var(--gold);
}

.match-confirm {
  display: grid;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--paper-light);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
}

.match-confirm > div {
  display: grid;
  min-width: 0;
}

.match-confirm > div:nth-of-type(2) {
  text-align: right;
}

.match-confirm span,
.match-confirm small {
  color: #b7cbc4;
  font-size: 0.63rem;
}

.match-confirm strong {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-confirm .versus {
  display: grid;
  width: 44px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #76928a;
  border-radius: 50%;
  color: var(--gold);
  font-weight: 900;
}

.match-confirm .button {
  background: var(--gold);
  box-shadow: none;
  color: var(--ink);
}

.match-queue,
.match-result-teaser,
.new-match-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #a8b99a;
  border-radius: var(--radius-md);
  background: var(--success-bg);
}

.match-queue > div {
  flex: 1;
}

.match-queue p,
.new-match-panel p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.queue-pulse {
  width: 17px;
  aspect-ratio: 1;
  flex: none;
  border: 5px solid var(--gold);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgb(185 72 64 / 0.4);
  animation: queue-pulse 1.3s infinite;
}

@keyframes queue-pulse {
  70% {
    box-shadow: 0 0 0 10px rgb(185 72 64 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(185 72 64 / 0);
  }
}

.match-result-teaser,
.new-match-panel {
  justify-content: space-between;
}

.match-result-teaser > div {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.match-result-teaser > div span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.match-result-teaser > div strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

/* Replay */
.replay-product-heading {
  margin-bottom: 1.25rem;
}

.replay-next-actions {
  margin-top: 1rem;
}

.replay-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin: 1rem 0 2rem;
}

/* Challenge history */
.history-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-item {
  display: grid;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-light);
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.history-fixture {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.history-fixture > span,
.history-fixture > small,
.history-result > span {
  color: var(--ink-faint);
  font-size: 0.66rem;
  font-weight: 750;
}

.history-fixture > strong {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-fixture i {
  color: var(--coral);
  font-size: 0.72rem;
  font-style: normal;
}

.history-result {
  display: grid;
  min-width: 70px;
  text-align: center;
}

.history-result > strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
}

.history-more {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.scoreboard {
  display: grid;
  min-width: min(100%, 650px);
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.3rem;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--paper-light);
  grid-template-columns: 1fr auto 1fr;
}

.scoreboard > div {
  display: grid;
}

.scoreboard > div:last-child {
  text-align: right;
}

.scoreboard small {
  color: #acc3bc;
  font-size: 0.58rem;
}

.scoreboard > span {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
}

.scoreboard i {
  color: var(--gold);
  font-size: 1.5rem;
  font-style: normal;
}

.replay-layout {
  display: grid;
  align-items: start;
  gap: 1rem;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
}

.stats-card {
  position: sticky;
  top: 96px;
  overflow: hidden;
}

.stats-card table {
  width: 100%;
  border-collapse: collapse;
}

.stats-card th,
.stats-card td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
}

.stats-card thead th {
  color: var(--ink-faint);
  font-size: 0.59rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.stats-card tbody th {
  color: var(--ink-soft);
  font-weight: 650;
  text-align: center;
}

.stats-card td:last-child {
  text-align: right;
}

.integrity-details {
  padding: 1rem;
}

.integrity-details summary {
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}

.integrity-details dl {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0;
}

.integrity-details dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.integrity-details dt {
  color: var(--ink-faint);
  font-size: 0.65rem;
}

.integrity-details dd {
  margin: 0;
}

.timeline-card {
  overflow: hidden;
}

.timeline-controls {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 0.6rem;
}

.timeline-count {
  display: grid;
  min-width: 44px;
  min-height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.64rem;
  font-weight: 900;
}

.timeline-toggle {
  min-height: 36px;
  padding: 0.45rem 0.7rem;
  font-size: 0.64rem;
}

.timeline {
  margin: 0;
  padding: 0 1.2rem 1.2rem;
  list-style: none;
}

.timeline > li {
  position: relative;
  display: grid;
  gap: 0.8rem;
  padding: 1.1rem 0 1.1rem 3.6rem;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr);
}

.timeline > li:last-child {
  border-bottom: 0;
}

.timeline time {
  position: absolute;
  top: 1.05rem;
  left: 0;
  display: grid;
  width: 40px;
  min-height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--mint);
  font-size: 0.68rem;
  font-weight: 900;
}

.timeline .event-shot time {
  background: var(--coral-soft);
}

.timeline .event-full_time time {
  background: var(--ink);
  color: var(--white);
}

.timeline strong {
  font-size: 0.78rem;
}

.timeline ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline ul li {
  padding: 0.22rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.59rem;
}

.next-actions {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: var(--gold);
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
}

.next-actions h2 {
  margin: 0;
}

.next-actions .eyebrow {
  margin-bottom: 0.2rem;
  color: var(--ink);
}

/* Standings and finance */
.table-card,
.ledger-card {
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}

.standings-table th,
.standings-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
  text-align: center;
}

.standings-table thead th {
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.standings-table tbody th {
  min-width: 190px;
  text-align: left;
}

.standings-table tbody th span {
  display: block;
  color: var(--ink-faint);
  font-size: 0.58rem;
  font-weight: 600;
}

.standings-table .own-row {
  background: var(--mint);
}

.explain-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.explain-card > span {
  display: grid;
  width: 28px;
  aspect-ratio: 1;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
}

.explain-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.finance-hero {
  position: relative;
  display: flex;
  min-height: 230px;
  align-items: end;
  justify-content: space-between;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--paper-light);
}

.finance-hero > div:first-child {
  position: relative;
  z-index: 1;
  display: grid;
}

.finance-hero span,
.finance-hero small {
  color: #adc4bd;
}

.finance-hero strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 7vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.finance-orbit {
  position: absolute;
  top: -42%;
  right: -3%;
  width: 360px;
  aspect-ratio: 1;
  border: 1px solid rgb(244 200 101 / 0.45);
  border-radius: 50%;
}

.finance-orbit::before {
  position: absolute;
  inset: 22%;
  border: 1px solid rgb(244 200 101 / 0.35);
  border-radius: 50%;
  content: "";
}

.finance-orbit span,
.finance-orbit i {
  position: absolute;
  width: 17px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
}

.finance-orbit span {
  bottom: 10%;
  left: 17%;
}

.finance-orbit i {
  right: 23%;
  bottom: 5%;
  background: var(--gold);
}

.ledger-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ledger-list li {
  display: grid;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.ledger-icon {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 11px;
  background: var(--mint);
}

.ledger-list li > div {
  display: grid;
}

.ledger-list li > div strong {
  font-size: 0.78rem;
}

.ledger-amount {
  color: #24624d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.ledger-empty,
.empty-state {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 5rem);
  text-align: center;
}

.ledger-empty p,
.empty-state p {
  max-width: 550px;
  color: var(--ink-soft);
}

.empty-state {
  min-height: 70vh;
}

.unavailable-page {
  align-content: start;
  justify-items: stretch;
  gap: 5rem;
}

.unavailable-card {
  width: min(100%, 660px);
  margin: auto;
  padding: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-light);
  box-shadow: var(--shadow);
  text-align: center;
}

.unavailable-card h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
}

.signal-off {
  display: grid;
  width: 58px;
  aspect-ratio: 1;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--error-bg);
  color: var(--error);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

/* Tablet */
@media (max-width: 1080px) {
  .access-layout {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.8fr);
  }

  .roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tactics-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .next-actions {
    grid-template-columns: 1fr 1fr;
  }

  .next-actions > div {
    grid-column: 1 / -1;
  }

  .replay-hero {
    display: grid;
  }
}

@media (max-width: 900px) {
  .access-layout {
    grid-template-columns: 1fr;
  }

  .access-story {
    min-height: 62vh;
  }

  .access-panel {
    min-height: auto;
    padding-block: 3rem;
  }

  .game-shell {
    display: block;
  }

  .side-rail {
    display: none;
  }

  .club-header {
    min-height: 70px;
  }

  .club-workspace {
    padding-bottom: 76px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    gap: 0.2rem;
    padding: 0.4rem max(0.4rem, env(safe-area-inset-right))
      calc(0.4rem + env(safe-area-inset-bottom))
      max(0.4rem, env(safe-area-inset-left));
    border-top: 1px solid #45665f;
    background: var(--ink);
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .mobile-nav .nav-item {
    display: grid;
    min-height: 54px;
    justify-items: center;
    gap: 0.2rem;
    padding: 0.3rem 0.15rem;
    font-size: 0.57rem;
    text-align: center;
  }

  .mobile-nav .nav-symbol {
    width: 24px;
    border-radius: 6px;
    font-size: 0.54rem;
  }

  .tactics-layout,
  .replay-layout {
    grid-template-columns: 1fr;
  }

  .tactic-board,
  .stats-card {
    position: static;
  }

  .pitch {
    min-height: 610px;
  }
}

/* Small screens, including required 320 CSS pixels */
@media (max-width: 680px) {
  h1 {
    letter-spacing: -0.045em;
  }

  .access-story {
    min-height: 560px;
    padding: 1.2rem;
  }

  .access-copy {
    padding: 3rem 0 2rem;
  }

  .access-copy h1 {
    font-size: clamp(3.1rem, 17vw, 5.2rem);
  }

  .journey-preview li {
    padding: 0.75rem 0.45rem;
  }

  .access-panel {
    padding: 2.5rem 1rem;
  }

  .selection-page {
    padding: 1rem;
  }

  .selection-header .brand-lockup .eyebrow {
    display: none;
  }

  .selection-header .button {
    min-height: 42px;
    padding-inline: 0.7rem;
  }

  .selection-intro {
    margin: 4rem 0 2rem;
  }

  .selection-intro h1 {
    font-size: clamp(3.1rem, 16vw, 5rem);
  }

  .world-grid,
  .onboarding-grid {
    grid-template-columns: 1fr;
  }

  .candidate-empty {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .candidate-empty .button {
    grid-column: 1 / -1;
  }

  .candidate-header {
    align-items: stretch;
    flex-direction: column;
  }

  .candidate-header-actions {
    justify-content: stretch;
  }

  .candidate-header-actions .button {
    flex: 1 1 150px;
  }

  .candidate-quick-accept {
    position: sticky;
    z-index: 12;
    top: 0.6rem;
  }

  .candidate-identity {
    grid-template-columns: 1fr;
  }

  .candidate-identity > div,
  .candidate-identity > div:last-child {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .candidate-identity > div:last-child {
    border-bottom: 1px solid var(--line);
  }

  .role-counts {
    grid-template-columns: 1fr 1fr;
  }

  .world-card {
    min-height: 330px;
  }

  .world-card h2 {
    font-size: 2.4rem;
  }

  .club-name-card {
    grid-template-columns: 1fr;
  }

  .club-name-card .button,
  .club-name-card .feedback {
    grid-column: auto;
  }

  .crest-builder {
    width: 90px;
  }

  .club-header {
    position: relative;
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
  }

  .identity-strip {
    display: grid;
    gap: 0.35rem;
    grid-template-columns: 1fr 1fr;
  }

  .identity-strip > div {
    padding: 0 0.65rem;
  }

  .identity-strip > div:first-child {
    padding-left: 0;
  }

  .identity-strip > div:nth-child(3) {
    padding: 0.45rem 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    grid-column: 1 / -1;
  }

  .identity-strip strong {
    max-width: 125px;
  }

  .identity-strip > div:nth-child(3) strong {
    max-width: none;
  }

  .balance-chip {
    position: absolute;
    top: 0.75rem;
    right: 0.8rem;
  }

  .workspace-main {
    padding: 1.15rem 0.85rem 2rem;
  }

  .section-heading {
    display: grid;
    gap: 1rem;
    margin-top: 0;
  }

  .section-heading h1,
  .replay-hero h1 {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  .section-heading .button,
  .section-heading .saved-state,
  .section-heading .world-capacity,
  .section-heading .authority-badge {
    justify-self: start;
  }

  .role-summary {
    overflow: hidden;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-summary div {
    border-top: 1px solid var(--line);
  }

  .role-summary div:nth-child(-n + 2) {
    border-top: 0;
  }

  .role-summary div:nth-child(odd) {
    border-left: 0;
  }

  .role-summary .lineup-count {
    grid-column: 1 / -1;
  }

  .roster-grid {
    grid-template-columns: 1fr;
  }

  .pitch {
    min-height: 650px;
    padding: 1rem 0.45rem;
  }

  .pitch-row {
    gap: 0.3rem;
  }

  .pitch-player {
    width: min(100%, 118px);
  }

  .pitch-player select {
    min-height: 42px;
    padding: 0.45rem 1.2rem 0.45rem 0.35rem;
    font-size: 0.58rem;
  }

  .tactic-board {
    padding: 1rem;
  }

  .tactic-controls {
    grid-template-columns: 1fr;
  }

  .tactic-control:first-child {
    grid-column: auto;
  }

  .opponent-grid {
    grid-template-columns: 1fr;
  }

  .opponent-card {
    min-height: 104px;
  }

  .match-confirm {
    grid-template-columns: 1fr auto 1fr;
  }

  .match-confirm .button {
    grid-column: 1 / -1;
  }

  .match-confirm strong {
    font-size: 1rem;
  }

  .match-queue,
  .match-result-teaser,
  .new-match-panel,
  .opponent-catalogue-status {
    align-items: stretch;
    flex-direction: column;
  }

  .match-result-teaser .button,
  .new-match-panel .button,
  .opponent-catalogue-status .button {
    width: 100%;
  }

  .replay-hero {
    gap: 1rem;
    margin-top: 0;
  }

  .scoreboard {
    min-width: 0;
    gap: 0.45rem;
    padding: 0.8rem;
  }

  .scoreboard strong {
    font-size: 0.7rem;
  }

  .scoreboard > span {
    gap: 0.35rem;
    font-size: 2rem;
  }

  .timeline {
    padding-inline: 0.85rem;
  }

  .timeline-card .card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-controls {
    justify-content: space-between;
  }

  .next-actions {
    grid-template-columns: 1fr;
  }

  .next-actions > div {
    grid-column: auto;
  }

  .next-actions .button {
    width: 100%;
  }

  .history-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .history-item .button {
    width: 100%;
    grid-column: 1 / -1;
  }

  .finance-hero {
    min-height: 215px;
  }

  .finance-hero strong {
    font-size: clamp(3rem, 16vw, 4.5rem);
  }

  .finance-orbit {
    right: -50%;
  }

  .ledger-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ledger-amount {
    grid-column: 2;
  }
}

@media (max-width: 360px) {
  .brand-lockup img {
    width: 40px;
    height: 40px;
  }

  .brand-lockup strong {
    font-size: 0.95rem;
  }

  .identity-strip > div {
    padding-inline: 0.4rem;
  }

  .balance-chip {
    padding: 0.45rem 0.55rem;
  }

  .mobile-nav {
    padding-inline: 0.2rem;
  }

  .mobile-nav .nav-item {
    font-size: 0.52rem;
  }

  .pitch-player {
    width: min(100%, 104px);
  }

  .pitch-player select {
    font-size: 0.54rem;
  }
}

/* Campetto Clubhouse ------------------------------------------------------
   Selected preview direction: bright, rounded, soft and game-like.
   This layer deliberately leaves product behavior and replay authority intact. */

:root {
  --paper: #f6f4ec;
  --paper-deep: #eaf4ef;
  --paper-light: #fffefb;
  --ink: #17233d;
  --ink-soft: #536077;
  --ink-faint: #758096;
  --coral: #ff7d68;
  --coral-soft: #ffe3dc;
  --gold: #ffc83d;
  --mint: #c7f0df;
  --line: #dde3ea;
  --white: #ffffff;
  --error: #a93f53;
  --error-bg: #ffe9ed;
  --success-bg: #e2f7ed;
  --blue: #246bfd;
  --blue-deep: #1855d6;
  --blue-soft: #dfe9ff;
  --aqua: #92e1dc;
  --shadow: 0 18px 46px rgb(35 55 90 / 0.12);
  --shadow-soft: 0 8px 24px rgb(35 55 90 / 0.08);
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 36px;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family:
    ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Avenir Next",
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

body {
  background: var(--paper);
}

h1[tabindex="-1"]:focus {
  outline: none;
}

.skip-link:focus:not(:focus-visible) {
  transform: translateY(-160%);
}

h1,
h2,
.brand-lockup strong,
.journey-preview strong,
.world-card h2,
.opponent-card strong,
.match-confirm strong,
.match-result-teaser > div strong,
.history-fixture > strong,
.history-result > strong,
.scoreboard > span,
.finance-hero strong,
.balance-chip strong,
.role-summary span,
.rating,
.ledger-amount,
.team strong,
.match-score,
.pitch-scorebar-core > strong,
.event-float-moment > #event-minute,
.event-timeline time,
.integrity-card summary {
  font-family: inherit;
}

h1 {
  font-size: clamp(2.7rem, 5.4vw, 5.6rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h2 {
  font-weight: 850;
  letter-spacing: -0.035em;
}

.eyebrow,
.chapter {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.chapter {
  display: inline-flex;
  width: fit-content;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.brand-lockup {
  gap: 0.72rem;
}

.brand-lockup img {
  width: 48px;
  height: 48px;
  border: 5px solid var(--mint);
  border-radius: 17px;
  box-shadow: 0 8px 20px rgb(36 107 253 / 0.12);
}

.brand-lockup .eyebrow {
  color: var(--ink-faint);
  font-size: 0.54rem;
}

.brand-lockup strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.button {
  min-height: 50px;
  padding: 0.8rem 1.2rem;
  border: 0;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.button:not(:disabled):hover {
  transform: translateY(-2px) scale(1.01);
}

.button-primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 10px 24px rgb(255 200 61 / 0.32);
}

.button-primary:not(:disabled):hover {
  background: #ffd255;
  box-shadow: 0 13px 28px rgb(255 200 61 / 0.4);
}

.button-secondary {
  border: 0;
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.button-secondary:not(:disabled):hover {
  background: #cddcff;
}

.button-ghost {
  border: 0;
  background: rgb(255 255 255 / 0.76);
  color: var(--ink-soft);
}

.button > span[aria-hidden="true"] {
  display: none;
}

.feedback {
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

input,
select {
  min-height: 52px;
  padding: 0.78rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 15px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 7px 18px rgb(35 55 90 / 0.06);
}

input:hover,
select:hover,
input:focus,
select:focus {
  border-color: var(--blue);
}

/* Access */
.access-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(460px, 0.88fr);
  gap: 0;
  padding: clamp(0.75rem, 1.5vw, 1.4rem);
  background: var(--paper);
}

.access-story {
  min-height: calc(100vh - clamp(1.5rem, 3vw, 2.8rem));
  padding: clamp(1.35rem, 3.2vw, 3rem);
  border-radius: 32px;
  background: #edf8f2;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.8);
}

.access-story .brand-lockup,
.access-story .brand-lockup strong {
  color: var(--ink);
}

.access-story .brand-lockup .eyebrow {
  color: var(--ink-faint);
}

.access-copy {
  z-index: 2;
  max-width: 720px;
  margin: auto 0;
  padding: 3.5rem 0 14rem;
}

.access-copy .chapter {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.access-copy h1 {
  max-width: 700px;
  margin-bottom: 1.25rem;
  color: var(--ink);
  font-size: clamp(3.25rem, 6vw, 6.6rem);
  font-weight: 950;
}

.access-copy h1 span {
  color: var(--blue);
}

.access-copy > p:last-child {
  max-width: 570px;
  color: var(--ink-soft);
  font-size: clamp(0.96rem, 1.3vw, 1.12rem);
  font-weight: 600;
}

.access-hero-art {
  position: absolute;
  z-index: 1;
  right: clamp(0.8rem, 3vw, 3rem);
  bottom: 6rem;
  width: min(54%, 520px);
  height: auto;
  border-radius: 34px;
  filter: drop-shadow(0 20px 22px rgb(35 55 90 / 0.12));
  mix-blend-mode: multiply;
}

.journey-preview {
  position: relative;
  z-index: 3;
  gap: 0.65rem;
}

.journey-preview li {
  gap: 0.1rem;
  padding: 0.72rem 0.88rem;
  border: 0;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.82);
  box-shadow: var(--shadow-soft);
}

.journey-preview span,
.journey-preview small {
  color: var(--ink-faint);
}

.journey-preview strong {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
}

.access-panel {
  min-height: calc(100vh - clamp(1.5rem, 3vw, 2.8rem));
  padding: clamp(1rem, 3vw, 2.5rem);
  background: transparent;
}

.access-panel-inner {
  width: min(100%, 520px);
  padding: clamp(1.35rem, 3vw, 2.4rem);
  border-radius: 32px;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.access-panel h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 900;
}

.auth-tabs {
  margin: 1.35rem 0;
  padding: 5px;
  border: 0;
  border-radius: 17px;
  background: #eef1f5;
}

.auth-tabs button {
  min-height: 44px;
  border-radius: 13px;
  font-weight: 900;
}

.auth-tabs button.is-active {
  background: var(--blue);
  box-shadow: 0 7px 18px rgb(36 107 253 / 0.25);
  color: #fff;
}

.form-stack {
  gap: 0.82rem;
}

.form-stack label > span,
.club-name-card label {
  font-weight: 900;
}

.privacy-note {
  margin-top: 1rem;
}

/* World and club creation */
.selection-page {
  padding: clamp(1rem, 3vw, 2.5rem);
}

.selection-header {
  padding: 0.7rem 0.85rem;
  border-radius: 22px;
  background: rgb(255 255 255 / 0.72);
  box-shadow: var(--shadow-soft);
}

.selection-intro {
  margin: clamp(3.5rem, 8vw, 7rem) 0 clamp(1.6rem, 4vw, 3rem);
}

.selection-intro h1 {
  max-width: 1050px;
  font-size: clamp(3rem, 6.5vw, 6.4rem);
  font-weight: 950;
}

.world-grid,
.onboarding-grid {
  gap: 1rem;
}

.world-card,
.candidate-card,
.candidate-empty,
.club-name-card,
.world-facts,
.fairness-card {
  border: 0;
  border-radius: 28px;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.world-card {
  min-height: 360px;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.world-orbit {
  border: 0;
  background: var(--mint);
}

.world-orbit::before {
  border-color: rgb(36 107 253 / 0.24);
}

.world-orbit span {
  color: var(--blue-deep);
  font-weight: 950;
}

.world-card h2 {
  color: var(--blue-deep);
  font-weight: 950;
}

.occupancy progress {
  accent-color: var(--blue);
}

.candidate-card,
.candidate-empty {
  margin-bottom: 1rem;
}

.candidate-header {
  padding: 1.35rem;
  border-bottom: 0;
}

.candidate-table-wrap {
  border-color: var(--line);
  background: #fff;
}

.candidate-table thead th,
.fairness-table thead th {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.candidate-table tbody tr:nth-child(even),
.fairness-table tbody tr:nth-child(even) {
  background: #f7faf9;
}

.fairness-card {
  margin: 1rem;
  background: #edf8f2;
  box-shadow: none;
}

.role-counts li {
  border: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.role-counts strong {
  color: var(--blue);
  font-family: inherit;
  font-weight: 950;
}

.candidate-audit {
  border-color: transparent;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.68);
}

.club-name-card,
.world-facts {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.crest-builder {
  border: 0;
  border-radius: 24px;
  background: var(--blue-soft);
}

.crest-builder span {
  background: var(--blue);
}

.crest-builder span:nth-child(2) {
  background: var(--coral);
}

.crest-builder span:nth-child(3) {
  background: var(--gold);
}

.world-facts {
  background: var(--mint);
}

.world-facts .eyebrow,
.world-facts h2,
.world-facts dt,
.world-facts dd,
.world-facts small {
  color: var(--ink);
}

.world-facts .eyebrow,
.world-facts dt,
.world-facts small {
  opacity: 0.72;
}

/* Main game shell */
.game-shell {
  grid-template-columns: 254px minmax(0, 1fr);
  gap: 0;
  background: var(--paper);
}

.side-rail {
  margin: 0.85rem 0 0.85rem 0.85rem;
  height: calc(100vh - 1.7rem);
  padding: 1.15rem;
  border-radius: 28px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.side-rail .brand-lockup {
  padding: 0.25rem 0.25rem 1.6rem;
}

.side-rail .brand-lockup .eyebrow {
  color: var(--ink-faint);
}

.primary-nav {
  gap: 0.42rem;
}

.nav-item {
  min-height: 52px;
  border-radius: 16px;
  color: var(--ink-soft);
  font-weight: 900;
}

.nav-item:hover:not(:disabled) {
  background: #f0f4fa;
}

.nav-item.is-active,
.nav-item.is-active:is(:hover, :focus-visible):not(:disabled) {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 9px 22px rgb(36 107 253 / 0.24);
}

.nav-item:disabled {
  color: #a5adbb;
}

.nav-symbol {
  width: 31px;
  border: 0;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-family: inherit;
}

.nav-item.is-active .nav-symbol {
  background: rgb(255 255 255 / 0.22);
  color: #fff;
}

.rail-footer {
  gap: 0.35rem;
}

.rail-link {
  border-radius: 12px;
  color: var(--ink-faint);
}

.rail-link:hover {
  background: #f0f4fa;
  color: var(--ink);
}

.rail-link kbd {
  border: 0;
  background: var(--blue-soft);
}

.rail-logout {
  border-top-color: var(--line);
}

.club-workspace {
  min-width: 0;
}

.club-header {
  top: 0.85rem;
  min-height: 74px;
  margin: 0.85rem 0.85rem 0;
  padding: 0.7rem 1.1rem;
  border: 0;
  border-radius: 24px;
  background: rgb(255 255 255 / 0.9);
  box-shadow: var(--shadow-soft);
}

.identity-strip > div {
  border-left: 0;
}

.identity-strip > div + div {
  position: relative;
}

.identity-strip > div + div::before {
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 0;
  width: 1px;
  background: var(--line);
  content: "";
}

.balance-chip {
  border: 0;
  border-radius: 15px;
  background: var(--mint);
  box-shadow: none;
}

.balance-chip strong {
  color: var(--blue-deep);
  font-weight: 950;
}

.workspace-main {
  width: min(100%, 1540px);
  padding: clamp(1.3rem, 3vw, 2.8rem);
}

.section-heading {
  align-items: center;
  margin: 0.6rem 0 clamp(1.4rem, 3vw, 2.5rem);
}

.section-heading h1,
.replay-hero h1 {
  max-width: 1000px;
  font-size: clamp(2.7rem, 5vw, 5.2rem);
  font-weight: 950;
}

.saved-state,
.world-capacity,
.authority-badge {
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.authority-badge {
  background: var(--mint);
  color: #22684e;
}

/* Squad */
.role-summary {
  gap: 0.7rem;
  margin-bottom: 1rem;
  border: 0;
  background: transparent;
}

.role-summary div {
  padding: 1rem 1.1rem;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.role-summary div:nth-child(2) {
  background: var(--blue-soft);
}

.role-summary div:nth-child(3) {
  background: var(--mint);
}

.role-summary div:nth-child(4) {
  background: var(--coral-soft);
}

.role-summary .lineup-count {
  background: var(--blue);
  color: #fff;
}

.role-summary span {
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 950;
}

.role-summary .lineup-count span,
.role-summary .lineup-count small {
  color: #fff;
}

.roster-grid {
  gap: 0.75rem;
}

.player-card {
  min-height: 104px;
  padding: 1rem;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-card.is-selected {
  border: 0;
  background: var(--mint);
}

.player-index {
  width: 38px;
  border: 0;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-family: inherit;
  font-weight: 950;
}

.player-heading h2 {
  font-weight: 900;
}

.starter-badge {
  border-radius: 9px;
  background: var(--blue);
}

.rating {
  color: var(--blue-deep);
  font-weight: 950;
}

progress.attribute-line {
  accent-color: var(--coral);
}

/* Tactics */
.tactics-layout {
  gap: 1rem;
}

.pitch-card,
.tactic-board,
.stats-card,
.timeline-card,
.table-card,
.ledger-card {
  border: 0;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.card-header {
  padding: 1.15rem 1.35rem;
  border-bottom: 0;
}

.card-header h2 {
  font-weight: 900;
}

.card-header > span {
  border-radius: 12px;
  background: var(--blue);
}

.pitch {
  min-height: 650px;
  margin: 0 1rem 1rem;
  border-radius: 24px;
  background: #bdebd5;
  box-shadow: inset 0 0 0 5px rgb(255 255 255 / 0.52);
}

.pitch-half,
.pitch-circle,
.pitch-box {
  border-color: rgb(23 35 61 / 0.24);
}

.pitch-goal {
  left: 50%;
  width: 18%;
  height: 18px;
  border: 2px solid rgb(23 35 61 / 0.3);
  background: rgb(255 255 255 / 0.28);
  transform: translateX(-50%);
}

.pitch-goal-top {
  top: 0;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.pitch-goal-bottom {
  bottom: 0;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.pitch-player > span {
  min-width: 34px;
  min-height: 29px;
  border-radius: 11px;
  background: var(--blue);
  box-shadow: 0 6px 12px rgb(36 107 253 / 0.2);
}

.pitch-player select {
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 7px 16px rgb(35 55 90 / 0.12);
}

.tactic-board {
  top: 104px;
  padding: 1.4rem;
}

.tactic-board h2 {
  color: var(--blue-deep);
  font-weight: 950;
}

.tactic-control span {
  color: var(--ink-soft);
  font-weight: 900;
}

/* Match */
.opponent-fieldset legend {
  color: var(--ink-soft);
  font-weight: 900;
}

.opponent-catalogue-status,
.match-queue,
.match-result-teaser,
.new-match-panel {
  border: 0;
  border-radius: 22px;
  background: var(--mint);
  box-shadow: var(--shadow-soft);
}

.opponent-grid {
  gap: 0.85rem;
}

.opponent-card {
  min-height: 126px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.opponent-card.is-selected {
  border: 0;
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 3px var(--blue), 0 14px 28px rgb(36 107 253 / 0.14);
}

.opponent-number {
  width: 46px;
  border-radius: 15px;
  background: var(--mint);
  color: var(--blue-deep);
  font-family: inherit;
  font-weight: 950;
}

.opponent-card strong {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 950;
}

.radio-mark {
  border: 2px solid #aeb9ca;
}

.opponent-card.is-selected .radio-mark {
  border: 6px solid var(--blue);
  background: var(--gold);
}

.match-confirm {
  border-radius: 28px;
  background: var(--blue);
  box-shadow: 0 16px 36px rgb(36 107 253 / 0.2);
}

.match-confirm span,
.match-confirm small {
  color: #dce7ff;
}

.match-confirm strong {
  font-weight: 950;
}

.match-confirm .versus {
  border: 0;
  background: rgb(255 255 255 / 0.16);
  color: var(--gold);
}

.match-confirm .button {
  background: var(--gold);
  color: var(--ink);
}

.queue-pulse {
  border-color: #fff;
  background: var(--coral);
}

/* Replay */
.viewer-shell {
  border: 0;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.score-ribbon {
  border-bottom: 0;
  background: var(--blue-soft);
}

.team strong,
.match-score {
  font-weight: 950;
}

.team-swatch {
  border: 0;
  border-radius: 8px;
}

.canvas-frame {
  border: 5px solid #17233d;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgb(35 55 90 / 0.16);
}

.pitch-scorebar {
  border: 0;
  border-radius: 12px 12px 18px 18px;
  background: rgb(23 35 61 / 0.94);
  box-shadow: 0 5px 0 var(--gold);
}

.pitch-scorebar-core > strong {
  color: var(--gold);
  font-weight: 950;
}

.event-float {
  border: 0;
  border-radius: 16px;
  background: rgb(23 35 61 / 0.92);
}

.event-float-moment > #event-minute {
  color: var(--gold);
  font-weight: 950;
}

.authority-strip {
  gap: 0.55rem;
  border: 0;
  background: transparent;
}

.authority-strip > div {
  border: 0;
  border-radius: 15px;
  background: var(--paper);
}

.playback-panel button {
  border: 0;
  border-radius: 13px;
  background: #eef2f7;
}

.playback-panel .play-button {
  background: var(--blue);
}

.speed-controls button[aria-pressed="true"] {
  border: 0;
  background: var(--gold);
}

.evidence-column {
  background: #f5f7fb;
}

.evidence-card,
.timeline-grid,
.timeline-card {
  border-color: var(--line);
}

.event-timeline button {
  border: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.event-timeline button[aria-current="true"] {
  border: 0;
  background: var(--mint);
  box-shadow: inset 0 0 0 2px var(--blue);
}

.event-timeline time {
  color: var(--blue);
  font-weight: 950;
}

.integrity-card {
  background: var(--blue);
}

.integrity-card summary {
  font-weight: 900;
}

.integrity-card summary small {
  color: var(--gold);
}

.next-actions {
  border-radius: 24px;
  background: var(--gold);
  box-shadow: var(--shadow-soft);
}

/* History, standings and finance */
.history-list {
  gap: 0.85rem;
}

.history-item {
  padding: 1.15rem 1.25rem;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.history-fixture > strong {
  color: var(--ink);
  font-weight: 900;
}

.history-fixture i {
  color: var(--blue);
  font-weight: 900;
}

.history-result {
  min-width: 84px;
  padding: 0.55rem 0.8rem;
  border-radius: 16px;
  background: var(--mint);
}

.history-result > strong {
  color: var(--blue-deep);
  font-weight: 950;
}

.table-card,
.ledger-card {
  box-shadow: var(--shadow);
}

.standings-table th,
.standings-table td {
  padding: 1rem;
  border-bottom-color: #edf0f4;
}

.standings-table thead th {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.standings-table .own-row {
  background: var(--mint);
}

.explain-card {
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.explain-card > span {
  background: var(--blue);
  font-family: inherit;
  font-weight: 950;
}

.finance-hero {
  min-height: 245px;
  border-radius: 34px;
  background: var(--blue);
  box-shadow: 0 18px 42px rgb(36 107 253 / 0.22);
}

.finance-hero span,
.finance-hero small {
  color: #dfe8ff;
}

.finance-hero strong {
  color: #fff;
  font-weight: 950;
}

.finance-orbit {
  border: 30px solid rgb(255 255 255 / 0.12);
}

.finance-orbit::before {
  border: 20px solid rgb(255 200 61 / 0.3);
}

.finance-orbit span {
  background: var(--coral);
}

.finance-orbit i {
  background: var(--gold);
}

.ledger-list li {
  border-bottom-color: #edf0f4;
}

.ledger-icon {
  border-radius: 13px;
  background: var(--mint);
  color: var(--blue-deep);
}

.ledger-amount {
  color: var(--blue-deep);
  font-weight: 950;
}

.ledger-empty,
.empty-state {
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.boot-shell,
.unavailable-page {
  background: var(--paper);
}

.unavailable-card {
  border: 0;
  border-radius: 34px;
}

@media (max-width: 1080px) {
  .access-layout {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.85fr);
  }

  .access-copy {
    padding-bottom: 12rem;
  }

  .access-hero-art {
    width: min(58%, 430px);
  }
}

@media (max-width: 900px) {
  .access-layout {
    grid-template-columns: 1fr;
  }

  .access-story {
    min-height: 660px;
  }

  .access-panel {
    min-height: auto;
  }

  .game-shell {
    display: block;
  }

  .club-header {
    top: 0.5rem;
    margin: 0.5rem;
  }

  .mobile-nav {
    border-top: 0;
    background: rgb(255 255 255 / 0.95);
    box-shadow: 0 -8px 28px rgb(35 55 90 / 0.12);
  }

  .mobile-nav .nav-item {
    color: var(--ink-soft);
  }

  .mobile-nav .nav-item.is-active {
    background: var(--blue);
    color: #fff;
  }

  .mobile-nav .nav-symbol {
    background: var(--blue-soft);
  }

  .mobile-nav .nav-item.is-active .nav-symbol {
    background: rgb(255 255 255 / 0.22);
  }
}

@media (max-width: 680px) {
  .access-layout {
    padding: 0.55rem;
  }

  .access-story {
    min-height: 640px;
    padding: 1.1rem;
    border-radius: 26px;
  }

  .access-copy {
    padding: 3rem 0 13rem;
  }

  .access-copy h1 {
    font-size: clamp(3rem, 15vw, 4.9rem);
  }

  .access-hero-art {
    right: 0.6rem;
    bottom: 6.2rem;
    width: min(72%, 390px);
  }

  .journey-preview {
    gap: 0.35rem;
  }

  .journey-preview li {
    padding: 0.58rem 0.48rem;
    border-radius: 14px;
  }

  .journey-preview strong {
    font-size: 0.72rem;
  }

  .journey-preview small {
    font-size: 0.55rem;
  }

  .access-panel {
    padding: 1.2rem 0.3rem 1.8rem;
  }

  .access-panel-inner {
    padding: 1.25rem;
    border-radius: 26px;
  }

  .selection-header {
    padding: 0.55rem;
  }

  .selection-intro h1,
  .section-heading h1,
  .replay-hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .club-header {
    border-radius: 20px;
  }

  .identity-strip > div + div::before {
    display: none;
  }

  .identity-strip > div:nth-child(3) {
    border-top-color: var(--line);
  }

  .workspace-main {
    padding: 1.15rem 0.85rem 2rem;
  }

  .role-summary {
    gap: 0.5rem;
    background: transparent;
  }

  .role-summary div {
    border: 0;
  }

  .pitch {
    margin: 0 0.6rem 0.6rem;
    border-radius: 19px;
  }

  .match-confirm {
    border-radius: 24px;
  }

  .history-item {
    border-radius: 20px;
  }

  .finance-hero {
    border-radius: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .button,
  .nav-item,
  .player-card,
  .world-card,
  .pitch-player > span,
  .feedback,
  .opponent-card {
    border: 1px solid ButtonText;
  }

  .opponent-card input {
    position: static;
    width: 20px;
    height: 20px;
    opacity: 1;
  }

  .radio-mark {
    display: none;
  }
}
