:root {
  color-scheme: light;
  --navy-950: #091224;
  --navy-900: #101b32;
  --navy-800: #182744;
  --blue-700: #0759d6;
  --blue-600: #0873ef;
  --blue-100: #dcecff;
  --pink-600: #e64179;
  --pink-100: #ffe2ec;
  --gold-500: #e4a91c;
  --ink: #172033;
  --muted: #657087;
  --line: #dfe3eb;
  --paper: #fffefd;
  --canvas: #f3f1ed;
  --success: #16835e;
  --danger: #b52d45;
  --motion-instant: 90ms;
  --motion-fast: 160ms;
  --motion-medium: 280ms;
  --motion-slow: 520ms;
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.65, 0, 0.35, 1);
  --shadow-1:
    0 1px 2px rgb(9 18 36 / 5%),
    0 8px 24px rgb(9 18 36 / 5%);
  --shadow-2: 0 14px 40px rgb(9 18 36 / 10%);
  --shadow-3: 0 24px 70px rgb(9 18 36 / 16%);
  --shadow: var(--shadow-1);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 20%, rgb(8 115 239 / 7%), transparent 26rem),
    var(--canvas);
  color: var(--ink);
  line-height: 1.55;
}

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

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

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 9px;
  background: white;
  color: var(--blue-700);
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  background: rgb(9 18 36 / 94%);
  color: white;
  backdrop-filter: blur(16px);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 10px;
  color: white;
  line-height: 1.05;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand > span:last-child {
  min-width: 0;
}

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

.brand small {
  overflow: hidden;
  max-width: 300px;
  margin-top: 3px;
  color: #aab9d2;
  font-size: 0.62rem;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 10px);
  grid-template-rows: repeat(2, 10px);
  gap: 3px;
  transform: rotate(-8deg);
}

.brand-mark span {
  border-radius: 50%;
  background: var(--blue-600);
}

.brand-mark span:nth-child(2) {
  background: var(--pink-600);
}

