:root {
  --ink: #152a30;
  --paper: #f3f1e8;
  --white: #fffdf6;
  --muted: #647175;
  --line: #d7dcd4;
  --accent: #dc5b40;
  --soft: #f3d4bf;
  --teal: #207469;
  --blue: #cedde0;
  --yellow: #e9bd57;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
p {
  line-height: 1.6;
}
a {
  color: inherit;
}
.topbar {
  max-width: 1480px;
  margin: auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  letter-spacing: -1px;
  font-weight: 900;
}
.brand b {
  font-weight: 400;
}
.brand small {
  display: block;
  font-family: monospace;
  font-size: 8px;
  letter-spacing: 1.2px;
  margin-top: 5px;
}
.brand-mark {
  width: 43px;
  height: 46px;
  background: var(--ink);
  color: var(--paper);
  font-size: 37px;
  line-height: 46px;
  text-align: center;
  font-style: italic;
  position: relative;
}
.brand-mark span {
  position: absolute;
  right: -5px;
  top: -9px;
  font-size: 24px;
  color: var(--accent);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.connection {
  font-family: monospace;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.connection:before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}
.connection.offline:before {
  background: var(--accent);
}
button {
  border: 0;
}
.button,
.button-quiet,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 19px;
  gap: 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button {
  background: var(--ink);
  color: var(--white);
}
.button:hover:not(:disabled) {
  background: #2b454b;
  transform: translateY(-1px);
}
.button.accent {
  background: var(--accent);
  color: white;
}
.button.accent:hover {
  background: #bf4b33;
}
.button-secondary {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.button-secondary:hover {
  border-color: var(--ink);
}
.button-quiet {
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
}
.button-quiet:hover {
  border-color: var(--line);
}
main {
  max-width: 1480px;
  padding: 32px 40px 40px;
  margin: auto;
  min-height: calc(100vh - 175px);
}
.eyebrow {
  font: 700 11px monospace;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}
.lobby {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
  padding-top: 20px;
}
.lobby h1 {
  font-size: clamp(40px, 4.8vw, 70px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -3px;
  max-width: 660px;
}
.lobby h1 em {
  font-style: normal;
  color: var(--accent);
}
.lobby .intro {
  max-width: 480px;
  font-size: 15px;
  color: var(--muted);
  margin-top: 20px;
}
.preview {
  margin-top: 30px;
  position: relative;
  background: var(--ink);
  height: 300px;
  overflow: hidden;
  border-radius: 3px;
}
.preview:before {
  content: "";
  position: absolute;
  inset: 25px;
  border: 1px solid #ffffff26;
  transform: skewX(-10deg);
}
.preview-word {
  position: absolute;
  left: 24px;
  top: 22px;
  color: #ffffffb0;
  letter-spacing: 4px;
  font: 11px monospace;
}
.preview-fighters {
  position: absolute;
  display: flex;
  bottom: -35px;
  left: 4%;
  right: 4%;
  align-items: end;
  justify-content: center;
  gap: 0;
}
.preview-fighters .portrait {
  width: 38%;
  height: 285px;
  filter: drop-shadow(0 10px 12px #0004);
}
.preview-fighters .portrait:nth-child(2) {
  width: 43%;
  height: 320px;
  z-index: 1;
}
.preview-ribbon {
  position: absolute;
  bottom: 20px;
  left: 22px;
  background: var(--yellow);
  padding: 8px 12px;
  transform: rotate(-3deg);
  font: bold 12px monospace;
  z-index: 2;
}
.start-panel {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  margin-top: 9px;
  box-shadow: 5px 5px 0 #d8ddd7;
}
.start-panel h2 {
  font-size: 26px;
  letter-spacing: -1px;
}
.start-panel > p {
  color: var(--muted);
  font-size: 14px;
  margin: 9px 0 22px;
}
.start-panel .button,
.start-panel .button-secondary {
  width: 100%;
}
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 11px monospace;
  color: var(--muted);
  margin: 22px 0;
}
.or:before,
.or:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.join-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.join-row {
  display: flex;
  gap: 8px;
}
.join-row input {
  min-width: 0;
  flex: 1;
  width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 48px;
  padding: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font: 700 18px monospace;
}
.join-row .button {
  width: auto;
  padding: 12px 16px;
  font-size: 12px;
}
.solo {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.solo small {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin-top: 10px;
}
.brief {
  display: flex;
  gap: 24px;
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted);
}
.brief strong {
  color: var(--ink);
  display: block;
}
.match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.match-head h1 {
  font-size: 30px;
  letter-spacing: -1px;
}
.room-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 11px monospace;
}
.room-tag b {
  font-size: 14px;
  letter-spacing: 2px;
}
.steps {
  display: flex;
  gap: 3px;
  align-items: center;
  max-width: 460px;
}
.step {
  height: 4px;
  width: 70px;
  background: var(--line);
}
.step.active {
  background: var(--accent);
}
.stage-label {
  font: 11px monospace;
  margin-left: 9px;
  white-space: nowrap;
  color: var(--muted);
}
.arena-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.arena-main {
  min-width: 0;
}
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
.section-title h2 {
  font-size: 25px;
  letter-spacing: -0.8px;
}
.section-title .small {
  font: 11px monospace;
}
.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 20px;
}
.draft-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.fighter-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.fighter-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 0 #d8ddd7;
}
.card-visual {
  position: relative;
  height: 205px;
  overflow: hidden;
  background: #e5cdb5;
}
.fighter-card.eclipse .card-visual {
  background: #c0d3d4;
}
.card-visual:before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid #ffffff70;
  transform: rotate(6deg);
}
.card-number {
  position: absolute;
  right: 10px;
  top: 10px;
  font: 11px monospace;
  color: #152a3080;
}
.card-visual .portrait {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  transform: scale(1.1);
  transform-origin: 50% 60%;
}
.faction-chip {
  position: absolute;
  left: 12px;
  bottom: 10px;
  background: var(--ink);
  color: var(--white);
  font: 9px monospace;
  letter-spacing: 1px;
  padding: 5px 7px;
  z-index: 2;
}
.fighter-body {
  padding: 15px;
}
.fighter-name {
  font-size: 25px;
  letter-spacing: -0.8px;
}
.fighter-role {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin: 17px 0;
}
.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  gap: 8px;
}
.stat b {
  font-size: 13px;
  font-family: monospace;
}
.stat i {
  height: 3px;
  background: var(--line);
  display: block;
  width: 100%;
  max-width: 30px;
}
.stat i span {
  display: block;
  background: var(--teal);
  height: 100%;
}
.fighter-body .button {
  width: 100%;
  padding: 11px 8px;
  font-size: 12px;
}
.side-panel {
  background: var(--ink);
  color: var(--white);
  padding: 25px;
  border-radius: 4px;
}
.side-panel h3 {
  font-size: 22px;
  line-height: 1.25;
  margin: 11px 0;
}
.side-panel p {
  font-size: 12px;
  color: #c5d2d0;
}
.side-panel .eyebrow {
  color: var(--yellow);
}
.side-divider {
  height: 1px;
  background: #ffffff25;
  margin: 24px 0;
}
.check-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin: 16px 0;
}
.check-row b {
  font: 11px monospace;
  color: var(--yellow);
}
.cycle {
  margin: 18px 0;
  font: 12px monospace;
  color: #d6e2dd;
  line-height: 2;
}
.mini-label {
  font: 10px monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.squad {
  margin-top: 30px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.team-slot {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 7px;
  min-width: 0;
  text-align: center;
}
.team-slot.bench {
  background: transparent;
  border: 1px dashed #9aa8a5;
}
.slot-label {
  font: 9px monospace;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.team-slot .portrait {
  height: 80px;
  width: 100%;
  margin: 8px 0 0;
}
.team-slot .name {
  font-weight: 700;
  font-size: 13px;
}
.team-slot .role {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.attributes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  font: 9px monospace;
  color: var(--muted);
  margin-top: 9px;
}
.attributes strong {
  color: var(--ink);
}
.team-slot .fatigue {
  font: 10px monospace;
  margin-top: 9px;
}
.fatigue-meter {
  display: flex;
  gap: 2px;
  margin-top: 5px;
}
.fatigue-meter i {
  flex: 1;
  height: 3px;
  background: var(--line);
}
.fatigue-meter i.on {
  background: var(--accent);
}
.empty-slot {
  height: 125px;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #c3ccc5;
}
.team-summary {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  padding: 13px 0;
}
.team-summary strong {
  color: var(--ink);
}
.opponent {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.opponent summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  min-height: 44px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.opponent summary:after {
  content: "Voir l’équipe +";
  font: 10px monospace;
  color: var(--muted);
}
.opponent[open] summary:after {
  content: "Réduire −";
}
.waiting {
  max-width: 900px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  border: 1px solid var(--line);
}
.waiting-art {
  background: var(--ink);
  position: relative;
  padding: 35px;
  overflow: hidden;
  min-height: 420px;
  color: var(--white);
}
.waiting-art h2 {
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}
.waiting-art .portrait {
  height: 330px;
  width: 100%;
  position: absolute;
  bottom: -40px;
  right: -40px;
}
.waiting-info {
  padding: 35px;
}
.waiting-info h1 {
  font-size: 26px;
}
.invite-code {
  font: 700 44px monospace;
  letter-spacing: 8px;
  border-block: 1px solid var(--line);
  padding: 20px 0;
  margin: 25px 0 18px;
}
.waiting-info .button {
  width: 100%;
}
.waiting-info .small {
  margin: 18px 0;
}
.small {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.status-banner {
  padding: 13px 17px;
  margin: 0 0 20px;
  font-size: 12px;
  background: #f3d4bf;
  border: 1px solid #e4b193;
  border-radius: 3px;
  line-height: 1.6;
}
.scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block: 1px solid var(--line);
  padding: 17px 0;
  margin-bottom: 24px;
}
.scoreboard .coach-name {
  font: 11px monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}
.online-dot {
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 50%;
  display: inline-block;
}
.score {
  font:
    900 38px "Arial Black",
    Arial,
    sans-serif;
  letter-spacing: -2px;
}
.score span {
  color: #a6afaa;
  margin: 0 15px;
  font-weight: 400;
}
.scoreboard .right {
  text-align: right;
}
.tactic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tactic {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 20px 17px;
  border-radius: 4px;
  text-align: left;
  color: var(--ink);
  min-height: 195px;
  display: flex;
  flex-direction: column;
  transition:
    border 0.15s,
    transform 0.15s;
}
.tactic:hover:not(:disabled) {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.tactic .tactic-symbol {
  font: 28px monospace;
  color: var(--accent);
  margin-bottom: 16px;
}
.tactic strong {
  font-size: 22px;
  letter-spacing: -0.6px;
}
.tactic p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.tactic .beats {
  font: 10px monospace;
  color: var(--teal);
  margin-top: 17px;
}
.lock-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px;
  background: var(--blue);
  border: 1px solid #a6c1c3;
  margin-bottom: 18px;
  border-radius: 4px;
  font-size: 13px;
}
.lock-state .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #99b4b6;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.coaching-tools {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 4px;
  padding: 16px;
  margin-top: 12px;
}
.tool-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tool-row + .tool-row {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
.tool-row label {
  font-size: 11px;
  color: var(--muted);
}
select {
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 8px;
  color: var(--ink);
  border-radius: 3px;
  font-size: 11px;
}
.tool-row .button-secondary {
  font-size: 11px;
  padding: 10px 12px;
  min-height: 44px;
}
.history {
  margin-top: 30px;
}
.history h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.phase-receipt {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 4px;
  margin-bottom: 12px;
  overflow: hidden;
  animation: arrive 0.25s ease-out;
}
.receipt-head {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.receipt-head strong {
  font-size: 13px;
}
.receipt-head b {
  font: 700 13px monospace;
}
.receipt-head em {
  font: 10px monospace;
  font-style: normal;
  color: var(--muted);
}
.receipt-body {
  padding: 16px;
}
.reveal-plans {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 12px;
}
.reveal-plans span {
  font-weight: 700;
}
.receipt-body p {
  font-size: 12px;
  color: var(--muted);
}
.receipt-body details {
  margin-top: 14px;
}
.receipt-body summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font: 11px monospace;
  color: var(--teal);
}
.breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  table-layout: fixed;
}
.breakdown td,
.breakdown th {
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}
.result-panel {
  padding: 28px;
  background: var(--ink);
  color: var(--white);
  margin-bottom: 24px;
  position: relative;
  border-radius: 4px;
}
.result-panel .eyebrow {
  color: var(--yellow);
}
.result-panel h2 {
  font-size: 44px;
  letter-spacing: -2px;
}
.result-panel p {
  font-size: 13px;
  color: #c5d2d0;
  margin: 12px 0 20px;
}
.result-panel .button {
  background: var(--accent);
  color: white;
}
.result-panel .button-secondary {
  margin-left: 8px;
  background: transparent;
  color: white;
  border-color: #ffffff50;
}
.ended {
  max-width: 650px;
  margin: 60px auto;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 40px;
}
.ended h1 {
  font-size: 32px;
  margin-bottom: 20px;
}
.ended .button {
  margin-top: 24px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  background: var(--ink);
  color: white;
  box-shadow: 0 3px 15px #0002;
  font-size: 13px;
  padding: 15px 22px;
  border-radius: 5px;
  z-index: 20;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1480px;
  margin: auto;
  padding: 22px 40px;
  border-top: 1px solid var(--line);
  font: 9px monospace;
  color: var(--muted);
  letter-spacing: 0.6px;
}
dialog {
  width: min(680px, calc(100% - 24px));
  max-height: 85vh;
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 28px;
}
dialog::backdrop {
  background: #152a30aa;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.dialog-head h2 {
  font-size: 27px;
}
.rules-list {
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
}
.rules-list li {
  margin: 15px 0;
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes arrive {
  from {
    opacity: 0.5;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1500px) {
  main {
    padding-top: 45px;
  }
  .card-visual {
    height: 240px;
  }
}
@media (max-width: 1100px) {
  .arena-layout {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 18px;
  }
  .card-visual {
    height: 170px;
  }
  .fighter-body {
    padding: 12px;
  }
  .lobby {
    gap: 35px;
  }
  .side-panel {
    padding: 20px;
  }
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .team-slot .portrait {
    height: 85px;
  }
  .team-slot {
    padding: 9px;
  }
  .tactic {
    padding: 17px 12px;
  }
  .stat i {
    display: none;
  }
  .team-slot .slot-label {
    font-size: 10px;
  }
  .topbar {
    padding: 22px 28px;
  }
  main {
    padding: 28px;
  }
}
@media (max-width: 800px) {
  .arena-layout {
    grid-template-columns: 1fr;
  }
  .side-panel {
    display: none;
  }
  .lobby {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 600px;
    margin: auto;
    padding-top: 0;
  }
  .lobby h1 {
    font-size: 55px;
  }
  .preview {
    display: none;
  }
  .brief {
    margin-top: 18px;
  }
  .start-panel {
    margin-top: 0;
  }
  .lobby .intro {
    max-width: 100%;
  }
  .match-head h1 {
    font-size: 25px;
  }
  .steps {
    max-width: 220px;
  }
  .step {
    width: 30px;
  }
  .waiting {
    grid-template-columns: 1fr;
  }
  .waiting-art {
    min-height: 220px;
  }
  .waiting-art .portrait {
    height: 260px;
    width: 60%;
    right: 0;
  }
  .waiting-art h2 {
    font-size: 35px;
    max-width: 210px;
  }
  .team-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .team-slot .portrait {
    height: 65px;
  }
  .team-slot .role {
    display: none;
  }
  .match-head .room-tag {
    display: none;
  }
  .header-right {
    gap: 5px;
  }
  .brand small {
    display: none;
  }
  .brand {
    font-size: 21px;
  }
  .brand-mark {
    height: 38px;
    width: 37px;
    line-height: 38px;
    font-size: 31px;
  }
  .topbar {
    padding: 16px 20px;
  }
  .connection {
    font-size: 9px;
  }
  .button-quiet {
    padding: 10px;
  }
  .card-visual {
    height: 210px;
  }
  .scoreboard {
    margin-bottom: 20px;
  }
}
@media (max-width: 520px) {
  main {
    padding: 22px 16px 30px;
    min-height: calc(100vh - 160px);
  }
  .topbar {
    padding: 14px 16px;
    gap: 8px;
  }
  .brand {
    font-size: 18px;
    gap: 8px;
  }
  .brand-mark {
    width: 31px;
    height: 33px;
    line-height: 33px;
    font-size: 27px;
  }
  .brand-mark span {
    font-size: 18px;
  }
  .header-right .button-quiet {
    font-size: 11px;
    padding: 8px;
    min-height: 44px;
  }
  .connection {
    font-size: 0;
    gap: 0;
  }
  .connection:before {
    width: 7px;
    height: 7px;
    margin-right: 8px;
  }
  .lobby h1 {
    font-size: 44px;
    letter-spacing: -2px;
  }
  .lobby .intro {
    font-size: 13px;
    margin-top: 14px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
  }
  .brief {
    gap: 20px;
    font-size: 10px;
  }
  .start-panel {
    padding: 22px 18px;
    box-shadow: 3px 3px 0 #d8ddd7;
  }
  .start-panel h2 {
    font-size: 24px;
  }
  .join-row {
    flex-direction: column;
  }
  .join-row input {
    width: 100%;
    flex: auto;
  }
  .join-row .button {
    width: 100%;
    font-size: 13px;
  }
  .match-head {
    margin-bottom: 20px;
  }
  .match-head h1 {
    font-size: 24px;
  }
  .steps {
    gap: 2px;
  }
  .step {
    width: 13px;
  }
  .stage-label {
    font-size: 9px;
    margin-left: 5px;
  }
  .section-title {
    align-items: start;
  }
  .section-title h2 {
    font-size: 23px;
    max-width: 230px;
  }
  .section-title .small {
    font-size: 9px;
  }
  .subtitle {
    font-size: 11px;
    line-height: 1.6;
    margin: 8px 0 16px;
  }
  .draft-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .card-visual {
    height: 135px;
  }
  .card-visual .portrait {
    transform: scale(1.38);
    transform-origin: 50% 20%;
  }
  .card-visual:before {
    inset: 10px;
  }
  .card-number {
    display: none;
  }
  .fighter-body {
    padding: 10px 7px;
  }
  .fighter-name {
    font-size: 21px;
  }
  .fighter-role {
    font-size: 9px;
    min-height: 23px;
    line-height: 1.3;
  }
  .faction-chip {
    left: 5px;
    bottom: 5px;
    padding: 4px;
    font-size: 7px;
    letter-spacing: 0.4px;
  }
  .stat-grid {
    grid-template-columns: 1fr;
    margin: 10px 0;
    gap: 6px;
  }
  .stat {
    font-size: 9px;
  }
  .stat b {
    font-size: 12px;
  }
  .fighter-body .button {
    font-size: 10px;
    padding: 10px 3px;
    min-height: 44px;
  }
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .team-slot .portrait {
    height: 68px;
  }
  .team-slot .role {
    display: block;
    font-size: 9px;
  }
  .team-slot .name {
    font-size: 13px;
  }
  .team-slot .fatigue {
    font-size: 9px;
  }
  .team-slot {
    padding: 9px 6px;
  }
  .team-slot .slot-label {
    font-size: 8px;
  }
  .empty-slot {
    height: 92px;
  }
  .squad {
    margin-top: 25px;
  }
  .section-title h3 {
    font-size: 17px;
  }
  .team-summary {
    font-size: 10px;
  }
  .score {
    font-size: 32px;
  }
  .score span {
    margin: 0 12px;
  }
  .scoreboard .coach-name {
    font-size: 9px;
  }
  .scoreboard {
    padding: 13px 0;
  }
  .scoreboard .small {
    font-size: 9px;
  }
  .tactic-grid {
    gap: 7px;
  }
  .tactic {
    padding: 12px 8px;
    min-height: 190px;
  }
  .tactic .tactic-symbol {
    font-size: 23px;
    margin-bottom: 12px;
  }
  .tactic strong {
    font-size: 18px;
  }
  .tactic p {
    font-size: 10px;
    line-height: 1.5;
  }
  .tactic .beats {
    font-size: 8px;
    line-height: 1.6;
    margin-top: auto;
    padding-top: 10px;
  }
  .coaching-tools {
    padding: 12px;
  }
  .tool-row {
    gap: 6px;
  }
  .tool-row label {
    width: 100%;
    font-size: 10px;
  }
  select {
    font-size: 10px;
    flex: 1;
    min-width: 0;
    padding: 7px 4px;
  }
  .tool-row .button-secondary {
    font-size: 10px;
    padding: 8px;
    flex: 1;
  }
  .lock-state {
    font-size: 11px;
  }
  .result-panel {
    padding: 23px;
  }
  .result-panel h2 {
    font-size: 36px;
  }
  .result-panel .button-secondary {
    margin: 10px 0 0;
  }
  .receipt-head {
    padding: 12px;
  }
  .receipt-head strong {
    font-size: 11px;
  }
  .receipt-head em {
    font-size: 8px;
  }
  .receipt-head b {
    font-size: 11px;
  }
  .receipt-body {
    padding: 12px;
  }
  .receipt-body p {
    font-size: 11px;
  }
  .reveal-plans {
    font-size: 12px;
  }
  .waiting {
    margin: 10px 0;
  }
  .waiting-art {
    padding: 25px;
    min-height: 190px;
  }
  .waiting-art h2 {
    font-size: 30px;
    max-width: 180px;
  }
  .waiting-info {
    padding: 25px;
  }
  .waiting-info h1 {
    font-size: 24px;
  }
  .invite-code {
    font-size: 38px;
    letter-spacing: 6px;
  }
  .ended {
    margin: 20px 0;
    padding: 25px;
  }
  .ended h1 {
    font-size: 27px;
  }
  footer {
    padding: 18px 16px;
    flex-direction: column;
    gap: 8px;
    font-size: 8px;
  }
  dialog {
    padding: 20px;
  }
  .dialog-head h2 {
    font-size: 22px;
  }
  .dialog-head {
    gap: 8px;
  }
  .rules-list {
    font-size: 12px;
  }
  .status-banner {
    padding: 12px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
