
:root {
  --exp-a: #b04a24;
  --exp-b: var(--accent);
  --exp-female: #c03a7a;
}

:root:not([data-theme='light']) {
  --exp-a: #f0a271;
  --exp-female: #f28cbf;
}


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

.exp-brand__sep {
  flex: none;
  width: 1px;
  height: 22px;
  background: var(--line-strong);
}

.exp-brand__name {
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--ink);
}

.site-header .theme-toggle {
  margin-left: auto;
}

.exp-brand .brand {
  flex: none;
}

@media (width <= 480px) {
  .exp-brand {
    gap: .5rem;
  }

  .exp-brand .brand__logo {
    height: 12px;
  }

  .exp-brand__sep {
    height: 18px;
  }

  .exp-brand__name {
    font-size: 1.1rem;
  }
}

@media (width <= 400px) {
  .exp-brand {
    gap: .4rem;
  }

  .exp-brand .brand__logo {
    height: 10px;
  }

  .exp-brand__name {
    font-size: 1rem;
  }
}

.exp-page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(2rem, 6vw, 4rem));
  overflow: clip;
}

.exp-page > .ruler {
  margin-top: auto;
}

.exp-page .hero__grid {
  bottom: auto;
  height: 32rem;
}

.exp__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.exp__nav-title {
  margin-bottom: .75rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.exp__tabs {
  display: none;
}

.exp__tab {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: .75rem;
  width: 100%;
  padding: .6rem 0 .6rem .9rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  font-size: .95rem;
  line-height: 1.6;
  text-align: left;
  color: var(--ink-2);
  cursor: pointer;
  transition: color .25s var(--ease);
}

.exp__tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55rem;
  bottom: .55rem;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform .3s var(--ease-out);
}

.exp__tab-num {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  transition: color .25s var(--ease);
}

.exp__tab[aria-selected='true'] {
  color: var(--ink);
}

.exp__tab[aria-selected='true']::before {
  transform: scaleY(1);
}

.exp__tab[aria-selected='true'] .exp__tab-num {
  color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .exp__tab:hover {
    color: var(--accent);
  }

  .exp__tab:hover .exp__tab-num {
    color: var(--accent);
  }
}

@media (min-width: 900px) {
  .exp__layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: clamp(3rem, 5vw, 5rem);
  }

  .exp__nav {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    align-self: start;
  }

  .exp__picker {
    display: none;
  }

  .exp__tabs {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
  }
}

.exp-panel {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

.exp-panel:focus {
  outline: none;
}

.exp-card {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.exp-card__title {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.025em;
}

.exp-card__num {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--accent);
}

.exp-card__grid {
  display: grid;
  gap: 2rem;
}

.exp-card__controls {
  display: grid;
  align-content: start;
  gap: 1.25rem;
  min-width: 0;
}

@media (min-width: 1100px) {
  .exp-card__grid {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    gap: 2.5rem;
  }
}

.exp-label {
  display: block;
  margin-bottom: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--muted);
}

.exp-label output {
  margin-left: .35rem;
  color: var(--ink);
}

.exp-hint {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--muted);
}

.exp-hint strong {
  font-weight: 500;
  color: var(--ink);
}

.exp-message {
  font-size: .95rem;
  color: var(--muted);
}

.exp-accent {
  color: var(--accent);
}

.exp-controls {
  display: grid;
  min-width: 0;
}

.exp-controls--choice {
  margin: 0;
  padding: 0;
  border: 0;
}

.exp-controls--choice legend {
  padding: 0;
}

.exp-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.25rem 1.5rem;
}

.exp-controls-row .exp-controls:not(.exp-controls--choice) {
  flex: 0 1 12rem;
}

.exp-chips,
.exp-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.exp-buttons {
  margin-top: .75rem;
}

.exp-actions {
  margin-top: .25rem;
}

.exp-actions .btn {
  min-width: 9rem;
}