.brand-mark span:nth-child(3) {
  grid-column: 1 / 3;
  width: 16px;
  justify-self: center;
  background: white;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.primary-nav a {
  padding: 8px 12px;
  border-radius: 9px;
  color: #cad4e7;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-nav a:focus-visible {
  background: rgb(255 255 255 / 9%);
  color: white;
}

.data-status {
  display: flex;
  align-items: center;
  justify-self: end;
  margin: 0;
  gap: 8px;
  color: #c7d1e2;
  font-size: 0.76rem;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 999px;
  background: rgb(255 255 255 / 6%);
  color: #8795ad;
  cursor: pointer;
  font: inherit;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition:
    border-color var(--motion-fast, 160ms) ease,
    background-color var(--motion-fast, 160ms) ease,
    color var(--motion-fast, 160ms) ease,
    transform var(--motion-fast, 160ms) ease;
}

.language-toggle:hover {
  border-color: rgb(120 184 255 / 58%);
  background: rgb(255 255 255 / 10%);
}

.language-toggle:active {
  transform: scale(0.96);
}

.language-toggle.is-language-changing {
  animation: language-toggle-arrival 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes language-toggle-arrival {
  0% {
    opacity: 0.72;
    transform: scale(0.92) rotate(-3deg);
  }

  62% {
    transform: scale(1.06) rotate(1deg);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

.language-toggle:focus-visible {
  outline: 2px solid #78b8ff;
  outline-offset: 3px;
}

.language-toggle-divider {
  margin: 0 4px;
  color: #5f6c82;
}

html[lang="fr"] .language-toggle [data-language="fr"],
html[lang="en"] .language-toggle [data-language="en"] {
  color: white;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgb(22 131 94 / 17%);
}

.data-status.is-loading .status-dot {
  background: var(--gold-500);
  box-shadow: 0 0 0 4px rgb(228 169 28 / 17%);
  animation: pulse 1.3s ease-in-out infinite;
}

.data-status.is-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgb(181 45 69 / 17%);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 74px max(24px, calc((100% - 1120px) / 2)) 62px;
  background:
    radial-gradient(circle at 86% 12%, rgb(8 115 239 / 33%), transparent 28rem),
    radial-gradient(circle at 12% 110%, rgb(230 65 121 / 18%), transparent 30rem),
    linear-gradient(145deg, var(--navy-950), var(--navy-800));
  color: white;
}

.hero::after {
  position: absolute;
  width: 360px;
  height: 360px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 50%;
  content: "";
  right: -90px;
  bottom: -230px;
  box-shadow:
    0 0 0 54px rgb(255 255 255 / 2%),
    0 0 0 108px rgb(255 255 255 / 2%);
}

.hero-copy,
.hero-controls,
.essential-note {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: #72b5ff;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 880px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 6vw, 5.45rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.hero h1 span {
  color: #b9c8df;
}

.hero-intro {
  max-width: 630px;
  margin: 26px 0 0;
  color: #cbd5e6;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-controls {
  display: flex;
  align-items: end;
  margin-top: 44px;
  gap: 24px;
}

.game-switcher,
.number-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.game-switcher legend,
.period-control label {
  display: block;
  margin-bottom: 8px;
  color: #aebdd3;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segmented-control {
  display: flex;
  padding: 5px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 14px;
  background: rgb(255 255 255 / 7%);
  gap: 5px;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 15px;
  border-radius: 10px;
  gap: 8px;
  color: #c4cfe1;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
}

.segmented-control input:checked + label {
  background: white;
  color: var(--navy-900);
  box-shadow: 0 8px 20px rgb(0 0 0 / 18%);
}

.segmented-control input:focus-visible + label {
  outline: 3px solid #78b8ff;
  outline-offset: 2px;
}

.game-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.game-dot-loto {
  background: var(--blue-600);
}

.game-dot-euro {
  background: var(--pink-600);
}

.period-control select {
  min-width: 220px;
  height: 54px;
  padding: 0 42px 0 16px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 14px;
  background: rgb(255 255 255 / 9%);
  color: white;
  cursor: pointer;
  font-weight: 750;
}

.period-control option {
  background: white;
  color: var(--ink);
}

.period-control small {
  display: block;
  max-width: 270px;
  margin-top: 7px;
  color: #aebdd3;
  font-size: 0.68rem;
}

.essential-note {
  display: flex;
  max-width: 880px;
  margin-top: 38px;
  margin-left: 0;
  padding: 16px 18px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 14px;
  background: rgb(255 255 255 / 6%);
  gap: 13px;
  color: #c9d4e5;
}

.essential-note h2 {
  margin: 0 0 2px;
  color: white;
  font-size: 0.87rem;
}

.essential-note p {
  margin: 0;
  font-size: 0.8rem;
}

.note-icon {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 1px solid #68adff;
  border-radius: 50%;
  color: #83bcff;
  font-family: Georgia, serif;
  font-weight: 800;
  place-items: center;
}

.content-shell {
  display: grid;
  width: min(1120px, calc(100% - 40px));
  margin: 38px auto 72px;
  gap: 28px;
}

.panel {
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgb(216 220 228 / 88%);
  border-radius: var(--radius-xl);
  background: rgb(255 254 253 / 96%);
  box-shadow: var(--shadow);
}

.section-heading,
.subsection-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.section-kicker {
  color: var(--blue-700);
}

.section-meta {
  max-width: 360px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.search-form {
  display: flex;
  align-items: end;
  max-width: 680px;
  gap: 12px;
}

.field {
  flex: 1;
}

.calendar-field {
  position: relative;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #cfd5df;
  border-radius: 12px;
  background: white;
}

.draw-date-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
}

.draw-date-input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  min-width: 0;
  height: 50px;
  overflow: hidden;
  border: 1px solid #cfd5df;
  border-radius: 12px;
  background: white;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.draw-date-input-group:focus-within {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgb(8 115 239 / 18%);
}

.field .draw-date-input {
  min-width: 0;
  height: 48px;
  padding: 0 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.field .draw-date-input:focus {
  border: 0;
  outline: 0;
}

.field .draw-date-input[aria-invalid="true"] {
  color: var(--danger);
}

.draw-step-button {
  display: grid;
  width: 44px;
  height: 50px;
  padding: 0;
  border: 1px solid #bfd9fa;
  border-radius: 12px;
  background: #edf6ff;
  color: var(--blue-700);
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 850;
  place-items: center;
}

.draw-step-button[aria-disabled="true"] {
  border-color: #e1e4e9;
  background: #f2f3f5;
  color: #b0b5be;
  cursor: not-allowed;
}

.calendar-trigger {
  display: grid;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 48px;
  padding: 0;
  border: 0;
  border-left: 1px solid #e0e4eb;
  border-radius: 0;
  background: #f8faff;
  cursor: pointer;
}

.calendar-trigger:disabled {
  cursor: wait;
  opacity: 0.62;
}

.calendar-trigger-icon {
  width: 19px;
  height: 19px;
  border: 1.7px solid #6d7890;
  border-radius: 4px;
  background:
    linear-gradient(#6d7890, #6d7890) 2px 5px / 13px 1.5px no-repeat,
    linear-gradient(#6d7890, #6d7890) 4px 1px / 1.7px 5px no-repeat,
    linear-gradient(#6d7890, #6d7890) 12px 1px / 1.7px 5px no-repeat;
  flex: none;
}

.field input:focus,
.field textarea:focus,
.draw-step-button:focus-visible,
.calendar-trigger:focus-visible,
.period-control select:focus {
  border-color: var(--blue-600);
  outline: 3px solid rgb(8 115 239 / 18%);
}

.calendar-trigger:focus-visible {
  outline-offset: -4px;
}

.input-error {
  margin: 7px 0 0 52px;
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 700;
}

.calendar-popover {
  position: absolute;
  z-index: 15;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, 100%);
  padding: 15px;
  border: 1px solid #d8dde6;
  border-radius: 16px;
  background: white;
  box-shadow: 0 18px 45px rgb(23 32 51 / 18%);
}

.calendar-popover[data-view="year"] {
  width: min(760px, calc(100vw - 54px));
  max-height: min(680px, 76vh);
  overflow-y: auto;
}

.calendar-view-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
  padding: 3px;
  border-radius: 11px;
  background: #eef2f8;
  gap: 3px;
}

.calendar-view-button {
  min-height: 44px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #657087;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
}

.calendar-view-button[aria-pressed="true"] {
  background: white;
  color: var(--blue-700);
  box-shadow: 0 2px 7px rgb(30 45 70 / 11%);
}

.calendar-view-button:focus-visible {
  outline: 3px solid rgb(8 115 239 / 28%);
  outline-offset: 1px;
}

.calendar-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: 9px;
  gap: 6px;
}

.calendar-header h3 {
  margin: 0;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 850;
  text-align: center;
}

.calendar-nav {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
  place-items: center;
}

.calendar-nav:disabled {
  cursor: not-allowed;
  opacity: 0.25;
}

.calendar-nav:focus-visible,
.calendar-day:focus-visible {
  outline: 3px solid rgb(8 115 239 / 28%);
  outline-offset: 1px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-align: center;
}

.calendar-weekdays span {
  display: grid;
  height: 25px;
  place-items: center;
}

.calendar-day {
  display: grid;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #edf6ff;
  color: var(--blue-700);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  place-items: center;
}

.calendar-day.is-unavailable {
  background: #f1f2f4;
  color: #a3a8b1;
  cursor: not-allowed;
  font-weight: 650;
}

.calendar-day.is-selected {
  background: var(--blue-600);
  color: white;
  box-shadow: 0 4px 11px rgb(8 115 239 / 24%);
}

.calendar-day.is-outside {
  background: transparent;
  cursor: default;
}

.calendar-grid.is-week {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-week-day {
  display: flex;
  min-height: 76px;
  aspect-ratio: auto;
  flex-direction: column;
  justify-content: center;
  padding: 6px 2px;
  gap: 1px;
}

.calendar-week-day strong {
  font-size: 1rem;
}

.calendar-week-day small,
.calendar-weekday-name {
  font-size: 0.57rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.calendar-grid.is-year {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.calendar-year-month {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1e6ee;
  border-radius: 13px;
  background: #fcfdff;
}

.calendar-year-month h4 {
  margin: 0 0 6px;
  color: var(--navy-800);
  font-size: 0.7rem;
  text-align: center;
  text-transform: capitalize;
}

.calendar-mini-weekdays,
.calendar-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.calendar-mini-weekdays {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 800;
  text-align: center;
}

.calendar-mini-grid .calendar-day {
  min-height: 30px;
  border-radius: 5px;
  font-size: 0.58rem;
}

.calendar-mini-grid .calendar-day.is-selected {
  box-shadow: 0 2px 7px rgb(8 115 239 / 22%);
}

.calendar-help {
  display: flex;
  align-items: flex-start;
  margin: 11px 2px 0;
  gap: 7px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.calendar-legend-swatch {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  border-radius: 4px;
  background: #f1f2f4;
  flex: none;
}

.button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.button:focus-visible {
  outline: 3px solid rgb(8 115 239 / 30%);
  outline-offset: 2px;
}

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

.button-primary {
  background: var(--blue-600);
  color: white;
  box-shadow: 0 8px 20px rgb(8 115 239 / 20%);
}

.search-icon-button {
  display: grid;
  width: 50px;
  min-width: 50px;
  margin-top: 31px;
  padding: 0;
  align-self: flex-start;
  place-items: center;
}

.search-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 8px;
  height: 2.5px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.button-quiet {
  background: #edf1f7;
  color: #344056;
}

.result-region {
  margin-top: 24px;
  border-radius: var(--radius-lg);
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  padding: 26px;
  border: 1px dashed #cfd5df;
  background: #f8f9fb;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.empty-state p {
  margin: 0;
}

.empty-symbol {
  color: #93a0b5;
  font-size: 1.5rem;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  gap: 12px;
  color: var(--muted);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ced6e4;
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.draw-list,
.occurrence-list {
  display: grid;
  gap: 12px;
}

.draw-card,
.verdict-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #f9fafc;
}

.draw-card-header,
.verdict-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}

.draw-card h3,
.verdict-card h3 {
  margin: 0;
  font-size: 1rem;
}

.draw-card small,
.verdict-card p {
  color: var(--muted);
}

.ball-row,
.selected-balls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ball,
.mini-ball {
  display: inline-grid;
  border-radius: 50%;
  background: white;
  color: var(--navy-900);
  font-weight: 850;
  place-items: center;
}

.ball {
  width: 42px;
  height: 42px;
  border: 1px solid #cbd3df;
  box-shadow: 0 5px 14px rgb(22 29 43 / 8%);
}

.mini-ball {
  width: 33px;
  height: 33px;
  border: 1px solid #d5dbe4;
  font-size: 0.8rem;
}

.ball-special,
.mini-ball.special {
  border-color: #f0a8c1;
  background: var(--pink-100);
  color: #a72454;
}

.ball-separator {
  margin: 0 3px;
  color: #9ca6b6;
  font-size: 1.2rem;
}

.draw-extra {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.draw-extra strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
}

.archived-code-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 7px;
  list-style: none;
}

.archived-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 10px;
  background: white;
  gap: 12px;
}

.archived-code > span:first-child {
  display: grid;
  gap: 1px;
}

.archived-code small {
  color: var(--muted);
  font-size: 0.62rem;
}

.archived-code code,
.code-check-item code {
  color: var(--navy-900);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.035em;
}

.published-prize {
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: right;
}

.grid-heading-tools {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.grid-heading-tools .section-meta {
  margin-top: 0;
}

.grid-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.random-grid-button,
.grid-icon-button {
  min-height: 44px;
  border: 1px solid #c9dcf5;
  border-radius: 13px;
  background: #f2f7ff;
  color: var(--blue-700);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 850;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.random-grid-button {
  display: inline-flex;
  align-items: center;
  min-width: 190px;
  padding: 0 14px 0 11px;
  gap: 9px;
}

.grid-icon-button {
  display: grid;
  width: 44px;
  padding: 0;
  place-items: center;
}

.random-grid-button:focus-visible,
.grid-icon-button:focus-visible {
  outline: 3px solid rgb(8 115 239 / 28%);
  outline-offset: 2px;
}

.random-grid-button:disabled,
.random-grid-button[aria-disabled="true"] {
  cursor: progress;
  opacity: 0.72;
}

.is-randomizing .random-grid-icon {
  animation: random-icon-shuffle 620ms ease-in-out infinite alternate;
}

.random-grid-icon {
  position: relative;
  width: 30px;
  height: 24px;
  flex: none;
}

.random-grid-icon i {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 2px 6px rgb(15 45 90 / 18%);
}

.random-grid-icon i:nth-child(1) {
  top: 1px;
  left: 1px;
}

.random-grid-icon i:nth-child(2) {
  right: 1px;
  bottom: 1px;
  background: var(--pink-600);
}

.random-grid-icon i:nth-child(3) {
  bottom: 0;
  left: 8px;
  background: #e8ae22;
}

.reset-grid-button {
  color: #68758d;
}

.reset-grid-icon {
  position: relative;
  width: 14px;
  height: 16px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.reset-grid-icon::before {
  position: absolute;
  top: -5px;
  left: -4px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.reset-grid-icon::after {
  position: absolute;
  top: -8px;
  left: 3px;
  width: 6px;
  height: 4px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  content: "";
}

.number-picker + .number-picker {
  margin-top: 28px;
}

.number-picker legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 14px;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 850;
}

.selection-counter,
.soft-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf2f9;
  color: #536079;
  font-size: 0.7rem;
  font-weight: 850;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 8px;
}

.number-choice {
  --choice-accent: var(--game, var(--blue-600));
  --choice-glow: var(--game-glow, rgb(8 115 239 / 24%));
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  min-width: 38px;
  min-height: 44px;
  max-width: 48px;
  border: 1px solid #d3d9e3;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

.special-picker .number-choice {
  --choice-accent: var(--game-special, var(--pink-600));
  --choice-glow: color-mix(in srgb, var(--game-special, var(--pink-600)) 28%, transparent);
}

.number-choice::before,
.number-choice::after {
  position: absolute;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.number-choice::before {
  z-index: 0;
  background: var(--choice-accent);
  inset: -1px;
  opacity: 0;
  transform: scale(0.38);
  transition:
    opacity 180ms ease,
    transform 300ms var(--ease-premium);
}

.number-choice::after {
  z-index: -1;
  border: 2px solid var(--choice-accent);
  inset: -4px;
  opacity: 0;
  transform: scale(0.78);
}

.number-choice-label {
  position: relative;
  z-index: 1;
}

.number-choice[aria-pressed="true"] {
  border-color: var(--choice-accent);
  background: white;
  color: white;
  box-shadow: 0 6px 14px var(--choice-glow);
}

.number-choice[aria-pressed="true"]::before {
  opacity: 1;
  transform: scale(1);
}

.special-picker .number-choice[aria-pressed="true"] {
  border-color: var(--choice-accent);
  background: white;
  color: white;
  box-shadow: 0 6px 14px var(--choice-glow);
}

.number-choice:focus-visible {
  outline: 3px solid rgb(8 115 239 / 28%);
  outline-offset: 2px;
}

.number-choice:disabled {
  border-color: #e1e4e9;
  background: #f1f2f4;
  color: #9da4b0;
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

.number-choice:disabled[aria-pressed="false"]::before,
.number-choice:disabled::after {
  opacity: 0;
}

.number-choice.is-random-reveal[aria-pressed="true"] {
  border-color: var(--choice-accent);
  background: white;
  color: white;
  opacity: 1;
  box-shadow: 0 8px 19px var(--choice-glow);
  animation: random-ball-reveal 540ms cubic-bezier(0.2, 0.85, 0.25, 1.18)
    both;
  animation-delay: calc(var(--random-order, 0) * 105ms);
}

.special-picker .number-choice.is-random-reveal[aria-pressed="true"] {
  border-color: var(--choice-accent);
  background: white;
  box-shadow: 0 8px 19px var(--choice-glow);
}

.is-randomizing .selection-recap {
  opacity: 0.62;
  transform: scale(0.995);
}

.field-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.selection-recap {
  display: grid;
  grid-template-columns: 1fr minmax(150px, 0.38fr);
  margin-top: 28px;
  padding: 18px;
  border-radius: 16px;
  background: #f2f5f9;
  gap: 20px;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.recap-label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selection-placeholder {
  color: #8b95a7;
  font-size: 0.82rem;
}

.grid-equivalence {
  display: flex;
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #c9def9;
  border-radius: 13px;
  background: #f2f7ff;
  color: #40506a;
  gap: 11px;
  font-size: 0.76rem;
}

.grid-mode {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dbe9fb;
  color: #2d537f;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.grid-equivalence.is-simple {
  border-color: #b9decf;
  background: #f2fbf7;
}

.grid-equivalence.is-simple .grid-mode {
  background: #d7f0e5;
  color: #176747;
}

.grid-equivalence.is-multiple {
  border-color: #f0c2d2;
  background: #fff6f9;
}

.grid-equivalence.is-multiple .grid-mode {
  background: var(--pink-100);
  color: #a72454;
}

.ticket-options {
  margin-top: 14px;
  border: 1px solid #d8e0eb;
  border-radius: 15px;
  background: #fbfcfe;
}

.ticket-options > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 13px 16px;
  cursor: pointer;
  gap: 16px;
  list-style: none;
}

.ticket-options > summary::-webkit-details-marker {
  display: none;
}

.ticket-options > summary:focus-visible {
  border-radius: 14px;
  outline: 3px solid rgb(8 115 239 / 24%);
  outline-offset: 2px;
}

.ticket-options > summary strong,
.ticket-options > summary small {
  display: block;
}

.ticket-options > summary strong {
  font-size: 0.82rem;
}

.ticket-options > summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.ticket-options-chevron {
  color: var(--blue-600);
  font-size: 1.05rem;
  transition: transform 150ms ease;
}

.ticket-options.is-expanded > summary .ticket-options-chevron {
  transform: rotate(180deg);
}

.ticket-options-content {
  padding: 16px;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translate3d(0, -12px, 0) scale(0.985);
  transform-origin: top center;
}

.ticket-options.is-expanded .ticket-options-content {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.ticket-options.is-details-animating {
  overflow: clip;
}

.option-toggle {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 13px 14px;
  border: 1px solid #ead7a5;
  border-radius: 12px;
  background: #fff9e9;
  cursor: pointer;
  gap: 11px;
}

.option-toggle input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue-600);
  flex: none;
}

.option-toggle strong,
.option-toggle small {
  display: block;
}

.option-toggle strong {
  font-size: 0.76rem;
}

.option-toggle small {
  margin-top: 3px;
  color: #71613a;
  font-size: 0.68rem;
  line-height: 1.45;
}

.ticket-options-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(260px, 1fr);
  align-items: start;
  gap: 16px;
}

.ticket-code-field textarea {
  display: block;
  width: 100%;
  min-height: 94px;
  padding: 12px 14px;
  resize: vertical;
  border: 1px solid #cfd5df;
  border-radius: 12px;
  background: white;
  line-height: 1.45;
}

.ticket-code-field textarea::placeholder {
  color: #9ba4b4;
}

.ticket-options .input-error {
  margin-left: 0;
}

.ticket-code-privacy {
  margin: 14px 0 0;
  padding-left: 22px;
  background:
    radial-gradient(circle, var(--success) 0 3px, transparent 4px)
    4px 0.57em / 9px 9px no-repeat;
  color: var(--muted);
  font-size: 0.68rem;
}

.selection-message {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #efc5cd;
  border-radius: 11px;
  background: #fff5f7;
  color: #8e2438;
  font-size: 0.75rem;
}

.form-actions {
  display: flex;
  margin-top: 18px;
  gap: 10px;
}

.verdict-card {
  border-left: 5px solid var(--blue-600);
}

.verdict-card.never {
  border-left-color: #68758d;
}

.verdict-card.once {
  border-left-color: var(--success);
}

.verdict-card.multiple {
  border-left-color: var(--pink-600);
}

.verdict-count {
  flex: 0 0 auto;
  color: var(--blue-700);
  font-size: 1.75rem;
  font-weight: 900;
}

.verdict-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
  gap: 10px;
}

.verdict-details div {
  padding: 13px;
  border-radius: 12px;
  background: white;
}

.verdict-details strong,
.verdict-details span {
  display: block;
}

.verdict-details span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.verdict-details.is-multiple {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.result-kicker {
  margin: 0 0 5px;
  color: var(--blue-700) !important;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rank-analysis {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.etoile-plus-analysis {
  padding: 20px;
  border: 1px solid #ead7a5;
  border-radius: 15px;
  background: #fffdf6;
}

.etoile-plus-analysis .rank-analysis-header .soft-badge {
  background: #ffe8a6;
  color: #6b4d00;
}

.etoile-plus-analysis .rank-pill {
  background: #fff6d9;
}

.etoile-plus-analysis .rank-pill strong {
  color: #805e05;
}

.rank-analysis-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.rank-analysis-header h4 {
  margin: 0;
  font-size: 1rem;
}

.rank-analysis-header p {
  margin: 4px 0 0;
  font-size: 0.74rem;
}

.rank-analysis-header .soft-badge {
  background: #fff1c6;
  color: #775600;
}

.rank-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
  gap: 10px;
}

.rank-metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: white;
}

.rank-metric strong,
.rank-metric span,
.rank-metric small {
  display: block;
}

.rank-metric strong {
  overflow-wrap: anywhere;
  color: var(--navy-900);
  font-size: 1.02rem;
}

.rank-metric span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.rank-metric small {
  margin-top: 5px;
  color: #7b6740;
  font-size: 0.62rem;
  line-height: 1.35;
}

.rank-best-metric {
  position: relative;
  padding: 0;
}

.rank-best-trigger {
  width: 100%;
  height: 100%;
  min-height: 72px;
  padding: 13px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.rank-best-trigger:focus-visible {
  outline: 3px solid rgb(8 115 239 / 42%);
  outline-offset: 2px;
}

.rank-best-tooltip {
  position: absolute;
  z-index: 20;
  top: calc(100% + 9px);
  left: 50%;
  visibility: hidden;
  width: min(360px, calc(100vw - 48px));
  padding: 12px 13px;
  border: 1px solid #b9c9df;
  border-radius: 11px;
  background: var(--navy-900);
  box-shadow: 0 12px 28px rgb(15 35 66 / 22%);
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
}

.rank-best-trigger:focus + .rank-best-tooltip,
.rank-best-trigger:focus-visible + .rank-best-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

.rank-best-tooltip strong,
.rank-best-tooltip span,
.rank-best-tooltip small {
  display: block;
  margin: 0;
  color: white;
  font-size: 0.68rem;
  line-height: 1.45;
}

.rank-best-tooltip strong {
  margin-bottom: 4px;
  color: white;
  font-size: 0.74rem;
}

.rank-best-tooltip span + span,
.rank-best-tooltip small {
  margin-top: 5px;
}

.rank-best-tooltip small {
  color: #c7d8ef;
}

.rank-breakdown-title {
  margin: 22px 0 10px;
  font-size: 0.82rem;
}

.rank-schemes {
  display: grid;
  gap: 13px;
}

.rank-scheme {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.rank-scheme h5 {
  margin: 0 0 10px;
  color: #4f5d73;
  font-size: 0.7rem;
}

.rank-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rank-pill {
  display: grid;
  min-width: 148px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f1f6fd;
  gap: 1px;
}

.rank-pill strong {
  color: var(--blue-700);
  font-size: 0.76rem;
}

.rank-pill span,
.rank-pill small {
  color: var(--muted);
  font-size: 0.64rem;
}

.rank-pill small {
  margin-top: 2px;
}

.winning-draws-details {
  margin-top: 16px;
  border: 1px solid #d8e0eb;
  border-radius: 13px;
  background: white;
}

.winning-draws-details > summary,
.winning-draw > summary {
  cursor: pointer;
  font-weight: 850;
  list-style-position: inside;
}

.winning-draws-details > summary {
  min-height: 48px;
  padding: 14px;
  color: var(--blue-700);
  font-size: 0.76rem;
}

.winning-draws-details > summary:focus-visible,
.winning-draw > summary:focus-visible {
  border-radius: 10px;
  outline: 3px solid rgb(8 115 239 / 24%);
  outline-offset: 2px;
}

.winning-draw-list {
  display: grid;
  padding: 0 13px 13px;
  gap: 8px;
}

.winning-draw {
  --rank-tone-hue: 212;
  --rank-tone-saturation: 42%;
  --rank-tone-lightness: 97%;
  border: 1px solid hsl(var(--rank-tone-hue) var(--rank-tone-saturation) 87%);
  border-radius: 11px;
  background: hsl(
    var(--rank-tone-hue)
    var(--rank-tone-saturation)
    var(--rank-tone-lightness)
  );
}

.winning-draw > summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 38px 10px 12px;
  gap: 12px;
  font-size: 0.72rem;
  list-style: none;
}

.winning-draw > summary::-webkit-details-marker {
  display: none;
}

.winning-draw-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--blue-600);
  flex: none;
  font-size: 1rem;
  transform: translateY(-50%);
  transition: transform 150ms ease;
}

.winning-draw[open] > summary .winning-draw-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.winning-draw-identity,
.winning-draw-result {
  display: flex;
}

.winning-draw-identity {
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.winning-draw-identity small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winning-draw-result {
  align-items: center;
  justify-content: flex-end;
  flex: none;
  gap: 8px;
  color: #536079;
  font-size: 0.68rem;
}

.winning-draw-result .soft-badge {
  border: 1px solid hsl(var(--rank-tone-hue) var(--rank-tone-saturation) 82%);
  background: hsl(var(--rank-tone-hue) var(--rank-tone-saturation) 90%);
  color: hsl(var(--rank-tone-hue) 56% 29%);
}

.winning-draw-content {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.winning-draw-content .ball {
  width: 34px;
  height: 34px;
  font-size: 0.78rem;
}

.draw-rank-list {
  display: grid;
  margin-top: 12px;
  gap: 6px;
}

.draw-rank-row {
  --rank-tone-hue: 212;
  --rank-tone-saturation: 42%;
  --rank-tone-lightness: 97%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid hsl(var(--rank-tone-hue) var(--rank-tone-saturation) 88%);
  border-radius: 9px;
  background: hsl(
    var(--rank-tone-hue)
    var(--rank-tone-saturation)
    var(--rank-tone-lightness)
  );
  gap: 12px;
  font-size: 0.68rem;
}

.draw-rank-row div {
  display: grid;
  gap: 1px;
}

.draw-rank-row small {
  color: var(--muted);
  font-size: 0.62rem;
}

.draw-rank-row > span {
  color: #42516a;
  text-align: right;
}

.rank-more {
  min-height: 42px;
  margin: 0 13px 13px;
  font-size: 0.72rem;
}

.rank-progress {
  min-height: 1.1rem;
  margin: 0 13px 9px;
}

.rank-load-error {
  margin: 0 13px 9px;
  padding: 9px 10px;
  border: 1px solid #e7b8bf;
  border-radius: 9px;
  background: #fff4f5;
  color: #842f3e !important;
  font-size: 0.68rem;
}

.rank-omitted {
  margin: 0 13px 13px;
}

.rank-zero {
  margin: 16px 0 0;
  padding: 13px;
  border-radius: 11px;
  background: white;
  font-size: 0.74rem;
}

.rank-warning {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #ead7a5;
  border-radius: 12px;
  background: #fff9e9;
  color: #5f512f;
}

.rank-warning strong {
  font-size: 0.72rem;
}

.rank-warning p {
  margin: 4px 0 0;
  color: #71613a;
  font-size: 0.68rem;
  line-height: 1.45;
}

.code-check-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.code-check-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.code-check-header h4 {
  margin: 0;
  font-size: 1rem;
}

.code-check-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.code-status-badge {
  max-width: 250px;
  text-align: center;
}

.code-status-badge.is-winning {
  background: #d9f2e8;
  color: #176747;
}

.code-status-badge.is-not-winning {
  background: #edf1f7;
  color: #536079;
}

.code-status-badge.is-unavailable {
  background: #fff1c6;
  color: #775600;
}

.code-check-list {
  display: grid;
  margin-top: 14px;
  gap: 8px;
}

.code-check-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #8c96a8;
  border-radius: 11px;
  background: white;
  gap: 6px 14px;
}

.code-check-item.is-winning {
  border-left-color: var(--success);
}

.code-check-item.is-not-winning {
  border-left-color: #7d8799;
}

.code-check-item.is-unavailable {
  border-left-color: var(--gold-500);
}

.code-check-identity {
  display: grid;
  gap: 2px;
}

.code-check-identity strong {
  color: #4f5d73;
  font-size: 0.69rem;
}

.code-check-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.65rem;
}

.code-check-error {
  margin: 14px 0 0;
  padding: 12px 13px;
  border: 1px solid #ead7a5;
  border-radius: 11px;
  background: #fff9e9;
  color: #6a592f;
  font-size: 0.74rem;
}

.matching-grids {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.matching-grids h4 {
  margin: 0 0 13px;
  font-size: 0.86rem;
}

.matching-grid-list {
  display: grid;
  gap: 10px;
}

.matching-grid {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.matching-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.occurrence-list.compact {
  margin-bottom: 0;
  padding-left: 20px;
  gap: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.stats-block {
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.stats-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.stats-block + .stats-block,
.stats-split {
  margin-top: 34px;
}

.subsection-heading {
  margin-bottom: 20px;
}

.subsection-heading h3 {
  margin: 0;
  font-size: 1.04rem;
}

.subsection-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  gap: 12px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 145px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fafc;
}

.metric-card::after {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #edf1f7;
  content: "";
  right: -27px;
  bottom: -30px;
}

.metric-accent-blue {
  border-color: #b9d8ff;
  background: #f1f7ff;
}

.metric-accent-pink {
  border-color: #f4c1d3;
  background: #fff5f8;
}

.metric-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.metric-card dd {
  margin: 12px 0 2px;
  font-size: clamp(1.38rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.metric-card small {
  color: #7a8496;
  font-size: 0.67rem;
}

.main-only-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  gap: 24px;
}

.main-only-summary > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy-900);
  color: white;
  font-weight: 900;
  place-items: center;
}

.main-only-summary p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.main-only-summary dl {
  display: flex;
  margin: 0;
  gap: 26px;
  text-align: right;
}

.main-only-summary dt {
  color: var(--muted);
  font-size: 0.64rem;
}

.main-only-summary dd {
  margin: 2px 0 0;
  font-size: 1rem;
  font-weight: 900;
}

.legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 0.7rem;
}

.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
}

.legend-main {
  background: var(--blue-600);
}

.legend-special {
  background: var(--pink-600);
}

.frequency-groups {
  display: grid;
  gap: 22px;
}

.frequency-segment {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fafbfc;
}

.frequency-segment > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.frequency-segment h4 {
  margin: 0;
  font-size: 0.9rem;
}

.frequency-segment header span {
  color: var(--muted);
  font-size: 0.7rem;
}

.frequency-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.75fr);
  gap: 22px;
}

.frequency-column h5 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.frequency-list {
  display: grid;
  margin: 0;
  gap: 8px;
}

.frequency-row {
  display: grid;
  grid-template-columns: 30px minmax(80px, 1fr) 56px 82px;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
}

.frequency-row strong {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-700);
  place-items: center;
}

.frequency-column.special .frequency-row strong {
  background: var(--pink-100);
  color: #ab2455;
}

.frequency-row span {
  color: var(--muted);
  text-align: right;
}

progress {
  overflow: hidden;
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: #e6eaf0;
}

progress::-webkit-progress-bar {
  border-radius: 99px;
  background: #e6eaf0;
}

progress::-webkit-progress-value {
  border-radius: 99px;
  background: var(--blue-600);
}

progress::-moz-progress-bar {
  border-radius: 99px;
  background: var(--blue-600);
}

.frequency-column.special progress::-webkit-progress-value,
.parity-row progress::-webkit-progress-value {
  background: var(--pink-600);
}

.frequency-column.special progress::-moz-progress-bar,
.parity-row progress::-moz-progress-bar {
  background: var(--pink-600);
}

.frequency-details {
  margin-top: 13px;
}

.frequency-details summary {
  width: max-content;
  color: var(--blue-700);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}

.frequency-details .frequency-list {
  margin-top: 12px;
}

.stats-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
}

.compact-block {
  width: 100%;
  min-width: 0;
  margin-top: 0 !important;
  padding: 21px;
  border: 1px solid var(--line) !important;
  border-radius: 17px;
  background: #fafbfc;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td:nth-child(2),
th:nth-child(2) {
  text-align: center;
}

td:last-child,
th:last-child {
  text-align: right;
}

.pair,
.number-combination {
  display: inline-flex;
  gap: 5px;
}

.pair span,
.number-combination span {
  display: grid;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 850;
  place-items: center;
}

.combination-count-button {
  position: relative;
  min-width: 48px;
  padding: 7px 24px 7px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--blue-700);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  transition:
    border-color var(--motion-medium) ease,
    background-color var(--motion-medium) ease,
    box-shadow var(--motion-medium) var(--ease-premium),
    transform var(--motion-medium) var(--ease-premium);
}

.combination-count-button::after {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-65%) rotate(45deg);
  transition: transform var(--motion-medium) var(--ease-spring);
}

.combination-count-button[aria-expanded="true"] {
  border-color: #b8d9ff;
  background: var(--blue-100);
  box-shadow: 0 8px 24px rgb(8 115 239 / 12%);
}

.combination-count-button[aria-expanded="true"]::after {
  transform: translateY(-35%) rotate(225deg);
}

.combination-count-button:focus-visible {
  outline: 3px solid rgb(8 115 239 / 24%);
  outline-offset: 2px;
}

.combination-count-button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.7;
}

.combination-detail-row > td {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: normal;
}

.combination-detail-panel {
  display: grid;
  margin: 4px 2px 2px;
  padding: 14px;
  border: 1px solid #cfe1f7;
  border-radius: 15px;
  background:
    radial-gradient(circle at 92% 0%, rgb(8 115 239 / 9%), transparent 15rem),
    #f7faff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 90%);
  gap: 12px;
}

.combination-detail-panel.is-detail-entering {
  animation: details-content-enter 420ms var(--ease-premium) both;
}

.combination-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.combination-detail-heading > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.combination-detail-heading strong {
  color: var(--ink);
  font-size: 0.8rem;
}

.combination-detail-heading small,
.combination-detail-progress {
  color: var(--muted);
  font-size: 0.66rem;
}

.combination-detail-loading,
.combination-detail-error {
  display: flex;
  align-items: center;
  min-height: 74px;
  justify-content: center;
  color: var(--muted);
  gap: 9px;
  text-align: center;
}

.combination-detail-error {
  flex-direction: column;
}

.combination-detail-error p,
.combination-detail-progress {
  margin: 0;
}

.combination-draw-list {
  padding: 0;
}

.combination-draw {
  --rank-tone-hue: 212;
  --rank-tone-saturation: 46%;
  --rank-tone-lightness: 97%;
}

.combination-match-label {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
}

.combination-draw .ball.is-combination-match {
  border-color: #9bc9ff;
  background: var(--blue-600);
  box-shadow:
    0 8px 22px rgb(8 115 239 / 22%),
    inset 0 0 0 1px rgb(255 255 255 / 22%);
  color: white;
}

.combination-second-draw {
  display: grid;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid hsl(212 42% 88%);
  gap: 8px;
}

.combination-second-draw > strong {
  color: var(--muted);
  font-size: 0.68rem;
}

@media (hover: hover) and (pointer: fine) {
  .combination-count-button:hover {
    border-color: #b8d9ff;
    background: var(--blue-100);
    box-shadow: 0 8px 24px rgb(8 115 239 / 11%);
    transform: translateY(-1px);
  }
}

.stats-split-single {
  grid-template-columns: 1fr;
}

.distribution-list,
.repetition-list {
  display: grid;
  gap: 10px;
}

.parity-row,
.repetition-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.6fr) minmax(100px, 1fr) 55px;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
}

