:root {
  color-scheme: light;
  --page: #f3f5ef;
  --paper: #ffffff;
  --paper-soft: #f8faf6;
  --ink: #17241d;
  --muted: #68736c;
  --line: #dfe5dd;
  --forest: #163d2e;
  --forest-2: #205b43;
  --lime: #dff7a6;
  --lime-strong: #c9ec78;
  --gold: #d8a93f;
  --silver: #8f9c96;
  --bronze: #a96f45;
  --danger: #a83b35;
  --danger-soft: #fff3f1;
  --shadow: 0 18px 50px rgba(27, 54, 40, 0.08);
  --shadow-small: 0 8px 24px rgba(27, 54, 40, 0.07);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(207, 234, 156, 0.3), transparent 24rem),
    var(--page);
  color: var(--ink);
  font: 16px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(32, 91, 67, 0.28);
  outline-offset: 3px;
}

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

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.35rem, 5.4vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--forest-2);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.eyebrow {
  margin-bottom: 0.5rem;
  color: var(--forest-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.surface {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(214, 223, 214, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-small);
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  padding: 0.65rem 1rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  background: var(--forest);
  color: #fff;
}

.button-primary:hover {
  background: var(--forest-2);
}

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

.button-secondary:hover {
  border-color: #b8c5bb;
  background: var(--paper-soft);
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--forest-2);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* En-tête et navigation */

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid rgba(213, 222, 214, 0.75);
  background: rgba(247, 249, 244, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  max-width: 74rem;
  min-height: 4.8rem;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.8rem;
  background: var(--forest);
  color: var(--lime);
  font-size: 1.55rem;
  box-shadow: 0 7px 18px rgba(22, 61, 46, 0.2);
}

.brand > span:last-child {
  display: grid;
  line-height: 1.05;
}

.brand strong {
  font-size: 0.9rem;
  letter-spacing: -0.015em;
}

.brand small {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.desktop-nav a {
  border-radius: 999px;
  padding: 0.48rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  background: var(--forest);
  color: #fff;
}

.profile-chip {
  position: relative;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 2.8rem;
  justify-self: end;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem 0.3rem 0.32rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(27, 54, 40, 0.04);
}

.mini-avatar {
  display: grid;
  width: 2.05rem;
  height: 2.05rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--forest);
  font-size: 0.78rem;
  font-weight: 850;
}

.mobile-nav {
  display: none;
}

main {
  display: grid;
  max-width: 74rem;
  margin: 0 auto;
  padding: 2.6rem 1.5rem 5rem;
  gap: 1.5rem;
}

.site-footer {
  display: flex;
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer div {
  color: var(--ink);
  font-weight: 750;
}

.site-footer p {
  margin-bottom: 0;
}

/* Messages */

.flash-stack {
  position: relative;
  z-index: 30;
  display: grid;
  max-width: 74rem;
  margin: 1rem auto -1.2rem;
  padding: 0 1.5rem;
  gap: 0.5rem;
}

.flash {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  border: 1px solid #b9dac7;
  border-radius: 0.9rem;
  padding: 0.72rem 1rem;
  background: #effaf2;
  color: #185c38;
  font-size: 0.88rem;
  font-weight: 650;
  box-shadow: var(--shadow-small);
}

.flash-error {
  border-color: #e8bab5;
  background: var(--danger-soft);
  color: var(--danger);
}

/* Première visite */

.identity-gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 1.25rem;
  background: rgba(12, 32, 24, 0.76);
  backdrop-filter: blur(14px);
}

.identity-dialog {
  width: min(100%, 34rem);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 2rem;
  padding: clamp(1.5rem, 5vw, 2.6rem);
  background: var(--paper);
  box-shadow: 0 34px 90px rgba(4, 22, 14, 0.32);
}

.identity-piece {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.4rem;
  place-items: center;
  border-radius: 1rem;
  background: var(--forest);
  color: var(--lime);
  font-size: 2rem;
}

.identity-dialog h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.2rem, 8vw, 3.5rem);
}