.exp-select,
.exp-input,
.exp-numbers input {
  width: 100%;
  min-height: 46px;
  padding: .6rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background-color: var(--bg);
  font-size: 1rem;
  transition: border-color .25s var(--ease), background-color .25s var(--ease), box-shadow .25s var(--ease), opacity .25s var(--ease);
}

.exp-input {
  font-family: var(--font-mono);
}

.exp-select {
  padding-right: 2.5rem;
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 50%, calc(100% - .8rem) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.exp-select option {
  background: var(--surface);
  color: var(--ink);
}

.exp-select:hover,
.exp-input:hover,
.exp-numbers input:hover {
  border-color: var(--muted);
}

.exp-select:focus,
.exp-input:focus,
.exp-numbers input:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.exp-numbers input:disabled {
  opacity: .45;
}

.exp-numbers {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .35rem;
}

.exp-numbers input {
  min-height: 42px;
  padding: .4rem .2rem;
  font-family: var(--font-mono);
  font-size: .95rem;
  text-align: center;
  -moz-appearance: textfield;
}

.exp-numbers input::-webkit-inner-spin-button,
.exp-numbers input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.slider {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
}

.slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
}

.slider::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  -webkit-appearance: none;
  appearance: none;
}

.slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.slider:focus {
  outline: none;
}

.slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-soft);
}

.slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-soft);
}

.exp-figure__plate {
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.2px);
  background-size: 16px 16px;
}

#lottery .exp-figure__plate {
  background-image: none;
}

.exp-figure__plate img {
  height: auto;
}

:root:not([data-theme='light']) .exp-figure__plate img {
  filter: invert(1) hue-rotate(180deg);
}

.exp-result {
  min-width: 0;
}

.exp-result__title {
  margin-top: 1.75rem;
}

.exp-a {
  color: var(--exp-a);
}

.exp-b {
  color: var(--exp-b);
}

.exp-busy {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .95rem;
  color: var(--muted);
}

.exp-busy .blink {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: blinker 1.2s var(--ease) infinite;
}

@keyframes blinker {
  50% {
    opacity: .15;
  }
}

.exp-counter {
  display: block;
  padding: 1rem 1.1rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--tint);
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: .08em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.exp-stats {
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--line);
}

.exp-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}

.exp-stats dt {
  font-size: .925rem;
  color: var(--ink-2);
}

.exp-stats dd {
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 500;
  text-align: right;
}

.exp-stats small {
  font-size: .85em;
  font-weight: 400;
  color: var(--muted);
}

.exp-table-wrap {
  margin-bottom: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.exp-table-wrap:focus-visible {
  border-radius: var(--radius);
}

.exp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  white-space: nowrap;
}

.exp-table th,
.exp-table td {
  padding: .45rem .75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.exp-table--center th,
.exp-table--center td {
  text-align: center;
}

.exp-table thead th {
  background: var(--tint);
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.exp-table tbody td:first-child {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
}

.exp-table tbody tr:last-child td {
  border-bottom: 0;
}

.exp-table tfoot td {
  border-top: 1px solid var(--line-strong);
  border-bottom: 0;
  background: var(--tint);
  color: var(--ink-2);
}

.exp-table strong {
  font-weight: 600;
}

.exp-bars {
  display: grid;
  gap: .6rem;
}

.exp-bars {
  grid-template-columns: auto minmax(0, 1fr) 4.5rem;
  align-items: center;
  column-gap: .75rem;
  font-size: .875rem;
}

.exp-bar {
  display: contents;
}

.exp-bar__label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--ink-2);
  white-space: nowrap;
}

.exp-die {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  flex: none;
  width: 28px;
  height: 28px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--bg);
}

.exp-die i {
  width: 4px;
  height: 4px;
  place-self: center;
  border-radius: 50%;
}

.exp-die i.is-pip {
  background: var(--ink);
}

.exp-bar__track {
  height: 10px;
  border-radius: 2px;
  background: var(--tint);
  overflow: hidden;
}

.exp-bar__fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width .5s var(--ease-out);
}

.exp-bar--a .exp-bar__fill {
  background: var(--exp-a);
}