.parity-row span:last-child,
.repetition-row span:last-child {
  color: var(--muted);
  text-align: right;
}

.sum-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  gap: 10px;
}

.sum-grid dt {
  color: var(--muted);
  font-size: 0.62rem;
}

.sum-grid dd {
  margin: 2px 0 0;
  font-size: 1.03rem;
  font-weight: 900;
}

.update-stamp {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: right;
}

.error-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
  padding: 20px;
  border: 1px solid #f1b7c2;
  border-radius: 15px;
  background: #fff4f6;
  gap: 20px;
  color: #7d2435;
}

.error-state p {
  margin: 3px 0 0;
  font-size: 0.76rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 35px max(24px, calc((100% - 1120px) / 2));
  background: var(--navy-950);
  gap: 40px;
  color: #aebbd0;
  font-size: 0.74rem;
}

.site-footer strong {
  color: white;
}

.site-footer p {
  max-width: 570px;
  margin: 3px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  margin-top: 14px;
  gap: 8px 18px;
}

.footer-links a {
  color: #dce7f8;
  text-decoration-color: rgba(220, 231, 248, 0.36);
  text-underline-offset: 4px;
  transition: color var(--motion-fast) var(--ease-premium),
    text-decoration-color var(--motion-fast) var(--ease-premium);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: white;
  text-decoration-color: var(--game);
}