.identity-intro {
  max-width: 28rem;
  margin-bottom: 1.4rem;
  color: var(--muted);
}

.identity-options,
.profile-options {
  display: grid;
  gap: 0.65rem;
}

.identity-options button,
.profile-options button {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.68rem 0.8rem;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.identity-options button:hover,
.profile-options button:hover,
.profile-options button.is-current {
  border-color: #acc6b6;
  background: #f3f9f2;
  transform: translateY(-1px);
}

.identity-options button > span:nth-child(2),
.profile-options button > span:nth-child(2) {
  display: grid;
}

.identity-options button strong,
.profile-options button strong {
  font-size: 0.95rem;
}

.identity-options button small,
.profile-options button small {
  color: var(--muted);
  font-size: 0.75rem;
}

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

.avatar {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d8e2d8;
  border-radius: 50%;
  background: #edf3eb;
  color: var(--forest);
  font-size: 0.86rem;
  font-weight: 850;
}

.avatar-large {
  width: 3.4rem;
  height: 3.4rem;
  font-size: 1rem;
}

.avatar-xl {
  width: 4.6rem;
  height: 4.6rem;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
}

/* Tableau de bord */

.dashboard-hero,
.champion-hero {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 27rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(25rem, 1.1fr);
  gap: 2rem;
  border-radius: 2.3rem;
  padding: clamp(1.5rem, 4vw, 3.1rem);
  background:
    radial-gradient(circle at 16% 10%, rgba(223, 247, 166, 0.18), transparent 17rem),
    linear-gradient(145deg, #173d2f, #0d281e);
  color: #fff;
  box-shadow: 0 26px 70px rgba(20, 58, 43, 0.2);
}

.dashboard-hero::after,
.champion-hero::after {
  position: absolute;
  right: -3rem;
  bottom: -7rem;
  color: rgba(255, 255, 255, 0.035);
  content: "♞";
  font-family: Georgia, serif;
  font-size: 26rem;
  line-height: 1;
  pointer-events: none;
}

.player-overview,
.personal-next,
.champion-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero .eyebrow,
.champion-hero .eyebrow,
.light-heading .eyebrow {
  color: var(--lime-strong);
}

.dashboard-hero h1,
.champion-hero h1 {
  margin: 1.2rem 0 2rem;
}

.dashboard-hero h1 em,
.champion-hero h1 em {
  color: var(--lime);
}

.personal-stats {
  display: grid;
  max-width: 31rem;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
}

.personal-stats div {
  display: grid;
  padding: 0.9rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.11);
}

.personal-stats div:last-child {
  border-right: 0;
}

.personal-stats strong {
  font-size: 1.35rem;
  line-height: 1.1;
}

.personal-stats span {
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.67rem;
}

.personal-next {
  align-self: center;
  min-width: 0;
}

.personal-next-list {
  display: grid;
  max-height: 32rem;
  gap: 0.85rem;
  overflow-y: auto;
  padding-right: 0.4rem;
  overscroll-behavior: contain;
}

.light-heading,
.section-heading,
.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading > span,
.panel-heading > span,
.light-heading > div > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.light-heading {
  margin: 0 0 0.75rem;
  align-items: center;
}

.light-heading p {
  margin-bottom: 0.2rem;
}

.light-heading > div > span {
  color: rgba(255, 255, 255, 0.6);
}

.light-heading a {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.hero-empty {
  display: flex;
  min-height: 10rem;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
}

.hero-empty > span {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--forest);
  font-size: 1.2rem;
}

.hero-empty p {
  margin: 0.25rem 0 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.82rem;
}

.champion-hero {
  min-height: 21rem;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.champion-hero p:last-child {
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.68);
}

.champion-crown {
  position: relative;
  z-index: 2;
  color: var(--lime);
  font-size: clamp(6rem, 15vw, 11rem);
}

.info-banner {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #b9dac7;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  background: #eff9f1;
  color: #285d40;
  font-size: 0.8rem;
}

.info-banner i {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: #39a66d;
  box-shadow: 0 0 0 4px rgba(57, 166, 109, 0.12);
}

.info-banner a {
  flex: 0 0 auto;
  color: var(--forest);
  font-weight: 800;
  text-underline-offset: 0.2em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(18rem, 0.85fr);
  gap: 1.5rem;
}

.ranking-surface {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.podium {
  display: grid;
  margin: 1.6rem 0 1.3rem;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.podium-place {
  position: relative;
  display: grid;
  min-width: 0;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 1.15rem 0.6rem 0.9rem;
  background: var(--paper-soft);
  text-align: center;
}

.podium-place.is-you {
  border-color: #a9cdb9;
  box-shadow: inset 0 0 0 1px #c9e4d2;
}

.podium-place .medal {
  position: absolute;
  top: 0.55rem;
  left: 0.6rem;
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 50%;
  background: var(--silver);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 850;
}

.podium-1 {
  background: linear-gradient(145deg, #fff9e8, #fffdf6);
  border-color: #ecdaa9;
}

.podium-1 .medal {
  background: var(--gold);
}

.podium-3 .medal {
  background: var(--bronze);
}

.podium-place.podium-tied {
  border-color: var(--line);
  background: var(--paper-soft);
}

.podium-place.podium-tied .medal {
  background: var(--forest-2);
}

.podium-place > strong {
  overflow: hidden;
  width: 100%;
  margin-top: 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-points {
  margin-top: 0.2rem;
  color: var(--forest);
  font-size: 1.35rem;
  font-weight: 850;
}

.podium-points small,
.podium-place > small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
}

.ranking-list {
  display: grid;
}

.ranking-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 1.6rem auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding: 0.8rem 0.55rem;
}

.ranking-row.is-you {
  margin: 0 -0.45rem;
  border-top-color: transparent;
  border-radius: 0.9rem;
  padding-right: 1rem;
  padding-left: 1rem;
  background: #f0f7ef;
}

.rank-number {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.ranking-name {
  display: grid;
  min-width: 0;
}

.ranking-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-name strong span {
  margin-left: 0.35rem;
  border-radius: 999px;
  padding: 0.1rem 0.38rem;
  background: var(--lime);
  color: var(--forest);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ranking-name small,
.ranking-points small {
  color: var(--muted);
  font-size: 0.68rem;
}

.ranking-points {
  display: grid;
  justify-items: end;
  font-variant-numeric: tabular-nums;
}

.ranking-points strong {
  color: var(--forest);
  font-size: 1.35rem;
  line-height: 1;
}

.surface-footnote {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.surface-footnote a {
  color: var(--forest-2);
  font-weight: 750;
  text-underline-offset: 0.18em;
}

.dashboard-side {
  display: grid;
  align-content: start;
  gap: 1.5rem;
}

.progress-card,
.recent-card {
  padding: 1.35rem;
}

.progress-track {
  overflow: hidden;
  height: 0.55rem;
  margin: 1.3rem 0;
  border-radius: 999px;
  background: #e9ede7;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-2), #5fae6d);
}

.progress-0 { width: 0; }
.progress-8 { width: 8%; }
.progress-17 { width: 17%; }
.progress-25 { width: 25%; }
.progress-33 { width: 33%; }
.progress-42 { width: 42%; }
.progress-50 { width: 50%; }
.progress-58 { width: 58%; }
.progress-67 { width: 67%; }
.progress-75 { width: 75%; }
.progress-83 { width: 83%; }
.progress-92 { width: 92%; }
.progress-100 { width: 100%; }

.recent-list strong i {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 500;
}

.recent-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}

.recent-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.1rem 0.65rem;
  border-top: 1px solid var(--line);
  padding: 0.75rem 0;
}

.recent-list li > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.recent-list div {
  display: grid;
  min-width: 0;
}

.recent-list strong {
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-list small {
  color: var(--muted);
  font-size: 0.68rem;
}

.recent-list li > b {
  align-self: center;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 1.6rem 1rem;
  color: var(--muted);
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  margin-bottom: 0.5rem;
  place-items: center;
  border-radius: 50%;
  background: #edf2eb;
  color: var(--forest-2);
  font-size: 1.3rem;
}

.empty-state p {
  max-width: 22rem;
  margin: 0;
  font-size: 0.78rem;
}

/* Cartes de match */

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

.match-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 18px rgba(24, 53, 39, 0.045);
  scroll-margin-top: 6rem;
}

.match-card-head {
  display: flex;
  min-height: 1.8rem;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

.match-state {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
}

.match-state.is-finished {
  color: var(--forest-2);
}

.match-up {
  display: grid;
  min-width: 0;
  margin: 1.15rem 0 0.8rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}

.match-player {
  display: grid;
  min-width: 0;
  justify-items: center;
  text-align: center;
}

.match-player strong {
  overflow: hidden;
  width: 100%;
  margin-top: 0.38rem;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-player small {
  display: inline-flex;
  align-items: center;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.61rem;
}

.match-player.is-you .avatar {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px #d9ebdd;
}

.match-player.is-winner .avatar {
  border-color: #84bc96;
  background: #e5f5e8;
}

.match-player.is-winner strong {
  color: #14613a;
}

.match-player.is-loser strong {
  color: #7c8580;
  font-weight: 600;
}

.piece-dot {
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.25rem;
  border: 1px solid #839087;
  border-radius: 50%;
}

.piece-white {
  background: #fff;
}

.piece-black {
  background: #26342c;
}

.match-score {
  display: grid;
  min-width: 3.6rem;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.48rem 0.55rem;
  background: var(--paper-soft);
  font-variant-numeric: tabular-nums;
}

.match-score strong {
  color: var(--forest);
  font-size: 1.05rem;
  line-height: 1.05;
}

.match-score small {
  margin-top: 0.14rem;
  color: var(--muted);
  font-size: 0.56rem;
  white-space: nowrap;
}

.result-summary,
.match-note {
  margin: 0.35rem 0 0;
  border-radius: 0.72rem;
  padding: 0.55rem 0.7rem;
  background: #f2f7f1;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.result-summary b {
  color: var(--forest-2);
}

.match-note {
  background: #f7f4ed;
}

.match-card-compact {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.result-form {
  margin-top: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.result-form fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.result-form legend {
  width: 100%;
  margin-bottom: 0.55rem;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.result-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0.7fr minmax(0, 1fr);
  gap: 0.38rem;
}

.result-button {
  display: grid;
  min-width: 0;
  min-height: 3rem;
  align-content: center;
  border: 1px solid #cdd8cf;
  border-radius: 0.72rem;
  padding: 0.45rem 0.35rem;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.result-button:hover:not(:disabled) {
  border-color: var(--forest-2);
  background: #f0f7ef;
}

.result-button span {
  overflow: hidden;
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-button small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.54rem;
}

.result-button.is-selected,
.result-button:disabled {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
  opacity: 1;
}

.result-button.is-selected small {
  color: rgba(255, 255, 255, 0.7);
}

.result-draw {
  background: #f5f3ec;
}

.clear-result {
  display: block;
  margin: 0.65rem auto 0;
  border: 0;
  padding: 0.2rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.64rem;
  text-decoration: underline;
  text-underline-offset: 0.17em;
  cursor: pointer;
}

.clear-result[hidden] {
  display: none;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd8d0;
  border-radius: 0.75rem;
  padding: 0.68rem 0.75rem;
  background: #fff;
  color: var(--ink);
}

input::placeholder {
  color: #9ba39d;
}

/* Pages Matchs et entêtes intérieurs */

.page-intro {
  display: flex;
  min-height: 13rem;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 0 0.5rem;
}

.page-intro h1 {
  margin-bottom: 0.7rem;
}

.page-intro > div:first-child > p:last-child {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--muted);
}

.my-match-summary {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.my-match-summary > div {
  display: grid;
}

.my-match-summary small {
  color: var(--muted);
  font-size: 0.65rem;
}

.my-match-summary strong {
  font-size: 0.78rem;
}

.match-tabs {
  display: grid;
  width: min(100%, 31rem);
  margin-top: 0.3rem;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.3rem;
  background: rgba(255, 255, 255, 0.78);
}

.match-tabs button {
  border: 0;
  border-radius: 0.75rem;
  padding: 0.65rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.match-tabs button[aria-selected="true"] {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 5px 14px rgba(22, 61, 46, 0.15);
}

.match-tabs button span {
  display: inline-grid;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.25rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(103, 115, 107, 0.12);
  font-size: 0.62rem;
}

.match-tabs button[aria-selected="true"] span {
  background: rgba(255, 255, 255, 0.15);
}

.match-panel {
  display: grid;
  gap: 1rem;
  scroll-margin-top: 7rem;
}

.match-panel[hidden] {
  display: none;
}

.panel-heading {
  margin-top: 0.7rem;
  padding: 0 0.2rem;
}

.panel-heading .eyebrow {
  margin-bottom: 0.25rem;
}

.large-empty {
  min-height: 18rem;
  align-content: center;
  border: 1px dashed #cbd6cc;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.55);
}

/* Feuille croisée des résultats */

.results-intro {
  min-height: 15rem;
}

.matrix-key {
  display: grid;
  flex: 0 0 auto;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.matrix-key span,
.dialog-colors span {
  display: flex;
  align-items: center;
}

.results-surface {
  min-width: 0;
  padding: clamp(1rem, 3vw, 2rem);
}

.results-heading {
  margin-bottom: 1.25rem;
}

.matrix-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--paper);
  overscroll-behavior-inline: contain;
  scrollbar-color: #aebbb1 transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.matrix-scroll:focus-visible {
  outline: 3px solid rgba(32, 91, 67, 0.28);
  outline-offset: 3px;
}

.result-matrix {
  width: 100%;
  min-width: 38rem;
  border-spacing: 0;
  table-layout: fixed;
}

.result-matrix th,
.result-matrix td {
  width: 7rem;
  height: 6.3rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.42rem;
  text-align: center;
}

.result-matrix tr:last-child > * {
  border-bottom: 0;
}

.result-matrix tr > *:last-child {
  border-right: 0;
}

.result-matrix th {
  background: #f7f9f5;
}

.result-matrix thead th {
  height: 5.1rem;
}

.result-matrix tbody th,
.matrix-corner {
  position: sticky;
  z-index: 2;
  left: 0;
  width: 8.4rem;
  min-width: 8.4rem;
  box-shadow: 7px 0 14px rgba(31, 58, 44, 0.045);
}

.matrix-corner {
  z-index: 3;
  background: var(--forest) !important;
  color: #fff;
}

.result-matrix th span,
.result-matrix th small {
  display: block;
}

.result-matrix th span {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-matrix th small {
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 650;
}

.matrix-corner small {
  color: rgba(255, 255, 255, 0.65) !important;
}

.result-matrix th.is-you {
  background: #eaf4e8;
  color: var(--forest-2);
}

.matrix-diagonal {
  background:
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(101, 116, 106, 0.08) 8px 10px),
    #f1f3ef;
  color: #a2aaa4;
  font-size: 1.25rem;
}

.result-matrix td.is-your-game {
  background: #fbfdf7;
}

.matrix-result {
  display: grid;
  width: 100%;
  min-height: 4.9rem;
  place-content: center;
  gap: 0.16rem;
  border: 1px solid #ccd8ce;
  border-radius: 0.9rem;
  background: #fff;
  color: var(--forest);
  cursor: pointer;
  scroll-margin: 7rem;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.matrix-result:hover,
.matrix-result:focus-visible {
  border-color: var(--forest-2);
  background: #f2f8ef;
  transform: translateY(-1px);
}

.matrix-result:target {
  box-shadow: 0 0 0 4px rgba(201, 236, 120, 0.55);
}

.matrix-result strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.matrix-result small {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 700;
}

.matrix-result.is-white_win,
.matrix-result.is-black_win,
.matrix-result.is-draw {
  border-color: #b9d1be;
  background: #edf7eb;
}

.matrix-result.is-scheduled strong {
  color: var(--forest-2);
  font-size: 1.55rem;
  font-weight: 450;
}

.matrix-scroll-hint {
  display: none;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.65rem;
}

.matrix-scroll-hint span {
  margin-right: 0.25rem;
  color: var(--forest-2);
  font-size: 0.9rem;
}

.results-help {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.results-help div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.results-help strong {
  color: var(--forest);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.results-help span {
  color: var(--muted);
  font-size: 0.68rem;
}

.result-dialog {
  width: min(calc(100% - 2rem), 34rem);
  max-width: none;
  border: 0;
  border-radius: 1.5rem;
  padding: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(4, 22, 14, 0.32);
}

.result-dialog::backdrop {
  background: rgba(12, 32, 24, 0.7);
  backdrop-filter: blur(8px);
}

.result-dialog-card {
  position: relative;
  padding: 1.5rem;
  background: var(--paper);
}

.result-dialog h2 {
  padding-right: 2.3rem;
}

.result-dialog h2 i {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 0.7em;
  font-weight: 450;
}

.dialog-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-colors {
  display: grid;
  margin-top: 1rem;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.dialog-colors b {
  margin-right: 0.22rem;
  color: var(--ink);
}

.matrix-result-form {
  margin-top: 1.2rem;
  padding-top: 1rem;
}

/* Profil */

.profile-intro,
.rules-intro,
.settings-intro {
  min-height: 15rem;
}

.profile-score {
  display: flex;
  min-width: 14rem;
  align-items: center;
  gap: 1rem;
  border-radius: 1.25rem;
  padding: 1rem;
  background: var(--forest);
  color: #fff;
  box-shadow: 0 16px 36px rgba(22, 61, 46, 0.18);
}

.profile-score > div {
  display: grid;
}

.profile-score strong {
  font-size: 2.3rem;
  line-height: 1;
}

.profile-score span {
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
}

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

.profile-card,
.actions-card,
.settings-card,
.rule-card,
.danger-card,
.draw-rule {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.profile-options {
  margin-top: 1.25rem;
}

.profile-options button.is-current .avatar {
  background: var(--forest);
  color: #fff;
}

.card-copy {
  margin: 1.2rem 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.settings-form,
.danger-form {
  display: grid;
  gap: 0.9rem;
}

.settings-form .button,
.danger-form .button {
  justify-self: start;
}

/* Réglages */

.settings-intro .button {
  flex: 0 0 auto;
}

.settings-form {
  margin-top: 1.25rem;
}

.fixed-setting {
  display: grid;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.85rem 0.9rem;
  background: var(--paper-soft);
}

.fixed-setting > span,
.fixed-setting > small {
  color: var(--muted);
  font-size: 0.65rem;
}

.fixed-setting > strong {
  color: var(--forest);
  font-size: 0.9rem;
}

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

.settings-divider {
  height: 1px;
  margin: 1.4rem 0;
  background: var(--line);
}

.danger-card {
  border-color: #e8c2bd;
  background: linear-gradient(145deg, #fff, #fff9f8);
}

.danger-card > p {
  max-width: 45rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.danger-form {
  max-width: 31rem;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.check-label input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

/* Règles */

.cadence-badge {
  display: flex;
  max-width: 22rem;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.74);
}

.cadence-badge > span {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.8rem;
  background: var(--forest);
  color: var(--lime);
  font-size: 1.4rem;
}

.cadence-badge div {
  display: grid;
}

.cadence-badge small {
  color: var(--muted);
  font-size: 0.65rem;
}

.cadence-badge strong {
  font-size: 0.82rem;
}

.rule-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.rule-highlights article {
  display: flex;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.rule-highlights article > span {
  color: #95a099;
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.rule-highlights article div {
  display: grid;
}

.rule-highlights strong {
  font-size: 0.82rem;
}

.rule-highlights p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.rule-card .section-heading > span {
  color: #b7c2ba;
  font-size: 2.4rem;
}

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

.clean-list li {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 0.78rem 0 0.78rem 1.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.clean-list li::before {
  position: absolute;
  top: 1.12rem;
  left: 0;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--lime-strong);
  content: "";
}

.clean-list b {
  color: var(--ink);
}

.tiebreak-list {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  counter-reset: none;
}

.tiebreak-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-top: 1px solid var(--line);
  padding: 0.65rem 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.tiebreak-list li span {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #edf2eb;
  color: var(--forest);
  font-size: 0.6rem;
  font-weight: 850;
}

.draw-rule {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: center;
  gap: 2rem;
}

.draw-rule p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Erreurs */

.error-card {
  max-width: 38rem;
  min-height: 22rem;
  margin: 3rem auto;
  padding: 2.2rem;
  text-align: center;
}

.error-code {
  color: var(--forest-2);
  font-family: Georgia, serif;
  font-size: 4rem;
}

.error-card p {
  color: var(--muted);
}

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

@media (max-width: 60rem) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .dashboard-hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .personal-next-list {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

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

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

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

@media (max-width: 44rem) {
  html {
    scroll-padding-bottom: 6rem;
  }

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

  .site-header {
    position: relative;
  }

  .header-inner {
    min-height: 4.2rem;
    padding: 0.6rem 1rem;
  }

  .brand-mark {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.35rem;
  }

  .brand strong {
    font-size: 0.82rem;
  }

  .brand small {
    font-size: 0.52rem;
  }

  .profile-chip {
    min-height: 2.45rem;
    padding-right: 0.32rem;
  }

  .profile-chip > span:last-child {
    display: none;
  }

  .mini-avatar {
    width: 1.9rem;
    height: 1.9rem;
  }

  main {
    padding: 1.25rem 0.85rem calc(7rem + env(safe-area-inset-bottom));
    gap: 1rem;
  }

  .mobile-nav {
    position: fixed;
    z-index: 60;
    right: 0.7rem;
    bottom: calc(0.65rem + env(safe-area-inset-bottom));
    left: 0.7rem;
    display: grid;
    min-height: 4.2rem;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    border: 1px solid rgba(215, 224, 216, 0.95);
    border-radius: 1.25rem;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 40px rgba(14, 45, 31, 0.18);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a {
    display: grid;
    min-width: 0;
    min-height: 3.35rem;
    place-items: center;
    align-content: center;
    gap: 0.1rem;
    border-radius: 0.9rem;
    color: var(--muted);
    font-size: 0.57rem;
    font-weight: 750;
    text-decoration: none;
  }

  .mobile-nav a > span {
    font-size: 1rem;
    line-height: 1;
  }

  .mobile-nav a[aria-current="page"] {
    background: var(--forest);
    color: #fff;
  }

  .site-footer {
    display: none;
  }

  .flash-stack {
    margin-top: 0.7rem;
    padding: 0 0.85rem;
  }

  .flash {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 3.5rem);
  }

  .dashboard-hero,
  .champion-hero {
    border-radius: 1.55rem;
    padding: 1.35rem;
  }

  .dashboard-hero::after,
  .champion-hero::after {
    font-size: 17rem;
  }

  .dashboard-hero h1 {
    margin: 0.9rem 0 1.3rem;
  }

  .personal-stats {
    margin-bottom: 0.9rem;
  }

  .personal-stats div {
    padding: 0.75rem 0.55rem;
  }

  .personal-stats strong {
    font-size: 1.05rem;
  }

  .personal-stats span {
    font-size: 0.56rem;
  }

  .info-banner {
    align-items: flex-start;
    padding: 0.75rem 0.8rem;
  }

  .info-banner span {
    max-width: 70%;
  }

  .surface {
    border-radius: 1.35rem;
  }

  .ranking-surface,
  .progress-card,
  .recent-card,
  .profile-card,
  .actions-card,
  .settings-card,
  .rule-card,
  .danger-card,
  .draw-rule {
    padding: 1rem;
  }

  .podium {
    gap: 0.4rem;
  }

  .podium-place {
    padding: 1rem 0.25rem 0.75rem;
  }

  .podium-place .avatar-large {
    width: 2.7rem;
    height: 2.7rem;
  }

  .podium-place > strong {
    font-size: 0.72rem;
  }

  .podium-points {
    font-size: 1.05rem;
  }

  .podium-place > small {
    font-size: 0.52rem;
  }

  .ranking-row {
    grid-template-columns: 1.25rem 2.25rem minmax(0, 1fr) auto;
    gap: 0.55rem;
    padding-right: 0.15rem;
    padding-left: 0.15rem;
  }

  .ranking-row .avatar {
    width: 2.25rem;
    height: 2.25rem;
  }

  .dashboard-side,
  .profile-grid,
  .settings-grid,
  .rules-grid,
  .rule-highlights,
  .draw-rule {
    grid-template-columns: 1fr;
  }

  .page-intro {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.25rem 0 0.5rem;
  }

  .results-intro {
    gap: 1rem;
  }

  .matrix-key {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-surface {
    margin-right: -0.85rem;
    margin-left: -0.85rem;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .results-heading,
  .matrix-scroll-hint {
    margin-right: 0.85rem;
    margin-left: 0.85rem;
  }

  .matrix-scroll {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .result-matrix {
    min-width: 30.5rem;
  }

  .result-matrix th,
  .result-matrix td {
    width: 6rem;
    height: 5.65rem;
    padding: 0.32rem;
  }

  .result-matrix thead th {
    height: 4.7rem;
  }

  .result-matrix tbody th,
  .matrix-corner {
    width: 6.5rem;
    min-width: 6.5rem;
  }

  .result-matrix th span {
    font-size: 0.68rem;
  }

  .matrix-result {
    min-height: 4.5rem;
  }

  .matrix-scroll-hint {
    display: block;
  }

  .results-help {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .results-help div {
    min-height: 3.2rem;
  }

  .result-dialog {
    width: 100%;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 1.5rem 1.5rem 0 0;
  }

  .result-dialog-card {
    padding: 1.35rem 0.9rem calc(1.2rem + env(safe-area-inset-bottom));
  }

  .matrix-result-form .result-button {
    min-height: 3.8rem;
  }

  .page-intro h1 {
    margin-bottom: 0.6rem;
  }

  .my-match-summary,
  .cadence-badge,
  .profile-score {
    width: 100%;
  }

  .match-tabs {
    position: sticky;
    z-index: 20;
    top: 0.5rem;
    width: 100%;
    box-shadow: var(--shadow-small);
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .match-card {
    border-radius: 1.2rem;
    padding: 0.85rem;
  }

  .match-up {
    gap: 0.35rem;
  }

  .match-player strong {
    font-size: 0.78rem;
  }

  .match-score {
    min-width: 3.25rem;
    padding-right: 0.4rem;
    padding-left: 0.4rem;
  }

  .result-actions {
    gap: 0.28rem;
  }

  .result-button {
    min-height: 3.25rem;
    padding-right: 0.2rem;
    padding-left: 0.2rem;
  }

  .result-button span {
    font-size: 0.62rem;
  }

  .player-fields {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    display: grid;
  }

  .champion-hero {
    grid-template-columns: 1fr;
  }

  .champion-crown {
    display: none;
  }

  .identity-gate {
    place-items: end center;
    padding: 0;
  }

  .identity-dialog {
    max-height: 94vh;
    overflow-y: auto;
    border-radius: 1.7rem 1.7rem 0 0;
    padding: 1.35rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
  }

  .identity-piece {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    font-size: 1.7rem;
  }

  .draw-rule {
    gap: 0.8rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