.exp-bar--b .exp-bar__fill {
  background: var(--exp-b);
}

.exp-bar__value {
  font-family: var(--font-mono);
  font-size: .8rem;
  text-align: right;
  color: var(--ink);
}

.exp-ticket {
  display: flex;
  gap: 4px;
  width: 100%;
  padding: 3px;
  border: 2px solid var(--ink-2);
  border-radius: 2px;
  background: var(--surface);
}

.exp-ticket__block {
  display: grid;
  flex: 1;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ink-2);
}

.exp-ticket span {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: .5rem;
  line-height: 1;
  color: var(--ink-2);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

.exp-ticket span.is-marked {
  border-color: var(--accent);
}

.exp-ticket--table {
  padding: 0;
}

.exp-ticket table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.exp-ticket td {
  position: relative;
  padding: 0;
  border: 1px solid var(--ink-2);
  font-family: var(--font-mono);
  font-size: .55rem;
  line-height: 1;
  text-align: center;
  color: var(--ink-2);
  transition: color .2s var(--ease);
}

.exp-ticket td div {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}

.exp-ticket tr:first-child td {
  border-top: 0;
}

.exp-ticket tr:last-child td {
  border-bottom: 0;
}

.exp-ticket td:first-child {
  border-left: 0;
}

.exp-ticket td:last-child {
  border-right: 0;
}

.exp-ticket td:nth-child(5n):not(:last-child) {
  border-right-width: 3px;
}

.exp-ticket tr:nth-child(3n):not(:last-child) td {
  border-bottom-width: 3px;
}

.exp-ticket .is-marked {
  color: var(--muted);
}

.exp-ticket [data-number]::before,
.exp-ticket [data-number]::after {
  content: '';
  position: absolute;
  inset: 15%;
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--accent) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}

.exp-ticket [data-number]::after {
  background: linear-gradient(to top left, transparent calc(50% - 1px), var(--accent) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}

.exp-ticket .is-marked::before,
.exp-ticket .is-marked::after {
  opacity: 1;
}

.exp-jackpot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--accent);
}

.exp-jackpot strong {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.02em;
}

.exp-draws {
  border-top: 1px solid var(--line);
}

.exp-draws li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}

.exp-draws__meta {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
}

.exp-balls {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.exp-ball {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ink-2);
}

.exp-ball.is-hit {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.exp-result--weeks {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.exp-weeks__hint {
  margin-top: .75rem;
}

.exp-weeks {
  display: grid;
  grid-template-columns: repeat(52, minmax(0, 1fr)) 2.5rem;
  gap: clamp(1px, .25vw, 2px);
  width: 100%;
  max-width: 36rem;
}

.exp-weeks .exp-message {
  grid-column: 1 / -1;
}

.week {
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  cursor: help;
}

.week.filled {
  border-color: var(--muted);
  background: var(--muted);
}

.week.male {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.week.male.filled {
  border-color: var(--accent);
  background: var(--accent);
}

.week.female {
  border-color: color-mix(in srgb, var(--exp-female) 55%, transparent);
}

.week.female.filled {
  border-color: var(--exp-female);
  background: var(--exp-female);
}

.year {
  align-self: center;
  padding-left: .35rem;
  font-family: var(--font-mono);
  font-size: .6rem;
  line-height: 0;
  white-space: nowrap;
  color: var(--muted);
}

.exp-card__controls > .switch,
.exp-controls > .switch {
  justify-self: start;
}

.exp-switch__note {
  margin-top: .15rem;
}

.exp-live__status {
  margin-top: 1rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--error-border);
  border-left: 2px solid var(--error);
  border-radius: var(--radius);
  background: var(--error-bg);
  font-size: .9rem;
  color: var(--ink-2);
}

.exp-progress {
  height: 6px;
  margin-top: 1rem;
  border-radius: 3px;
  background: var(--tint);
  overflow: hidden;
}

.exp-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.exp-progress__text {
  margin-top: .5rem;
}

.exp-live__times {
  margin: 1.5rem 0 0;
}