.noscript-message {
  position: fixed;
  z-index: 50;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 14px;
  border-radius: 12px;
  background: var(--danger);
  color: white;
  text-align: center;
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

@keyframes random-ball-reveal {
  0% {
    opacity: 0;
    transform: translateY(-13px) scale(0.42) rotate(-18deg);
  }

  64% {
    transform: translateY(2px) scale(1.13) rotate(4deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes random-icon-shuffle {
  from {
    transform: rotate(-8deg) scale(0.96);
  }

  to {
    transform: rotate(8deg) scale(1.06);
  }
}

/* Mouvement premium : une réponse calme et cohérente à chaque action. */
.site-header {
  transition:
    background-color var(--motion-medium) var(--ease-premium),
    border-color var(--motion-medium) var(--ease-premium),
    box-shadow var(--motion-medium) var(--ease-premium);
}

.header-inner {
  transition: min-height var(--motion-medium) var(--ease-premium);
}

body.is-scrolled .site-header {
  border-bottom-color: rgb(255 255 255 / 14%);
  background: rgb(9 18 36 / 88%);
  box-shadow: 0 10px 34px rgb(4 10 24 / 17%);
}

body.is-scrolled .header-inner {
  min-height: 64px;
}

.brand,
.primary-nav a,
.status-dot,
.data-status {
  transition:
    color var(--motion-fast) ease,
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-premium),
    background-color var(--motion-fast) ease,
    box-shadow var(--motion-medium) var(--ease-premium);
}

.primary-nav a {
  position: relative;
}

.primary-nav a::after {
  position: absolute;
  right: 12px;
  bottom: 3px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: #78b8ff;
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
}

.primary-nav a.is-active {
  background: rgb(255 255 255 / 7%);
  color: white;
}

.primary-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.data-status.is-status-changing .status-dot {
  animation: status-arrival 560ms var(--ease-premium);
}

.hero::before {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(94 166 255 / 18%), transparent 67%);
  content: "";
  top: -310px;
  left: 48%;
  pointer-events: none;
  animation: hero-glow-drift 16s ease-in-out infinite alternate;
}

.motion-ready .hero-copy .eyebrow,
.motion-ready .hero-copy h1,
.motion-ready .hero-copy .hero-intro,
.motion-ready .hero-controls,
.motion-ready .essential-note {
  animation: hero-content-enter var(--motion-slow) var(--ease-premium) both;
}

.motion-ready .hero-copy h1 {
  animation-delay: 70ms;
}

.motion-ready .hero-copy .hero-intro {
  animation-delay: 150ms;
}

.motion-ready .hero-controls {
  animation-delay: 220ms;
}

.motion-ready .essential-note {
  animation-delay: 290ms;
}

.segmented-control {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  isolation: isolate;
}

.segmented-control::before {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 15px) / 2);
  border-radius: 10px;
  background: white;
  box-shadow: 0 8px 20px rgb(0 0 0 / 18%);
  content: "";
  transform: translateX(0);
  transition: transform 360ms var(--ease-spring);
}

.segmented-control[data-active="euromillions"]::before {
  transform: translateX(calc(100% + 5px));
}

.segmented-control label {
  position: relative;
  z-index: 1;
  justify-content: center;
  transition:
    color var(--motion-medium) var(--ease-premium),
    transform var(--motion-fast) var(--ease-premium);
}

.segmented-control input:checked + label {
  background: transparent;
  box-shadow: none;
}

.segmented-control.is-game-changing .game-dot {
  animation: game-dot-arrival 480ms var(--ease-spring);
}

.period-control select,
.field input,
.field textarea,
.draw-date-input-group,
.ticket-options,
.option-toggle {
  transition:
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    box-shadow var(--motion-medium) var(--ease-premium),
    transform var(--motion-fast) var(--ease-premium);
}

.period-control select.is-control-updating {
  animation: control-confirm 420ms var(--ease-premium);
}

.editorial-reveal-ready .reveal-group-pending[data-reveal-surface] {
  opacity: 0.08;
  filter: blur(10px) saturate(0.82);
  transform: translate3d(0, 72px, 0) scale(0.965);
  transition:
    opacity 680ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 980ms cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-reveal-ready
  .reveal-group-pending[data-reveal-surface].has-reveal-items {
  opacity: 0.28;
  filter: blur(4px) saturate(0.9);
  transform: translate3d(0, 56px, 0) scale(0.975);
}

.editorial-reveal-ready
  .reveal-group-pending[data-reveal-surface].is-reveal-after {
  opacity: 0.1;
  filter: blur(8px) saturate(0.84);
  transform: translate3d(0, -58px, 0) scale(0.97);
}

.editorial-reveal-ready
  .reveal-group-pending[data-reveal-surface].is-reveal-after.has-reveal-items {
  opacity: 0.24;
  filter: blur(4px) saturate(0.9);
  transform: translate3d(0, -44px, 0) scale(0.978);
}

.editorial-reveal-ready
  .reveal-group-pending[data-reveal-surface].is-reveal-visible {
  opacity: 1;
  filter: none;
  transform: none;
}

.editorial-reveal-ready .is-reveal-pending {
  --reveal-y: 38px;
  --reveal-scale: 0.985;
  --reveal-blur: 7px;
  --reveal-opacity-duration: 650ms;
  --reveal-motion-duration: 850ms;
  opacity: 0;
  filter: blur(var(--reveal-blur));
  transition:
    opacity var(--reveal-opacity-duration) cubic-bezier(0.22, 1, 0.36, 1),
    filter var(--reveal-motion-duration) cubic-bezier(0.16, 1, 0.3, 1),
    transform var(--reveal-motion-duration) cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-out-delay, 0ms);
}

.editorial-reveal-ready .is-reveal-item-before {
  transform: translate3d(0, var(--reveal-y), 0)
    scale(var(--reveal-scale));
}

.editorial-reveal-ready .is-reveal-item-after {
  transform: translate3d(0, calc(var(--reveal-y) * -0.72), 0)
    scale(var(--reveal-scale));
}

.editorial-reveal-ready .is-reveal-item-visible {
  opacity: 1;
  filter: none;
  transform: none;
  transition-delay: var(--reveal-in-delay, 0ms);
}

.editorial-reveal-ready [data-reveal-item="kicker"].is-reveal-pending {
  --reveal-y: 18px;
  --reveal-scale: 1;
  --reveal-blur: 4px;
  --reveal-opacity-duration: 480ms;
  --reveal-motion-duration: 540ms;
}

.editorial-reveal-ready [data-reveal-item="title"].is-reveal-pending {
  --reveal-y: 56px;
  --reveal-scale: 0.978;
  --reveal-blur: 10px;
  --reveal-opacity-duration: 720ms;
  --reveal-motion-duration: 960ms;
}

.editorial-reveal-ready [data-reveal-item="heading"].is-reveal-pending {
  --reveal-y: 38px;
  --reveal-blur: 7px;
  --reveal-opacity-duration: 620ms;
  --reveal-motion-duration: 780ms;
}

.editorial-reveal-ready [data-reveal-item="meta"].is-reveal-pending {
  --reveal-y: 28px;
  --reveal-blur: 5px;
  --reveal-opacity-duration: 560ms;
  --reveal-motion-duration: 680ms;
}

.editorial-reveal-ready [data-reveal-item="card"].is-reveal-pending,
.editorial-reveal-ready [data-reveal-item="content"].is-reveal-pending {
  --reveal-y: 44px;
  --reveal-scale: 0.975;
  --reveal-blur: 8px;
  --reveal-opacity-duration: 650ms;
  --reveal-motion-duration: 880ms;
}

.editorial-reveal-ready [data-reveal-item="action"].is-reveal-pending {
  --reveal-y: 30px;
  --reveal-scale: 0.95;
  --reveal-blur: 6px;
  --reveal-opacity-duration: 560ms;
  --reveal-motion-duration: 700ms;
}

.panel {
  transition:
    border-color var(--motion-medium) ease,
    box-shadow var(--motion-slow) var(--ease-premium);
}

.draw-step-button,
.calendar-trigger,
.calendar-nav,
.calendar-view-button,
.calendar-day,
.number-choice,
.random-grid-button,
.grid-icon-button,
.button,
.rank-best-trigger,
summary {
  transition:
    color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-premium),
    box-shadow var(--motion-medium) var(--ease-premium);
}

.draw-step-button > span,
.calendar-nav > span,
.calendar-trigger-icon,
.search-icon,
.reset-grid-icon {
  transition: transform var(--motion-medium) var(--ease-spring);
}

.draw-step-button:active:not([aria-disabled="true"]),
.calendar-trigger:active:not(:disabled),
.calendar-nav:active:not(:disabled),
.calendar-view-button:active,
.calendar-day:active:not(.is-unavailable),
.number-choice:active:not(:disabled),
.random-grid-button:active:not(:disabled),
.grid-icon-button:active:not(:disabled),
.button:active:not(:disabled),
.rank-best-trigger:active {
  transform: scale(0.96);
  transition-duration: var(--motion-instant);
}

.calendar-trigger[aria-expanded="true"] {
  background: var(--blue-100);
}

.calendar-trigger[aria-expanded="true"] .calendar-trigger-icon {
  transform: translateY(-1px) scale(1.06);
}

.calendar-popover {
  transform-origin: top left;
}

.calendar-popover.is-opening {
  animation: calendar-popover-enter 240ms var(--ease-premium) both;
}

.calendar-popover.is-closing {
  pointer-events: none;
}

.calendar-grid.is-calendar-changing {
  animation: calendar-content-enter 300ms var(--ease-premium) both;
}

.calendar-view-button[aria-pressed="true"] {
  transform: translateY(-1px);
}

.is-game-content-entering {
  animation: game-content-enter 420ms var(--ease-premium) both;
}

.hero-stage {
  transition:
    opacity 260ms ease,
    filter 320ms var(--ease-premium),
    transform 340ms var(--ease-premium);
}

body.is-game-switching .hero-stage {
  opacity: 0;
  filter: blur(10px);
  transform: translate3d(0, -28px, 0) scale(0.975);
}

.hero.is-game-arriving .hero-stage {
  animation: game-hero-arrival 1080ms var(--ease-premium) both;
}

html.is-experience-resetting {
  scroll-behavior: auto !important;
}

html.is-experience-resetting .reveal-group-pending,
html.is-experience-resetting .is-reveal-pending {
  transition: none !important;
}

.number-choice.is-choice-feedback[aria-pressed="true"] {
  animation: manual-choice-settle 500ms var(--ease-spring);
}

.number-choice.is-choice-feedback[aria-pressed="true"]::after {
  animation: manual-choice-ring 480ms var(--ease-premium);
}

.number-choice.is-choice-feedback[aria-pressed="false"] {
  animation: manual-choice-remove 300ms var(--ease-premium);
}

.number-choice.is-choice-denied {
  animation: choice-denied 360ms ease-out;
}

.selection-ball {
  animation: selection-ball-enter 360ms var(--ease-spring) both;
  animation-delay: calc(var(--stagger-index, 0) * 28ms);
}

.mini-ball.is-leaving {
  animation: selection-ball-leave 200ms var(--ease-premium) both;
}

.selection-counter.is-counter-updating {
  animation: counter-update 300ms var(--ease-premium);
}

.grid-equivalence {
  transition:
    border-color var(--motion-medium) ease,
    background-color var(--motion-medium) ease,
    color var(--motion-medium) ease,
    transform var(--motion-medium) var(--ease-premium),
    box-shadow var(--motion-medium) var(--ease-premium);
}

.grid-equivalence.is-equivalence-updating {
  animation: equivalence-update 360ms var(--ease-premium);
}

.is-reset-feedback .selection-recap,
.is-reset-feedback .grid-equivalence {
  animation: reset-settle 380ms var(--ease-premium);
}

.selection-message.is-message-entering,
.input-error.is-message-entering,
.error-state.is-message-entering {
  animation: message-enter 320ms var(--ease-premium) both;
}

.draw-date-input.is-input-invalid {
  animation: input-invalid 320ms ease-out;
}

.winning-draws-details[open] .winning-draw-list,
.winning-draw[open] .winning-draw-content,
.frequency-details[open] .frequency-list {
  animation: details-content-enter 280ms var(--ease-premium) both;
}

.ticket-options-chevron,
.winning-draw-chevron {
  transition: transform var(--motion-medium) var(--ease-spring);
}

.option-toggle input {
  position: relative;
  width: 44px;
  height: 26px;
  margin-top: 0;
  border: 1px solid #c8cfda;
  border-radius: 999px;
  appearance: none;
  background: #e3e7ed;
  cursor: pointer;
  transition:
    border-color var(--motion-medium) ease,
    background-color var(--motion-medium) ease,
    box-shadow var(--motion-medium) var(--ease-premium);
}

.option-toggle input::before {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 7px rgb(20 30 48 / 23%);
  content: "";
  transform: translateX(0);
  transition: transform 320ms var(--ease-spring);
}

.option-toggle input:checked {
  border-color: var(--blue-600);
  background: var(--blue-600);
}

.option-toggle input:checked::before {
  transform: translateX(18px);
}

.option-toggle input:focus-visible {
  outline: 3px solid rgb(8 115 239 / 28%);
  outline-offset: 2px;
}

.result-region {
  position: relative;
  transition:
    min-height var(--motion-medium) var(--ease-premium),
    background-color var(--motion-medium) ease,
    border-color var(--motion-medium) ease,
    box-shadow var(--motion-medium) var(--ease-premium);
}

.result-region.is-height-morphing {
  overflow: clip;
}

.result-region.is-region-entering {
  animation: region-enter 620ms var(--ease-premium) both;
}

.result-region.is-region-entering .draw-card,
.result-region.is-region-entering .verdict-card {
  animation: result-card-enter 760ms var(--ease-premium) both;
}

.result-region.is-region-entering .draw-card > .ball-row .ball,
.result-region.is-region-entering .draw-card .draw-extra .ball,
.result-region.is-region-entering .verdict-card > .ball-row .ball {
  animation: result-ball-enter 520ms var(--ease-spring) both;
  animation-delay: calc(var(--stagger-index, 0) * 54ms + 130ms);
}

.result-region.is-region-entering .draw-card-header,
.result-region.is-region-entering .draw-card > .ball-row,
.result-region.is-region-entering .draw-extra,
.result-region.is-region-entering .archived-winning-codes {
  animation: draw-content-enter 680ms var(--ease-premium) both;
}

.result-region.is-region-entering .draw-card > .ball-row {
  animation-delay: 70ms;
}

.result-region.is-region-entering .draw-extra {
  animation-delay: 150ms;
}

.result-region.is-region-entering .archived-winning-codes {
  animation-delay: 220ms;
}

#draw-result .draw-list {
  transform-origin: center top;
  transition:
    opacity 220ms ease,
    filter 300ms var(--ease-premium),
    transform 340ms var(--ease-premium);
}

#draw-result.is-draw-refreshing .draw-list {
  opacity: 0.68;
  filter: blur(1.2px) saturate(0.9);
  transform: translate3d(
      calc(var(--motion-direction, 0) * -12px),
      0,
      0
    )
    scale(0.995);
}

#draw-result.is-draw-refreshing::after {
  position: absolute;
  z-index: 8;
  top: 0;
  right: 24px;
  left: 24px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--game),
    var(--game-special),
    transparent
  );
  content: "";
  transform-origin: left;
  animation: draw-refresh-track 920ms ease-in-out infinite;
}

.draw-refresh-status {
  position: absolute;
  z-index: 9;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 999px;
  background: rgb(7 17 37 / 78%);
  box-shadow: 0 14px 30px rgb(0 0 0 / 18%);
  gap: 8px;
  color: white;
  font-size: 0.72rem;
  font-weight: 760;
  pointer-events: none;
  backdrop-filter: blur(16px);
  animation: draw-refresh-status-enter 300ms var(--ease-premium) both;
}

.draw-refresh-status .spinner {
  width: 15px;
  height: 15px;
  border-color: rgb(255 255 255 / 32%);
  border-top-color: white;
}

.loading-state {
  position: relative;
  overflow: hidden;
  border: 1px solid #e0e6ef;
  background: linear-gradient(110deg, #f8f9fb 25%, #f2f6fc 48%, #f8f9fb 72%);
  background-size: 220% 100%;
  animation: loading-surface 1.55s ease-in-out infinite;
}

.loading-state.is-inline {
  min-height: 54px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
}

.stats-panel {
  position: relative;
}

.stats-panel::before {
  position: absolute;
  top: 0;
  right: var(--radius-xl);
  left: var(--radius-xl);
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--blue-600), var(--pink-600), transparent);
  content: "";
  opacity: 0;
  transform: scaleX(0.2);
  transition:
    opacity var(--motion-fast) ease,
    transform var(--motion-slow) var(--ease-premium);
}

.stats-panel.is-refreshing::before {
  opacity: 0.8;
  transform: scaleX(1);
  animation: stats-refresh-line 1.15s ease-in-out infinite alternate;
}

#stats-content {
  transition:
    opacity var(--motion-medium) ease,
    transform var(--motion-medium) var(--ease-premium);
}

#stats-content.is-refreshing {
  opacity: 0.42;
  pointer-events: none;
  transform: translateY(3px);
}

[data-reveal-group].is-first-reveal .frequency-row progress,
[data-reveal-group].is-first-reveal .parity-row progress,
[data-reveal-group].is-first-reveal .repetition-row progress {
  animation: progress-enter 560ms var(--ease-premium) both;
  transform-origin: left center;
}

.metric-card,
.frequency-segment,
.compact-block,
.main-only-summary,
.draw-card,
.verdict-card,
.rank-metric,
.matching-grid,
.winning-draw,
.archived-code {
  transition:
    border-color var(--motion-medium) ease,
    background-color var(--motion-medium) ease;
}

.metric-card::after {
  transition:
    transform var(--motion-slow) var(--ease-premium),
    background-color var(--motion-medium) ease;
}

.winning-draw.is-page-entering {
  animation: page-row-enter 360ms var(--ease-premium) both;
  animation-delay: calc(var(--stagger-index, 0) * 34ms);
}

.rank-best-trigger.is-rank-activating {
  animation: control-confirm 420ms var(--ease-premium);
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover {
    opacity: 0.92;
    transform: translateY(-1px);
  }

  .primary-nav a:hover {
    background: rgb(255 255 255 / 9%);
    color: white;
  }

  .draw-step-button:hover:not([aria-disabled="true"]) {
    border-color: #8ebff5;
    background: var(--blue-100);
  }

  .calendar-trigger:hover:not(:disabled),
  .calendar-nav:hover:not(:disabled),
  .calendar-day:hover:not(.is-unavailable, .is-selected) {
    background: var(--blue-100);
  }

  .calendar-nav:hover:not(:disabled),
  .calendar-view-button:hover {
    color: var(--blue-700);
  }

  .button-primary:hover:not(:disabled) {
    background: var(--blue-700);
  }

  .random-grid-button:hover:not(:disabled),
  .grid-icon-button:hover:not(:disabled) {
    border-color: #98c3f5;
    background: var(--blue-100);
    box-shadow: 0 7px 18px rgb(8 115 239 / 12%);
  }

  .number-choice:hover:not(:disabled)[aria-pressed="false"] {
    border-color: var(--choice-accent);
    color: var(--choice-accent);
  }

  .special-picker .number-choice:hover:not(:disabled)[aria-pressed="false"] {
    border-color: var(--choice-accent);
    color: var(--choice-accent);
  }

  .number-choice:hover:not(:disabled)[aria-pressed="true"] {
    color: white;
    box-shadow: 0 12px 26px var(--choice-glow);
  }

  .rank-best-trigger:hover {
    background: #f2f7ff;
  }

  .rank-best-metric:hover .rank-best-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .ticket-options > summary:hover,
  .winning-draws-details > summary:hover,
  .winning-draw > summary:hover,
  .frequency-details summary:hover {
    background: rgb(8 115 239 / 5%);
  }

  .primary-nav a:hover,
  .draw-step-button:hover:not([aria-disabled="true"]),
  .calendar-nav:hover:not(:disabled),
  .calendar-day:hover:not(.is-unavailable, .is-selected),
  .number-choice:hover:not(:disabled),
  .random-grid-button:hover:not(:disabled),
  .grid-icon-button:hover:not(:disabled),
  .button:hover:not(:disabled),
  .rank-best-trigger:hover {
    transform: translateY(-2px);
  }

  #draw-previous:hover:not([aria-disabled="true"]) > span,
  #calendar-previous:hover:not(:disabled) > span {
    transform: translateX(-2px);
  }

  #draw-next:hover:not([aria-disabled="true"]) > span,
  #calendar-next:hover:not(:disabled) > span {
    transform: translateX(2px);
  }

  .search-icon-button:hover:not(:disabled) .search-icon {
    transform: scale(1.08) rotate(-3deg);
  }

  .reset-grid-button:hover:not(:disabled) .reset-grid-icon {
    transform: rotate(7deg) translateY(-1px);
  }
}

@keyframes hero-content-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-glow-drift {
  from {
    opacity: 0.55;
    transform: translate3d(-4%, -2%, 0) scale(0.96);
  }

  to {
    opacity: 0.9;
    transform: translate3d(5%, 4%, 0) scale(1.05);
  }
}

@keyframes status-arrival {
  0% {
    transform: scale(0.65);
  }

  55% {
    box-shadow: 0 0 0 9px rgb(22 131 94 / 10%);
    transform: scale(1.24);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes game-dot-arrival {
  0% {
    opacity: 0.45;
    transform: scale(0.55);
  }

  65% {
    transform: scale(1.35);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes control-confirm {
  45% {
    box-shadow: 0 0 0 5px rgb(8 115 239 / 12%);
    transform: scale(0.985);
  }
}

@keyframes calendar-popover-enter {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes calendar-content-enter {
  from {
    opacity: 0;
    transform: translateX(calc(var(--calendar-direction, 0) * 12px)) translateY(2px);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

@keyframes game-content-enter {
  from {
    opacity: 0.35;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes game-hero-arrival {
  0% {
    opacity: 0;
    filter: blur(14px);
    transform: translate3d(0, 52px, 0) scale(0.955);
  }

  55% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@keyframes manual-choice-settle {
  0% {
    transform: translateY(3px) scale(0.84);
  }

  62% {
    transform: translateY(-2px) scale(1.07);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes manual-choice-ring {
  0% {
    opacity: 0.36;
    transform: scale(0.78);
  }

  56% {
    opacity: 0.18;
    transform: scale(1.24);
  }

  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

@keyframes manual-choice-remove {
  48% {
    opacity: 0.62;
    transform: scale(0.86);
  }
}

@keyframes choice-denied {
  30% {
    transform: translateX(-3px);
  }

  60% {
    transform: translateX(3px);
  }
}

@keyframes selection-ball-enter {
  0% {
    opacity: 0;
    transform: translateY(9px) scale(0.66);
  }

  68% {
    opacity: 1;
    transform: translateY(-2px) scale(1.07);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes selection-ball-leave {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(6px) scale(0.72);
  }
}

@keyframes counter-update {
  45% {
    color: var(--blue-700);
    transform: translateY(-2px) scale(1.05);
  }
}

@keyframes equivalence-update {
  45% {
    box-shadow: 0 8px 22px rgb(24 68 125 / 9%);
    transform: translateY(-1px);
  }
}

@keyframes reset-settle {
  from {
    opacity: 0.55;
    transform: scale(0.985);
  }
}

@keyframes message-enter {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes input-invalid {
  30% {
    transform: translateX(-3px);
  }

  60% {
    transform: translateX(3px);
  }
}

@keyframes details-content-enter {
  from {
    opacity: 0;
    transform: translateY(-7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes region-enter {
  from {
    opacity: 0.12;
    filter: blur(8px) saturate(0.88);
    transform: translateX(calc(var(--motion-direction, 0) * 32px))
      translateY(14px) scale(0.982);
  }

  to {
    opacity: 1;
    filter: none;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes result-card-enter {
  from {
    border-color: transparent;
    box-shadow: 0 0 0 rgb(0 0 0 / 0%);
    opacity: 0.18;
    filter: blur(9px) saturate(0.9);
    transform: translate3d(
        calc(var(--motion-direction, 0) * 26px),
        12px,
        0
      )
      scale(0.975);
  }

  to {
    opacity: 1;
    filter: none;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes draw-content-enter {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translate3d(0, 18px, 0);
  }

  to {
    opacity: 1;
    filter: none;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes result-ball-enter {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.75);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loading-surface {
  50% {
    background-position: 100% 0;
  }
}

@keyframes draw-refresh-track {
  0% {
    opacity: 0.18;
    transform: scaleX(0.08);
  }

  55% {
    opacity: 0.92;
    transform: scaleX(0.72);
  }

  100% {
    opacity: 0.22;
    transform: scaleX(1);
  }
}

@keyframes draw-refresh-status-enter {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translate3d(0, -8px, 0) scale(0.96);
  }

  to {
    opacity: 1;
    filter: none;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes stats-refresh-line {
  from {
    opacity: 0.35;
  }

  to {
    opacity: 0.95;
  }
}

@keyframes progress-enter {
  from {
    opacity: 0.35;
    transform: scaleX(0.08);
  }

  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes page-row-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .primary-nav {
    display: none;
  }

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

  .verdict-details.is-multiple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .frequency-columns,
  .stats-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner {
    width: min(100% - 24px, 1120px);
    min-height: 64px;
  }

  .data-status {
    max-width: 112px;
    text-align: right;
  }

  .header-actions {
    gap: 7px;
  }

  .brand small {
    max-width: 150px;
  }

  .language-toggle {
    min-height: 32px;
    padding: 4px 7px;
  }

  .hero {
    padding: 52px 20px 42px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.7rem);
  }

  .hero-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control label {
    flex: 1;
    justify-content: center;
    padding-right: 10px;
    padding-left: 10px;
  }

  .period-control select {
    width: 100%;
  }

  .essential-note {
    margin-top: 28px;
  }

  .content-shell {
    width: min(100% - 20px, 1120px);
    margin-top: 20px;
    gap: 16px;
  }

  .panel {
    padding: 22px 17px;
    border-radius: 20px;
  }

  .section-heading,
  .subsection-heading {
    align-items: start;
    flex-direction: column;
    gap: 7px;
  }

  .section-meta {
    margin-top: 0;
    text-align: left;
  }

  .search-form,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-form .button {
    width: 100%;
  }

  .search-form .search-icon-button {
    width: 50px;
    margin-top: 0;
    align-self: flex-end;
  }

  .calendar-popover[data-view="year"] {
    left: -18px;
    width: calc(100vw - 20px);
  }

  .calendar-grid.is-year {
    grid-template-columns: 1fr;
  }

  .calendar-mini-grid .calendar-day {
    min-height: 40px;
  }

  .grid-heading-tools {
    width: 100%;
    justify-items: stretch;
  }

  .grid-heading-tools .section-meta {
    text-align: left;
  }

  .grid-heading-actions {
    justify-content: stretch;
  }

  .random-grid-button {
    min-width: 0;
    flex: 1;
    justify-content: center;
  }

  .number-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }

  .number-choice {
    width: 100%;
    min-width: 0;
  }

  .selection-recap {
    grid-template-columns: 1fr;
  }

  .ticket-options-grid,
  .code-check-item {
    grid-template-columns: 1fr;
  }

  .grid-equivalence,
  .matching-grid-header,
  .code-check-header,
  .archived-code {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-check-item .published-prize,
  .archived-code .published-prize {
    text-align: left;
  }

  .code-status-badge {
    max-width: none;
    text-align: left;
  }

  .verdict-details,
  .verdict-details.is-multiple {
    grid-template-columns: 1fr;
  }

  .rank-analysis-header,
  .winning-draw > summary,
  .draw-rank-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-summary {
    grid-template-columns: 1fr;
  }

  .rank-best-tooltip {
    left: 0;
    width: min(100%, calc(100vw - 54px));
    transform: translateY(-4px);
  }

  .rank-best-trigger:focus + .rank-best-tooltip,
  .rank-best-trigger:focus-visible + .rank-best-tooltip {
    transform: translateY(0);
  }

  .rank-pill {
    width: 100%;
  }

  .winning-draw-result {
    justify-content: flex-start;
  }

  .combination-detail-panel {
    margin-right: 0;
    margin-left: 0;
    padding: 12px;
  }

  .combination-detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .combination-draw > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .combination-draw .winning-draw-result {
    flex-wrap: wrap;
  }

  .combination-draw .ball-row {
    flex-wrap: wrap;
  }

  .winning-draw-identity small {
    overflow: visible;
    text-overflow: initial;
    white-space: normal;
  }

  .draw-rank-row > span {
    text-align: left;
  }

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

  .metric-card {
    min-height: 118px;
  }

  .main-only-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .main-only-summary dl {
    justify-content: space-between;
    text-align: left;
  }

  .frequency-row {
    grid-template-columns: 28px minmax(65px, 1fr) 47px;
  }

  .frequency-row .last-date {
    display: none;
  }

  .legend {
    flex-wrap: wrap;
  }

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

  .site-footer {
    align-items: start;
    flex-direction: column;
    padding: 30px 20px;
    gap: 18px;
  }
}

@media (max-width: 680px) and (hover: hover) and (pointer: fine) {
  .rank-best-metric:hover .rank-best-tooltip {
    transform: translateY(0);
  }
}

@media (max-width: 390px) {
  .draw-date-stepper {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 6px;
  }

  .draw-step-button {
    width: 40px;
  }

  .field .draw-date-input {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 0.82rem;
  }

  .input-error {
    margin-left: 46px;
  }

  .number-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .brand small {
    display: none;
  }

  .data-status {
    max-width: 88px;
    font-size: 0.68rem;
  }
}

/* Orbital Archives — visual chapter system */

body[data-game="loto"] {
  --game: #0873ef;
  --game-deep: #0753c7;
  --game-special: #e64179;
  --game-glow: rgb(8 115 239 / 42%);
  --game-soft: #eaf4ff;
}

body[data-game="euromillions"] {
  --game: #3152d4;
  --game-deep: #172b89;
  --game-special: #e7ad16;
  --game-glow: rgb(49 82 212 / 42%);
  --game-soft: #eef0ff;
}

body {
  background: #f6f7fa;
  transition: background-color 420ms ease;
}

.site-header {
  --page-progress: 0;
  min-height: 64px;
  border-bottom-color: rgb(255 255 255 / 8%);
  background: rgb(5 9 20 / 82%);
  box-shadow: 0 10px 35px rgb(0 0 0 / 10%);
  backdrop-filter: blur(24px) saturate(145%);
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  width: calc(var(--page-progress) * 100%);
  height: 2px;
  background: linear-gradient(90deg, var(--game), var(--game-special));
  box-shadow: 0 0 14px var(--game-glow);
  content: "";
  transition: background 420ms ease;
}

.header-inner {
  width: min(1320px, calc(100% - 48px));
  min-height: 64px;
}

.primary-nav {
  padding: 4px;
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: 13px;
  background: rgb(255 255 255 / 4%);
}

.primary-nav a {
  padding: 7px 13px;
}

.hero {
  --hero-scroll-progress: 0;
  display: flex;
  min-height: min(850px, calc(100svh - 64px));
  padding: clamp(76px, 9vh, 118px) max(24px, calc((100% - 1220px) / 2)) 42px;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 78% 42%, var(--game-glow), transparent 26rem),
    radial-gradient(circle at 12% 108%, rgb(230 65 121 / 18%), transparent 34rem),
    linear-gradient(145deg, #050914 0%, #09142b 58%, #101e3c 100%);
  isolation: isolate;
  transition: background-color 420ms ease;
}

.hero::before {
  z-index: -1;
  top: -38%;
  left: 48%;
  width: 760px;
  height: 760px;
  background: radial-gradient(circle, var(--game-glow), transparent 66%);
  opacity: calc(0.9 - var(--hero-scroll-progress) * 0.45);
  animation: hero-glow-drift 14s ease-in-out infinite alternate;
  transition: background 420ms ease;
}

.hero::after {
  z-index: -1;
  right: -170px;
  bottom: -310px;
  width: 620px;
  height: 620px;
  border-color: rgb(255 255 255 / 7%);
  box-shadow:
    0 0 0 72px rgb(255 255 255 / 2.2%),
    0 0 0 144px rgb(255 255 255 / 1.6%);
  transform: translateY(calc(var(--hero-scroll-progress) * 50px));
}

.hero-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  align-items: center;
  width: min(1220px, 100%);
  min-height: 430px;
  margin: 0 auto;
  gap: clamp(44px, 5vw, 76px);
}

.hero-copy {
  min-width: 0;
  width: auto;
  margin: 0;
  opacity: calc(1 - var(--hero-scroll-progress) * 0.66);
  transform: translateY(calc(var(--hero-scroll-progress) * -34px))
    scale(calc(1 - var(--hero-scroll-progress) * 0.035));
  transform-origin: left center;
}

.hero h1 {
  max-width: 780px;
  font-family: inherit;
  font-size: clamp(4.4rem, 7.8vw, 7.5rem);
  font-weight: 790;
  letter-spacing: -0.078em;
  line-height: 0.84;
}

.hero h1 span {
  background: linear-gradient(100deg, #fff 0%, #a9c8f2 46%, #7893bc 100%);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-intro {
  max-width: 590px;
  margin-top: 32px;
  color: #b9c7dc;
  font-size: clamp(1.04rem, 1.7vw, 1.25rem);
  line-height: 1.55;
}

.hero-visual {
  position: relative;
  width: min(440px, 100%);
  max-width: 100%;
  aspect-ratio: 1;
  justify-self: end;
  opacity: calc(1 - var(--hero-scroll-progress) * 0.48);
  transform: translate3d(0, calc(var(--hero-scroll-progress) * 58px), 0)
    rotate(calc(var(--hero-scroll-progress) * 5deg));
  transform-origin: center;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 50%;
  inset: 7%;
  box-shadow:
    inset 0 0 42px rgb(255 255 255 / 2%),
    0 0 62px var(--game-glow);
}

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 18px white;
  content: "";
}

.hero-orbit::before {
  top: 15%;
  left: 12%;
}

.hero-orbit::after {
  right: 5%;
  bottom: 25%;
}

.hero-orbit-outer {
  animation: hero-orbit-spin 28s linear infinite;
}

.hero-orbit-inner {
  inset: 20%;
  border-style: dashed;
  border-color: rgb(255 255 255 / 11%);
  animation: hero-orbit-spin 20s linear infinite reverse;
}

.hero-emblem {
  position: absolute;
  z-index: 2;
  width: 76%;
  height: 76%;
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(1.06) contrast(1.04);
  inset: 12%;
  -webkit-mask-image: radial-gradient(circle, #000 49%, rgb(0 0 0 / 92%) 61%, transparent 76%);
  mask-image: radial-gradient(circle, #000 49%, rgb(0 0 0 / 92%) 61%, transparent 76%);
  animation: hero-emblem-float 8s var(--ease-premium) infinite alternate;
}

.hero-visual-core {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 38%), var(--game-glow) 37%, transparent 68%);
  filter: blur(4px);
  inset: 23%;
  animation: hero-core-breathe 5s ease-in-out infinite;
}

.hero-ball {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 52px;
  height: 52px;
  border: 1px solid rgb(255 255 255 / 68%);
  border-radius: 50%;
  background: rgb(255 255 255 / 92%);
  box-shadow:
    0 14px 34px rgb(0 0 0 / 26%),
    inset 0 1px 0 white;
  color: #101b32;
  font-size: 0.92rem;
  font-weight: 900;
  place-items: center;
  animation: hero-ball-float 5.8s ease-in-out infinite alternate;
}

.hero-ball-one {
  top: 4%;
  left: 47%;
}

.hero-ball-two {
  top: 31%;
  right: -2%;
  animation-delay: -1.4s;
}

.hero-ball-three {
  bottom: 0;
  left: 42%;
  animation-delay: -2.8s;
}

.hero-ball-four {
  bottom: 19%;
  left: -1%;
  animation-delay: -4.1s;
}

.hero-ball-special {
  top: 19%;
  left: 4%;
  border-color: rgb(255 255 255 / 45%);
  background: var(--game-special);
  color: white;
  animation-delay: -3.3s;
  transition: background-color 420ms ease;
}

.hero-visual-signature {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 8%;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 14px;
  background: rgb(5 9 20 / 62%);
  box-shadow: 0 16px 36px rgb(0 0 0 / 18%);
  color: white;
  backdrop-filter: blur(16px);
}

.hero-visual-signature strong,
.hero-visual-signature span {
  display: block;
}

.hero-visual-signature strong {
  font-size: 0.74rem;
}

.hero-visual-signature span {
  color: #aebdd3;
  font-size: 0.62rem;
}

.hero-controls {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(250px, 1fr);
  align-items: end;
  width: min(760px, 100%);
  margin: 26px auto 0 max(0px, calc((100% - 1220px) / 2));
  padding: 14px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 22px;
  background: rgb(255 255 255 / 7%);
  box-shadow: 0 22px 54px rgb(0 0 0 / 19%);
  gap: 14px;
  backdrop-filter: blur(24px) saturate(135%);
  opacity: calc(1 - var(--hero-scroll-progress) * 0.58);
  transform: translateY(calc(var(--hero-scroll-progress) * 24px));
}

.hero-controls .segmented-control,
.hero-controls .period-control select {
  background-color: rgb(255 255 255 / 8%);
}

.hero-controls .period-control small {
  max-width: none;
}

.essential-note {
  position: relative;
  z-index: 5;
  width: min(760px, 100%);
  max-width: none;
  margin: 18px auto 0 max(0px, calc((100% - 1220px) / 2));
  padding: 0 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: calc(0.78 - var(--hero-scroll-progress) * 0.58);
}

.hero-scroll-cue {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: min(1220px, 100%);
  margin: 26px auto 0;
  gap: 10px;
  color: #9eacc2;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: calc(1 - var(--hero-scroll-progress) * 1.8);
}

.hero-scroll-cue i {
  position: relative;
  width: 22px;
  height: 32px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
}

.hero-scroll-cue i::after {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  border-radius: 999px;
  background: white;
  content: "";
  transform: translateX(-50%);
  animation: hero-scroll-dot 1.7s ease-in-out infinite;
}

.content-shell {
  display: block;
  width: 100%;
  margin: 0;
}

.panel {
  min-height: 520px;
  padding: clamp(78px, 9vw, 128px) max(24px, calc((100% - 1180px) / 2));
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.section-heading h2 {
  font-family: inherit;
  font-size: clamp(3rem, 5.4vw, 5.35rem);
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--game);
  transition: color 420ms ease;
}

.section-kicker::after {
  width: 44px;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(var(--scene-progress, 0));
  transform-origin: left;
  transition: transform 80ms linear;
}

#recherche {
  display: grid;
  grid-template-areas:
    "heading form"
    "heading result";
  grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
  align-items: start;
  overflow: visible;
  background: #fff;
  column-gap: clamp(48px, 7vw, 96px);
  row-gap: 24px;
}

#recherche .section-heading {
  position: sticky;
  top: 104px;
  grid-area: heading;
  flex-direction: column;
}

#recherche .section-kicker::before {
  content: "01 /";
}

#recherche .section-meta {
  max-width: 290px;
  text-align: left;
}

#recherche .search-form {
  grid-area: form;
  max-width: none;
}

#recherche #draw-result {
  grid-area: result;
  margin-top: 0;
}

#recherche .draw-date-stepper {
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 10px;
}

#recherche .draw-step-button,
#recherche .draw-date-input-group,
#recherche .field .draw-date-input,
#recherche .calendar-trigger,
#recherche .search-icon-button {
  height: 60px;
}

#recherche .draw-step-button {
  width: 56px;
  border-radius: 17px;
}

#recherche .draw-date-input-group {
  grid-template-columns: minmax(0, 1fr) 58px;
  border-radius: 17px;
  box-shadow: 0 12px 34px rgb(9 18 36 / 7%);
}

#recherche .field .draw-date-input {
  font-size: 1.08rem;
  font-weight: 780;
}

#recherche .calendar-trigger {
  width: 58px;
}

#recherche .search-icon-button {
  width: 60px;
  min-width: 60px;
  margin-top: 31px;
  border-radius: 18px;
  box-shadow: 0 16px 34px var(--game-glow);
}

#draw-result:not(.empty-state, .loading-state) .draw-card {
  padding: 30px;
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 8%, var(--game-glow), transparent 18rem),
    linear-gradient(145deg, #071125, #13294e);
  box-shadow: 0 24px 60px rgb(9 18 36 / 18%);
  color: white;
}

#draw-result:not(.empty-state, .loading-state) .draw-card small {
  color: #aebdd3;
}

#draw-result:not(.empty-state, .loading-state) .draw-extra {
  border-top-color: rgb(255 255 255 / 12%);
}

#draw-result:not(.empty-state, .loading-state) .archived-code {
  background: rgb(255 255 255 / 8%);
}

#draw-result:not(.empty-state, .loading-state) .archived-code code {
  color: white;
}

#draw-result:not(.empty-state, .loading-state) .archived-code small {
  color: #aebdd3;
}

#grille {
  background:
    radial-gradient(circle at 4% 2%, var(--game-glow), transparent 25rem),
    radial-gradient(circle at 96% 30%, rgb(230 65 121 / 17%), transparent 27rem),
    linear-gradient(145deg, var(--game-soft), #fff 45%, #fff4f8 100%);
  transition: background-color 420ms ease;
}

#grille .section-kicker::before {
  content: "02 /";
}

#grille .number-picker {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgb(206 219 236 / 84%);
  border-radius: 28px;
  background: rgb(255 255 255 / 82%);
  box-shadow: 0 22px 55px rgb(32 62 104 / 7%);
  backdrop-filter: blur(12px);
}

#grille .number-picker + .number-picker {
  margin-top: 18px;
}

#grille .number-choice {
  max-width: 52px;
  min-height: 48px;
  border-color: #cbd7e8;
  box-shadow: 0 5px 15px rgb(18 37 65 / 5%);
}

#grille .number-choice[aria-pressed="true"] {
  border-color: var(--choice-accent);
  background: white;
  box-shadow: 0 10px 24px var(--choice-glow);
}

#grille .special-picker .number-choice[aria-pressed="true"] {
  border-color: var(--choice-accent);
  background: white;
  box-shadow: 0 10px 24px var(--choice-glow);
}

#grille .random-grid-button {
  border-color: transparent;
  background: var(--game);
  box-shadow: 0 12px 28px var(--game-glow);
  color: white;
}

#grille .selection-recap {
  padding: 25px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 25px;
  background:
    radial-gradient(circle at 90% 0%, var(--game-glow), transparent 20rem),
    linear-gradient(145deg, #071125, #14294d);
  box-shadow: 0 24px 56px rgb(9 18 36 / 16%);
  color: white;
}

#grille .selection-recap .recap-label,
#grille .selection-recap .selection-placeholder {
  color: #aebdd3;
}

#grille .selection-recap .mini-ball {
  border-color: rgb(255 255 255 / 36%);
  box-shadow: 0 6px 16px rgb(0 0 0 / 20%);
}

#grille .ticket-options {
  border-radius: 20px;
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 14px 38px rgb(23 45 78 / 6%);
}

#grille #grid-result:not(.empty-state, .loading-state) {
  padding: 6px;
  background: white;
  box-shadow: 0 20px 54px rgb(23 45 78 / 8%);
}

#statistiques {
  background: #f1efe9;
}

#statistiques .section-kicker::before {
  content: "03 /";
}

#stats-content {
  display: grid;
  gap: 24px;
}

#statistiques .stats-block {
  margin: 0;
  padding: clamp(25px, 4vw, 38px);
  border: 1px solid rgb(216 214 207 / 88%);
  border-radius: 30px;
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 20px 55px rgb(33 37 48 / 5%);
}

#statistiques .stats-block + .stats-block,
#statistiques .stats-split {
  margin-top: 0;
}

#statistiques .metric-grid {
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
}

#statistiques .metric-card {
  min-height: 210px;
  padding: 28px;
  border-radius: 28px;
}

#statistiques .metric-card dd {
  margin-top: 28px;
  font-size: clamp(2.45rem, 5vw, 4.65rem);
  line-height: 0.96;
}

#statistiques .metric-card:first-child {
  border: 0;
  background:
    radial-gradient(circle at 90% 10%, var(--game-glow), transparent 16rem),
    #09152c;
  color: white;
}

#statistiques .metric-card:nth-child(3) {
  border: 0;
  background: linear-gradient(145deg, var(--game), var(--game-special));
  color: white;
  transition: background 420ms ease;
}

#statistiques .metric-card:first-child dt,
#statistiques .metric-card:first-child small,
#statistiques .metric-card:nth-child(3) dt,
#statistiques .metric-card:nth-child(3) small {
  color: rgb(255 255 255 / 72%);
}

#statistiques .metric-card:first-child::after,
#statistiques .metric-card:nth-child(3)::after {
  background: rgb(255 255 255 / 10%);
}

.ball-special,
.mini-ball.special {
  border-color: color-mix(in srgb, var(--game-special), white 46%);
  background: color-mix(in srgb, var(--game-special), white 82%);
  color: color-mix(in srgb, var(--game-special), #101b32 34%);
}

@keyframes hero-orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hero-emblem-float {
  from {
    transform: translateY(-5px) scale(0.99);
  }

  to {
    transform: translateY(7px) scale(1.015);
  }
}

@keyframes hero-core-breathe {
  50% {
    opacity: 0.68;
    transform: scale(1.08);
  }
}

@keyframes hero-ball-float {
  from {
    transform: translate3d(-3px, -7px, 0) rotate(-3deg);
  }

  to {
    transform: translate3d(5px, 8px, 0) rotate(4deg);
  }
}

@keyframes hero-scroll-dot {
  0%,
  100% {
    opacity: 0.45;
    transform: translate(-50%, 0);
  }

  55% {
    opacity: 1;
    transform: translate(-50%, 10px);
  }
}

@media (max-width: 960px) {
  .hero {
    min-height: 720px;
    padding: clamp(68px, 8vh, 88px) 32px 40px;
  }

  .hero-stage {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 32vw);
    min-height: 390px;
    gap: clamp(24px, 4vw, 36px);
  }

  .hero h1 {
    font-size: clamp(3.75rem, 8vw, 5.25rem);
  }

  .hero-intro {
    max-width: 460px;
  }

  .hero-visual {
    width: 100%;
    max-width: 330px;
    justify-self: end;
  }

  .hero-ball {
    width: 44px;
    height: 44px;
    font-size: 0.78rem;
  }

  .hero-visual-signature {
    display: none;
  }

  #recherche {
    display: block;
  }

  #recherche .section-heading {
    position: static;
    margin-bottom: 34px;
  }

  #recherche .search-form {
    max-width: 760px;
  }

  #recherche #draw-result {
    margin-top: 24px;
  }
}

@media (max-width: 680px) {
  .header-inner {
    width: calc(100% - 24px);
  }

  .hero {
    min-height: auto;
    padding: 56px 20px 40px;
  }

  .hero-stage {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 30px;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
    width: 100%;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(3.2rem, 14vw, 4.5rem);
    line-height: 0.88;
  }

  .hero-intro {
    max-width: 34rem;
    margin-top: 22px;
  }

  .hero-visual {
    position: relative;
    z-index: 1;
    right: auto;
    bottom: auto;
    width: min(320px, calc(100vw - 88px));
    max-width: none;
    margin: 4px auto 0;
    justify-self: center;
    opacity: calc(0.92 - var(--hero-scroll-progress) * 0.25);
    transform: translate3d(
        0,
        calc(var(--hero-scroll-progress) * 16px),
        0
      )
      rotate(calc(var(--hero-scroll-progress) * 2deg));
  }

  .hero-ball {
    width: 40px;
    height: 40px;
    font-size: 0.74rem;
  }

  .hero-ball-two {
    right: 0;
  }

  .hero-ball-four {
    left: 0;
  }

  .hero-visual-signature {
    display: none;
  }

  .hero-controls {
    grid-template-columns: 1fr;
    width: 100%;
    margin: 24px 0 0;
  }

  .hero-controls .segmented-control,
  .hero-controls .period-control select {
    width: 100%;
  }

  .essential-note {
    width: 100%;
    margin: 18px 0 0;
  }

  .hero-scroll-cue {
    display: none;
  }

  .panel {
    min-height: 0;
    padding: 66px 18px;
  }

  .section-heading h2 {
    font-size: clamp(2.8rem, 13vw, 4rem);
  }

  #recherche .draw-date-stepper {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 7px;
  }

  #recherche .draw-step-button {
    width: 44px;
  }

  #recherche .draw-date-input-group {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  #recherche .calendar-trigger {
    width: 48px;
  }

  #recherche .search-icon-button {
    width: 60px;
    min-width: 60px;
  }

  #grille .number-picker {
    padding: 18px 14px;
    border-radius: 22px;
  }

  .editorial-reveal-ready .reveal-group-pending[data-reveal-surface] {
    opacity: 0.18;
    filter: none;
    transform: translate3d(0, 40px, 0);
    transition-property: opacity, transform;
    transition-duration: 620ms, 760ms;
  }

  .editorial-reveal-ready
    .reveal-group-pending[data-reveal-surface].has-reveal-items {
    opacity: 0.42;
    filter: none;
    transform: translate3d(0, 34px, 0);
  }

  .editorial-reveal-ready
    .reveal-group-pending[data-reveal-surface].is-reveal-after {
    filter: none;
    transform: translate3d(0, -32px, 0);
  }

  .editorial-reveal-ready
    .reveal-group-pending[data-reveal-surface].is-reveal-after.has-reveal-items {
    filter: none;
    transform: translate3d(0, -32px, 0);
  }

  .editorial-reveal-ready
    .reveal-group-pending[data-reveal-surface].is-reveal-visible,
  .editorial-reveal-ready
    .reveal-group-pending[data-reveal-surface].is-reveal-visible.has-reveal-items {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .editorial-reveal-ready .is-reveal-pending {
    --reveal-y: 26px;
    --reveal-scale: 1;
    --reveal-blur: 0px;
    --reveal-opacity-duration: 500ms;
    --reveal-motion-duration: 640ms;
    filter: none;
    transition-property: opacity, transform;
    transition-duration:
      var(--reveal-opacity-duration),
      var(--reveal-motion-duration);
  }

  .editorial-reveal-ready [data-reveal-item="kicker"].is-reveal-pending {
    --reveal-y: 12px;
    --reveal-motion-duration: 430ms;
  }

  .editorial-reveal-ready [data-reveal-item="title"].is-reveal-pending {
    --reveal-y: 34px;
    --reveal-opacity-duration: 560ms;
    --reveal-motion-duration: 720ms;
  }

  .editorial-reveal-ready [data-reveal-item="heading"].is-reveal-pending,
  .editorial-reveal-ready [data-reveal-item="card"].is-reveal-pending,
  .editorial-reveal-ready [data-reveal-item="content"].is-reveal-pending {
    --reveal-y: 26px;
    --reveal-motion-duration: 640ms;
  }

  .editorial-reveal-ready [data-reveal-item="meta"].is-reveal-pending,
  .editorial-reveal-ready [data-reveal-item="action"].is-reveal-pending {
    --reveal-y: 18px;
    --reveal-motion-duration: 540ms;
  }

  .editorial-reveal-ready [data-reveal-item].is-reveal-pending {
    --reveal-scale: 1;
    --reveal-blur: 0px;
    filter: none;
    transition-property: opacity, transform;
  }

  .editorial-reveal-ready .is-reveal-item-before {
    transform: translate3d(0, var(--reveal-y), 0);
  }

  .editorial-reveal-ready .is-reveal-item-after {
    transform: translate3d(0, calc(var(--reveal-y) * -0.72), 0);
  }

  #grille .selection-recap {
    padding: 20px;
  }

  #statistiques .stats-block {
    padding: 22px 16px;
    border-radius: 24px;
  }

  #statistiques .metric-grid {
    grid-template-columns: 1fr;
  }

  #statistiques .metric-card {
    min-height: 174px;
    padding: 23px;
  }

  #statistiques .metric-card dd {
    margin-top: 20px;
    font-size: clamp(2.4rem, 13vw, 4rem);
  }
}

@media (max-width: 420px) {
  .hero {
    padding: 48px 18px 36px;
  }

  .hero-stage {
    gap: 24px;
  }

  .hero h1 {
    font-size: clamp(3.05rem, 14vw, 3.75rem);
  }

  .hero-visual {
    width: min(276px, calc(100vw - 76px));
  }

  .hero-ball {
    width: 36px;
    height: 36px;
    font-size: 0.68rem;
  }
}

/* Interactions du hasard : boules, réclames et effacement de grille. */
.hero-ball {
  padding: 0;
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  touch-action: manipulation;
}

.hero-ball > span {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  place-items: center;
  transform-style: preserve-3d;
}

.hero-ball::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgb(255 255 255 / 68%);
  border-radius: 50%;
  content: "";
  opacity: 0;
  pointer-events: none;
  inset: -5px;
  transform: scale(0.65);
}

.hero-ball:focus-visible {
  outline: 3px solid #8ac4ff;
  outline-offset: 5px;
}

.hero-ball:disabled {
  cursor: wait;
}

.hero-ball.is-hero-number-burst::after {
  animation: hero-number-burst 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-visual.is-hero-shuffling .hero-orbit-outer {
  border-color: rgb(255 255 255 / 42%);
  box-shadow:
    inset 0 0 42px rgb(255 255 255 / 8%),
    0 0 88px var(--game-glow);
  animation: hero-orbit-spin 720ms linear infinite;
}

.hero-visual.is-hero-shuffling .hero-orbit-inner {
  border-color: rgb(255 255 255 / 28%);
  animation: hero-orbit-spin 480ms linear infinite reverse;
}

.hero-visual.is-hero-shuffling .hero-emblem {
  animation: hero-emblem-charge 880ms ease-in-out infinite alternate;
}

.hero-visual.is-hero-shuffling .hero-visual-core {
  animation: hero-core-flash 520ms ease-in-out infinite alternate;
}

.hero-visual.is-hero-shuffling .hero-ball-special {
  animation: hero-star-charge 620ms cubic-bezier(0.16, 1, 0.3, 1) infinite alternate;
}

.hero-visual.is-hero-settling .hero-ball {
  animation: hero-ball-settle 780ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc((var(--hero-order, 0) + 1) * 45ms);
}

.hero-ad-stage {
  --hero-ad-inset: 22px;
  position: absolute;
  z-index: 6;
  right: max(24px, calc((100% - 1220px) / 2));
  bottom: 70px;
  display: grid;
  width: min(410px, 34vw);
  min-height: 126px;
  padding: 19px 22px 18px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 22px;
  background:
    linear-gradient(115deg, rgb(255 255 255 / 8%), transparent 65%),
    rgb(5 9 20 / 35%);
  box-shadow: 0 22px 58px rgb(0 0 0 / 16%);
  align-content: center;
  color: white;
  overflow: hidden;
  pointer-events: none;
}

.hero-ad-stage::before {
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--game), var(--game-special), transparent);
  content: "";
  opacity: 0.78;
}

.hero-ad-kicker {
  margin-bottom: 8px;
  color: #8bbfff;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-ad-line {
  min-height: 2.65em;
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.28;
  text-wrap: balance;
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-ad-word {
  display: inline-block;
  margin-right: 0.25em;
  opacity: 1;
  will-change: opacity, transform;
}

.hero-ad-stage.is-ad-leaving .hero-ad-line {
  opacity: 0;
  transform: translateY(-9px) scale(0.985);
}

.hero-ad-stage.is-ad-entering[data-transition="lift"] .hero-ad-word {
  animation: hero-ad-word-lift 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--word-index) * 38ms);
}

.hero-ad-stage.is-ad-entering[data-transition="slide"] .hero-ad-word {
  animation: hero-ad-word-slide 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--word-index) * 32ms);
}

.hero-ad-stage.is-ad-entering[data-transition="focus"] .hero-ad-word {
  animation: hero-ad-word-focus 820ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--word-index) * 42ms);
}

.hero-ad-stage.is-ad-entering[data-transition="scale"] .hero-ad-word {
  animation: hero-ad-word-scale 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--word-index) * 35ms);
}

.hero-ad-stage.is-ad-entering[data-transition="wipe"] .hero-ad-word {
  animation: hero-ad-word-wipe 790ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--word-index) * 34ms);
}

.hero-ad-progress {
  position: absolute;
  right: var(--hero-ad-inset);
  bottom: 0;
  left: var(--hero-ad-inset);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--game), var(--game-special));
  opacity: 0.75;
  transform: scaleX(0);
  transform-origin: left;
}

.hero-ad-stage.is-ad-counting .hero-ad-progress {
  animation: hero-ad-progress var(--hero-ad-duration, 6200ms) linear both;
}

.rank-best-gain {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 9px !important;
  padding-top: 9px;
  border-top: 1px solid rgb(255 255 255 / 16%);
  gap: 10px;
}

.rank-best-gain small {
  margin: 0 !important;
  color: #a9bad2 !important;
}

.rank-best-gain strong {
  margin: 0 !important;
  color: #78e5b7 !important;
  font-size: 0.84rem !important;
  text-align: right;
}

.number-choice.is-grid-clearing,
.mini-ball.is-grid-clearing {
  pointer-events: none;
  animation: grid-ball-clear 520ms cubic-bezier(0.55, 0.02, 0.85, 0.42) both !important;
  animation-delay: calc(var(--clear-order, 0) * 34ms) !important;
}

#grid-check-form.is-clearing-grid .selection-recap {
  animation: grid-recap-clear 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reset-grid-button.is-reset-launching .reset-grid-icon {
  animation: reset-bin-launch 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-number-burst {
  0% {
    opacity: 0;
    transform: scale(0.62);
  }

  38% {
    opacity: 0.85;
    transform: scale(1.48);
  }

  100% {
    opacity: 0;
    transform: scale(2.05);
  }
}

@keyframes hero-emblem-charge {
  from {
    opacity: 0.78;
    transform: scale(0.96) rotate(-1deg);
  }

  to {
    opacity: 1;
    transform: scale(1.035) rotate(1deg);
  }
}

@keyframes hero-core-flash {
  from {
    opacity: 0.45;
    transform: scale(0.9);
  }

  to {
    opacity: 0.95;
    transform: scale(1.22);
  }
}

@keyframes hero-star-charge {
  from {
    box-shadow:
      0 14px 34px rgb(0 0 0 / 26%),
      0 0 0 0 rgb(255 255 255 / 24%);
    transform: scale(0.93) rotate(-10deg);
  }

  to {
    box-shadow:
      0 18px 42px rgb(0 0 0 / 30%),
      0 0 0 14px rgb(255 255 255 / 8%);
    transform: scale(1.12) rotate(11deg);
  }
}

@keyframes hero-ball-settle {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(-16deg);
  }

  68% {
    opacity: 1;
    transform: scale(1.14) rotate(3deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes hero-ad-word-lift {
  from {
    opacity: 0;
    transform: translateY(22px) rotate(2deg);
  }
}

@keyframes hero-ad-word-slide {
  from {
    opacity: 0;
    transform: translateX(-28px) skewX(-8deg);
  }
}

@keyframes hero-ad-word-focus {
  from {
    opacity: 0;
    letter-spacing: 0.09em;
    transform: translateY(5px);
  }
}

@keyframes hero-ad-word-scale {
  from {
    opacity: 0;
    transform: scale(0.45) rotate(-5deg);
  }

  72% {
    transform: scale(1.08) rotate(1deg);
  }
}

@keyframes hero-ad-word-wipe {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
  }
}

@keyframes hero-ad-progress {
  to {
    transform: scaleX(1);
  }
}

@keyframes grid-ball-clear {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0);
  }

  42% {
    opacity: 1;
    transform: translate3d(0, -10px, 0) scale(1.08) rotate(-7deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(18px, 42px, 0) scale(0.28) rotate(38deg);
  }
}

@keyframes grid-recap-clear {
  48% {
    box-shadow:
      0 24px 56px rgb(9 18 36 / 16%),
      inset 0 0 0 1px rgb(255 255 255 / 12%);
    transform: scale(0.99);
  }
}

@keyframes reset-bin-launch {
  0%,
  100% {
    transform: rotate(0) translateY(0);
  }

  28% {
    transform: rotate(-14deg) translateY(-3px);
  }

  58% {
    transform: rotate(12deg) translateY(1px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .hero-ball:not(:disabled):hover > span {
    transform: scale(1.12);
  }

  .hero-ball-special:not(:disabled):hover > span {
    transform: scale(1.18) rotate(10deg);
  }
}

@media (min-width: 1101px) {
  .hero-ad-stage {
    bottom: clamp(138px, 17vh, 168px);
  }
}

@media (max-width: 1100px) {
  .hero-ad-stage {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(620px, 100%);
    min-height: 112px;
    margin: 20px auto 0 max(0px, calc((100% - 1220px) / 2));
  }
}

@media screen and (max-width: 680px) {
  .hero-ad-stage {
    --hero-ad-inset: 18px;
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    min-height: 106px;
    margin: 22px 0 0;
    padding: 17px 18px 16px;
    border-radius: 18px;
    background: rgb(255 255 255 / 6%);
    box-shadow: none;
  }

  .hero-ad-line {
    font-size: 1rem;
  }

  .hero-ball {
    min-width: 40px;
    min-height: 40px;
  }

  .rank-best-gain {
    grid-template-columns: 1fr;
  }

  .rank-best-gain strong {
    text-align: left;
  }
}

@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;
  }

  .reveal-group-pending[data-reveal-surface],
  .is-reveal-pending {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .hero-ad-stage.is-ad-counting .hero-ad-progress {
    animation: none !important;
    opacity: 0.42;
    transform: scaleX(1);
  }
}
