:root {
  --page: #F5F0E6;
  --panel: #FFFEFA;
  --ink: #19352D;
  --primary: #28665B;
  --secondary: #AF702C;
  --border: #DCD4C6;
  --tint: #E8EEE7;
  --accent-dark: #754719;
  --unit: 8px;
  --section: 64px;
  --coral: #D96C4F;
  --yellow: #E3B341;
  --plum: #76539A;
  --consent-space: 0px;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--page); color: var(--ink); font: 18px/1.65 Arial, Helvetica, sans-serif; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.15; font-weight: 400; margin: 0 0 24px; }
h1 { font-size: 56px; letter-spacing: -1.5px; }
h2 { font-size: 36px; }
h3 { font-size: 27px; }
p { margin: 0 0 24px; }
a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--primary); border-radius: 4px; }
button { background: var(--primary); color: var(--panel); padding: 10px 16px; min-height: 48px; cursor: pointer; font-weight: 700; }
button:hover { background: var(--ink); }
button.secondary { background: var(--panel); color: var(--ink); }
button:disabled { cursor: not-allowed; opacity: .65; }
input, select, textarea { width: 100%; min-width: 0; padding: 10px 12px; min-height: 48px; background: var(--panel); }
textarea { resize: vertical; }
label { display: block; font-weight: 700; margin: 16px 0 8px; }
small, .note { font-size: 16px; line-height: 1.6; }
small { display: block; }
ul, ol { padding-left: 24px; }
li { margin-bottom: 8px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 24px; }
.skip { position: absolute; left: 16px; top: -160px; z-index: 10; background: var(--panel); padding: 16px; }
.skip:focus { top: 8px; }
.site-header, main, .footer-index, .colophon { max-width: 1280px; margin-inline: auto; padding-inline: 40px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px; border-bottom: 1px solid var(--border); }
.brand { font: 700 25px/1.3 Georgia, "Times New Roman", serif; text-decoration: none; }
.site-header nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-header nav a { padding: 8px 0; min-height: 44px; }
[aria-current="page"] { text-decoration-thickness: 3px; text-decoration-color: var(--primary); }
main { padding-block: 48px var(--section); }
main > section + section, .reading > section, .reading > article { margin-top: var(--section); }
.opener { display: grid; grid-template-columns: 64% 36%; }
.opener > div:first-child { padding-right: 40px; }
.eyebrow { color: var(--primary); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px; }
.month-panel { display: flex; flex-direction: column; justify-content: center; gap: 16px; border-top: 5px solid var(--secondary); border-bottom: 1px solid var(--border); padding: 24px 0 24px 24px; }
.month { font: 48px/1.1 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.year { font: 80px/1.1 "Courier New", monospace; letter-spacing: -6px; }
.month-panel > span:last-child { font: 16px/1.6 "Courier New", monospace; }
.search { max-width: 600px; }
.inline { display: flex; gap: 8px; margin-bottom: 8px; }
.inline button { flex: 0 0 auto; }
.coverage { border-bottom: 1px solid var(--border); padding-block: 24px; font-size: 17px; margin: 24px 0 40px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.section-heading h2 { margin: 0; }
.catalogue { display: grid; grid-template-columns: 36% 64%; align-items: start; }
.ledger { padding-right: 24px; }
.ledger-row { display: flex; flex-direction: column; padding: 24px 8px; border-bottom: 1px solid var(--border); text-decoration: none; background: var(--page); font-size: 17px; }
.ledger-row:first-child { padding-top: 8px; }
.ledger-row time { font-weight: 700; margin-bottom: 8px; }
.ledger-row b { font-family: "Courier New", monospace; font-weight: 400; }
.ledger-row:hover { background: var(--tint); }
.row-link { font-size: 15px; text-decoration: underline; text-underline-offset: 4px; margin-top: 8px; }
.detail-sheet { background: var(--panel); border-radius: 4px 4px 0 0; border-bottom: 1px solid var(--border); padding: 40px; min-width: 0; }
.detail-sheet h3 { font-size: 34px; }
.pool-label { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; margin: 24px 0 8px; color: var(--primary); font-weight: 700; }
.numbers { font: 30px/1.6 "Courier New", monospace; color: var(--ink); overflow-wrap: anywhere; }
.euro { border-bottom: 2px solid var(--secondary); padding-bottom: 16px; width: fit-content; }
.record-notes { margin-block: 32px; border-top: 1px solid var(--border); }
.record-notes dt { font-size: 15px; font-weight: 700; margin-top: 16px; }
.record-notes dd { margin-left: 0; }
.mono { font-family: "Courier New", monospace; overflow-wrap: anywhere; }
.prose { max-width: 70ch; }
.reading-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.reading-columns > div { border-top: 2px solid var(--primary); padding-top: 24px; }
.frequency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--panel); }
caption { text-align: left; font-weight: 700; font-size: 17px; padding: 16px 0; background: var(--page); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
thead th { background: var(--tint); }
tbody th, td { font-family: "Courier New", monospace; color: var(--ink); }
tfoot { font-weight: 700; }
.annotation { margin-top: 32px; border-top: 3px solid var(--secondary); padding-top: 24px; }
details { border-bottom: 1px solid var(--border); }
summary { padding: 18px 8px; cursor: pointer; font-weight: 700; }
details p { padding: 0 8px 8px; }
.provenance { border-top: 3px solid var(--primary); padding-top: 32px; }
.page-heading { margin-bottom: 40px; }
.tools { padding-right: 32px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; padding: 0; }
fieldset button { margin-top: 24px; }
#result-count { margin-top: 24px; font-weight: 700; }
.record-stack { min-width: 0; }
.record-stack > h2 { padding-inline: 24px; }
.record-stack .detail-sheet { margin-bottom: 24px; }
.notice { background: var(--tint); padding: 24px; border-bottom: 2px solid var(--primary); }
.reading { max-width: 800px; }
.reading h1 { font-size: 48px; }
.contents { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-block: 16px; border-block: 1px solid var(--border); margin: 32px 0; font-size: 16px; }
.contents a { padding-block: 8px; }
.reading section, .reading article { overflow-wrap: anywhere; }
.reading article + article { border-top: 2px solid var(--primary); padding-top: 40px; }
.reading .article-number { color: var(--accent-dark); font: 18px/1.6 "Courier New", monospace; }
.feedback-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-block: 24px; }
.error { color: #702E20; font-weight: 700; }
#draft-preview { min-height: 280px; font: 16px/1.6 "Courier New", monospace; }
footer { border-top: 1px solid var(--border); background: var(--panel); }
.footer-index { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-block: 24px; border-bottom: 1px solid var(--border); }
.footer-index a { font-size: 16px; padding-block: 8px; }
.colophon { padding-block: 32px 40px; }
.colophon strong { font-family: Georgia, "Times New Roman", serif; font-size: 24px; overflow-wrap: anywhere; }
.colophon p { max-width: 75ch; font-size: 16px; margin: 16px 0; }
.colophon small { font-size: 14px; }

@media (max-width: 1279px) {
  :root { --section: 40px; }
  .site-header, main, .footer-index, .colophon { padding-inline: 24px; }
  .month { font-size: 40px; }
  .detail-sheet { padding: 32px; }
}
@media (max-width: 999px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  h1 { font-size: 48px; }
  .month { font-size: 32px; }
  .year { font-size: 64px; }
  .reading-columns { gap: 24px; }
  .detail-sheet { padding: 24px; }
  .numbers { font-size: 25px; }
  .inline { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  :root { --section: 28px; }
  body { font-size: 16px; }
  .site-header, main, .footer-index, .colophon { padding-inline: 16px; }
  .site-header { padding-block: 16px; }
  .brand { font-size: 23px; }
  .site-header nav { gap: 8px 16px; width: 100%; font-size: 16px; }
  main { padding-top: 28px; }
  h1, .reading h1 { font-size: 40px; letter-spacing: -.6px; }
  h2 { font-size: 30px; }
  h3, .detail-sheet h3 { font-size: 26px; }
  .opener, .catalogue, .reading-columns, .frequency-grid { grid-template-columns: 1fr; gap: 24px; }
  .opener > div:first-child, .ledger, .tools { padding-right: 0; }
  .month-panel { padding: 16px 0; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .month-panel .eyebrow, .month-panel > span:last-child { grid-column: 1 / -1; }
  .month { font-size: 40px; }
  .year { font-size: 44px; letter-spacing: -2px; }
  .coverage { margin: 16px 0 28px; font-size: 16px; }
  .detail-sheet { padding: 24px 16px; }
  .record-stack > h2 { padding-inline: 0; }
  .reading { max-width: 752px; }
  .footer-index { gap: 8px 16px; }
}
@media (max-width: 479px) {
  h1, .reading h1 { font-size: 36px; }
  .month { font-size: 34px; }
  .numbers { font-size: 23px; }
  .inline { flex-direction: column; }
  .inline button { align-self: flex-start; }
  th, td { padding: 12px; }
}

/* Shared progressive-enhancement styling. */
html { scroll-padding-bottom: calc(var(--consent-space) + 16px); }
body { padding-bottom: var(--consent-space); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.site-header { position: relative; }
.site-header::after {
  content: "";
  position: absolute;
  right: 40px;
  bottom: -2px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  box-shadow: -10px 0 var(--yellow), -20px 0 var(--coral), -30px 0 var(--plum);
  pointer-events: none;
}
.month-panel { position: relative; }
.month-panel::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 12px;
  width: 6px;
  height: 6px;
  background: var(--coral);
  box-shadow: 0 6px var(--coral), 0 -6px var(--coral), 6px 0 var(--coral), -6px 0 var(--coral);
  pointer-events: none;
}
.reading-columns > div:nth-child(2) { border-top-color: var(--secondary); }
.reading-columns > div:nth-child(3) { border-top-color: var(--plum); }
button {
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
button:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
button.secondary:hover { background: var(--tint); }
button:disabled { box-shadow: none; }
input, select, textarea { transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease; }
.has-selection { background-color: var(--tint); box-shadow: inset 4px 0 0 var(--primary); border-color: var(--ink); }
select:focus-visible, input:focus-visible, textarea:focus-visible { background-color: var(--panel); }
.site-header nav a, .footer-index a, .contents a,
a[href^="https://www.juegosonce.es"], a[href^="https://gamblersanonymous.org/"] {
  transition: background-color 140ms ease, text-decoration-color 140ms ease;
}
.site-header nav a:hover, .footer-index a:hover, .contents a:hover {
  text-decoration-color: var(--secondary);
  background-color: var(--tint);
}
a[href^="https://www.juegosonce.es"]:hover,
a[href^="https://gamblersanonymous.org/"]:hover {
  background-color: var(--tint);
  text-decoration-color: var(--primary);
}
.detail-sheet {
  position: relative;
  box-shadow: 0 3px 0 rgba(25, 53, 45, .06);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.detail-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 4px;
  background: var(--primary);
  box-shadow: 44px 0 var(--yellow), 88px 0 var(--coral);
  border-radius: 3px 0 0 0;
}
.draw-record:target { outline: 2px solid var(--primary); outline-offset: 4px; }
.ledger-row { border-radius: 4px; transition: background-color 140ms ease, transform 140ms ease; }
.number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.numbers .number-badge {
  width: 1.7em;
  height: 1.7em;
  margin-block: .15em;
  border-radius: 50%;
  border: 1px solid var(--primary);
  background-color: var(--tint);
  box-shadow: inset 0 -3px 0 rgba(25, 53, 45, .08);
}
.numbers:not(.euro) .number-badge:nth-child(3n + 2) {
  background-color: var(--panel);
  border-color: var(--plum);
  box-shadow: inset 0 -3px 0 rgba(118, 83, 154, .18);
}
.numbers:not(.euro) .number-badge:nth-child(3n) {
  background-color: var(--page);
  border-color: var(--secondary);
  box-shadow: inset 0 -3px 0 rgba(175, 112, 44, .16);
}
.euro .number-badge { background-color: var(--yellow); border-color: var(--secondary); }
.ledger-row .number-badge { min-width: 1.3em; padding: .2em .08em; border-radius: 4px; background-color: rgba(40, 102, 91, .08); }
tbody tr:hover { background-color: var(--tint); }
summary { transition: background-color 140ms ease; }
summary:hover, details[open] summary { background-color: var(--tint); }
summary::marker { color: var(--primary); }

.lucky-reveal {
  position: relative;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 6px;
  box-shadow: 5px 5px 0 rgba(25, 53, 45, .06);
}
.reveal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.reveal-heading > div { min-width: 0; }
.reveal-star { flex-shrink: 0; color: var(--secondary); font: 42px/1 Georgia, "Times New Roman", serif; transform: rotate(12deg); }
.reveal-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 12px 8px 24px; }
.reveal-ball {
  --ball-color: var(--primary);
  position: relative;
  display: block;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  perspective: 500px;
  -webkit-tap-highlight-color: transparent;
}
.reveal-ball:hover, .reveal-ball:not(:disabled):active { background: transparent; box-shadow: none; }
.ball-color-2 { --ball-color: var(--secondary); }
.ball-color-3 { --ball-color: var(--coral); }
.ball-color-4 { --ball-color: var(--yellow); }
.ball-color-5 { --ball-color: var(--plum); }
.ball-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform 240ms ease;
}
.ball-front, .ball-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 9px solid var(--ball-color);
  border-radius: 50%;
  background-color: var(--panel);
  color: var(--ink);
  font: 700 27px/1 "Courier New", monospace;
  box-shadow: 0 4px 0 rgba(25, 53, 45, .17), inset 0 0 0 1px rgba(25, 53, 45, .12);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.ball-back { transform: rotateY(180deg); }
.reveal-ball.is-revealed .ball-inner { transform: rotateY(180deg); }
.reveal-ball.is-revealed .ball-back { background-color: var(--yellow); outline: 2px solid var(--ink); outline-offset: 3px; }
.reveal-ball[aria-disabled="true"] { cursor: default; }
.reveal-ball.is-shaking { animation: ball-shake 180ms ease; }
.reveal-result { min-height: 100px; border-left: 3px solid var(--secondary); background-color: var(--page); padding: 16px 20px; margin-bottom: 24px; }
.reveal-result p { margin: 0; max-width: 75ch; }
.revealed-number { color: var(--ink); }
.reveal-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 24px; }
.reveal-counter { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 15px; }
.reveal-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 38px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: 700 23px/1 "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  background: var(--tint);
}
.counter-pop { animation: number-bounce 220ms ease; }
.lucky-reveal > .note:last-child { margin-bottom: 0; }
.reveal-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 5px;
  height: 5px;
  background: var(--particle-color);
  pointer-events: none;
  animation: tiny-celebration 500ms ease-out both;
}
.reveal-particle:nth-of-type(even) { border-radius: 50%; }

.consent-banner {
  position: fixed;
  z-index: 20;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 24px;
  width: auto;
  max-width: 1200px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-inline: auto;
  padding: 24px;
  border: 1px solid var(--primary);
  border-top: 4px solid var(--primary);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 6px 0 rgba(25, 53, 45, .12), 0 8px 28px rgba(25, 53, 45, .1);
}
.consent-copy { flex: 1 1 420px; min-width: 0; }
.consent-copy h2 { font-size: 25px; margin-bottom: 8px; }
.consent-copy p { font-size: 15px; line-height: 1.6; margin: 0; }
.consent-copy .note { margin-top: 8px; font-weight: 700; }
.consent-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 12px; }
.consent-actions button { font-size: 16px; min-width: 100px; }
.consent-actions a { display: inline-flex; align-items: center; min-height: 48px; padding: 8px; font-size: 16px; }
.consent-settings { margin-top: 24px; font-size: 15px; }
.skip:focus { z-index: 30; }

@keyframes ball-shake {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-5px) rotate(-7deg); }
  65% { transform: translateY(-3px) rotate(7deg); }
}
@keyframes number-bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-4px); }
}
@keyframes tiny-celebration {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--particle-x), var(--particle-y)) rotate(80deg) scale(.8); }
}
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):not(.reveal-ball):hover { transform: translateY(-1px); }
  button:not(:disabled):not(.reveal-ball):active { transform: translateY(2px); }
  .detail-sheet:hover { transform: translateY(-2px); box-shadow: 0 5px 0 rgba(25, 53, 45, .08); }
  .ledger-row:hover { transform: translateX(2px); }
  .numbers .number-badge:hover { animation: number-bounce 220ms ease; }
  .reveal-ball:not([aria-disabled="true"]):hover { transform: translateY(-3px); }
  .reveal-ball:not([aria-disabled="true"]):active { transform: translateY(1px); }
}
@media (max-width: 999px) {
  .consent-banner { align-items: flex-start; flex-direction: column; gap: 16px; }
  .consent-copy { flex-basis: auto; }
}
@media (max-width: 767px) {
  .site-header::after { right: 16px; }
  .lucky-reveal { padding: 24px 16px; }
  .reveal-balls { gap: 16px; padding-inline: 4px; }
  .reveal-ball { width: 64px; height: 64px; flex-basis: 64px; }
  .ball-front, .ball-back { border-width: 7px; font-size: 23px; }
  .reveal-star { font-size: 30px; }
  .consent-banner { padding: 16px; }
}
@media (max-width: 479px) {
  .numbers .number-badge { width: 1.45em; height: 1.45em; }
  .reveal-balls { gap: 12px; }
  .reveal-ball { width: 56px; height: 56px; flex-basis: 56px; }
  .ball-front, .ball-back { border-width: 6px; font-size: 21px; }
  .consent-actions { width: 100%; }
  .consent-actions button { flex: 1 1 90px; }
  .consent-actions a { flex-basis: 100%; }
}

/* A brighter editorial palette shared by every page.
   Dark text remains on light surfaces; colour never replaces pool labels. */
:root {
  --page: #FFF9F0;
  --panel: #FFFEFC;
  --ink: #233449;
  --primary: #176B60;
  --secondary: #A65B20;
  --border: #D9D8E2;
  --tint: #DDF3EA;
  --accent-dark: #85451A;
  --coral: #E87960;
  --yellow: #F4C654;
  --plum: #7652A7;
  --mint: #DDF3EA;
  --lavender: #EDE4FA;
  --peach: #FFE5D9;
  --sky: #E2EFFB;
  --butter: #FFF0C4;
}
body {
  background:
    radial-gradient(ellipse at 0 0, #E7F4EC 0, transparent 650px),
    radial-gradient(ellipse at 100% 0, #F0E5FC 0, transparent 850px),
    var(--page);
}
.site-header {
  background: #FFFEF9;
  border-bottom: 3px solid var(--plum);
  border-top: 6px solid var(--coral);
}
.brand { color: #50377A; }
.site-header nav { gap: 8px; }
.site-header nav a {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--mint);
  text-decoration-color: var(--primary);
}
.site-header nav a:nth-child(2) { background: var(--butter); }
.site-header nav a:nth-child(3) { background: var(--lavender); }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  background: var(--primary);
  color: #FFFFFF;
  text-decoration-color: var(--yellow);
}
h1 { color: #50377A; }
h2 { color: #245D58; }
h3 { color: #50377A; }
.eyebrow { color: #176357; }
a { text-decoration-color: var(--plum); }
a:hover { text-decoration-color: var(--primary); }
:focus-visible { outline-color: #644095; }
button:not(.reveal-ball) { border-radius: 8px; }
button.secondary { background: var(--lavender); border-color: var(--plum); }
button.secondary:hover { background: #DED0F4; }
input, select, textarea { border-radius: 8px; }
.has-selection { background-color: var(--mint); }
.month-panel {
  min-width: 0;
  padding: 32px 24px;
  border: 1px solid #D4BDEB;
  border-top: 6px solid var(--coral);
  border-bottom: 6px solid var(--yellow);
  border-radius: 18px;
  background: linear-gradient(145deg, #E8DCF8 0%, #F7E2EC 55%, #FFE7C9 100%);
  box-shadow: 8px 8px 0 #DDEDE6;
}
.month-panel .month { color: #55347D; }
.month-panel .year { color: #176357; }
.month-panel > span:last-child {
  background: #FFFAEE;
  padding: 10px 12px;
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
}
.coverage {
  padding: 18px 20px;
  background: var(--butter);
  border: 1px solid #E5C778;
  border-left: 6px solid var(--secondary);
  border-radius: 8px;
}
.ledger-row {
  margin-bottom: 10px;
  padding: 20px 16px;
  border: 1px solid #C6DDD4;
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  background: var(--mint);
}
.ledger-row:first-child { padding-top: 20px; }
.ledger-row:nth-child(4n + 2) { background: var(--lavender); border-color: #D8C7EE; border-left-color: var(--plum); }
.ledger-row:nth-child(4n + 3) { background: var(--peach); border-color: #EBC6B5; border-left-color: var(--coral); }
.ledger-row:nth-child(4n + 4) { background: var(--sky); border-color: #C5D9EA; border-left-color: #467AA7; }
.ledger-row:hover { background: var(--butter); border-color: var(--secondary); }
.ledger-row .number-badge { background: #FFFEF8; }
.row-link { color: #50377A; }
.detail-sheet {
  border: 1px solid #D4C6E6;
  border-radius: 12px;
  background: linear-gradient(145deg, #FFFEFC 55%, #F1EAFB 100%);
  box-shadow: 0 4px 0 #E4D9F0;
}
.detail-sheet::before {
  left: 16px;
  height: 5px;
  border-radius: 0 0 3px 3px;
  background: var(--primary);
  box-shadow: 44px 0 var(--yellow), 88px 0 var(--coral), 132px 0 var(--plum);
}
.draw-record:nth-of-type(3n + 2) {
  background: linear-gradient(145deg, #FFFEFC 55%, #E5F4EC 100%);
  border-color: #C4DED3;
}
.draw-record:nth-of-type(3n) {
  background: linear-gradient(145deg, #FFFEFC 55%, #FFF0D9 100%);
  border-color: #E9D3AC;
}
.numbers .number-badge { background-color: #C9ECDD; border-color: var(--primary); }
.numbers:not(.euro) .number-badge:nth-child(3n + 2) { background-color: #E2D2F6; border-color: var(--plum); }
.numbers:not(.euro) .number-badge:nth-child(3n) { background-color: #FFD8C5; border-color: var(--secondary); }
.numbers.euro .number-badge { background-color: var(--yellow); border-color: var(--secondary); }
.reading-columns > div {
  padding: 24px;
  border: 1px solid #BEDBCF;
  border-top: 5px solid var(--primary);
  border-radius: 12px;
  background: var(--mint);
}
.reading-columns > div:nth-child(2) {
  background: var(--peach);
  border-color: #EBC6B5;
  border-top-color: var(--coral);
}
.reading-columns > div:nth-child(3) {
  background: var(--lavender);
  border-color: #D8C7EE;
  border-top-color: var(--plum);
}
.reading-columns h3 { color: var(--ink); }
.reading-columns a { font-weight: 700; }
.table-scroll { border: 1px solid #C7DDD4; border-radius: 10px; }
caption { padding: 16px; background: var(--mint); color: #20554B; }
thead th { background: #216C61; color: #FFFFFF; }
tbody tr:nth-child(even) { background: #EDF7F1; }
tbody tr:hover { background: var(--butter); }
tfoot th, tfoot td { background: var(--mint); color: var(--ink); }
.frequency-grid > div:nth-child(2) .table-scroll { border-color: #D7C8EC; }
.frequency-grid > div:nth-child(2) caption { background: var(--lavender); color: #50377A; }
.frequency-grid > div:nth-child(2) thead th { background: #6A4895; }
.frequency-grid > div:nth-child(2) tbody tr:nth-child(even) { background: #F4EEFC; }
.frequency-grid > div:nth-child(2) tbody tr:hover { background: var(--butter); }
.frequency-grid > div:nth-child(2) tfoot th,
.frequency-grid > div:nth-child(2) tfoot td { background: var(--lavender); }
.annotation {
  padding: 24px;
  background: var(--butter);
  border: 1px solid #E5C778;
  border-top: 5px solid var(--secondary);
  border-radius: 10px;
}
.annotation > :last-child { margin-bottom: 0; }
details {
  margin-bottom: 10px;
  border: 1px solid #D7C8EC;
  border-radius: 9px;
  background: var(--panel);
}
summary { padding-inline: 16px; border-radius: 8px; background: var(--lavender); }
details:nth-of-type(even) { border-color: #BEDBCF; }
details:nth-of-type(even) summary { background: var(--mint); }
summary:hover, details[open] summary { background: var(--butter); }
summary::marker { color: #644095; }
details p { padding: 16px; margin: 0; }
.provenance {
  padding: 32px;
  background: var(--mint);
  border: 1px solid #BEDBCF;
  border-top: 5px solid var(--primary);
  border-radius: 12px;
}
.archive-layout { column-gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); }
.tools {
  padding: 24px;
  border: 1px solid #D7C8EC;
  border-top: 5px solid var(--plum);
  border-radius: 12px;
  background: var(--lavender);
}
.tools h2 { color: #50377A; }
#result-count {
  padding: 10px 12px;
  background: var(--butter);
  border-radius: 6px;
  color: var(--ink);
}
.notice { background: var(--butter); border-color: var(--secondary); border-radius: 8px; }
.contents {
  padding: 16px;
  border: 1px solid #D7C8EC;
  border-left: 5px solid var(--plum);
  border-radius: 10px;
  background: var(--lavender);
}
.contents a { color: #50377A; }
.reading section > h2,
.reading article > h2 {
  padding-left: 16px;
  border-left: 5px solid var(--primary);
}
.reading section:nth-of-type(3n + 2) > h2,
.reading article:nth-of-type(3n + 2) > h2 { color: #85451A; border-left-color: var(--coral); }
.reading section:nth-of-type(3n) > h2,
.reading article:nth-of-type(3n) > h2 { color: #50377A; border-left-color: var(--plum); }
.reading .article-number {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--butter);
}
.reading li::marker { color: var(--plum); }
#feedback-form {
  padding: 24px;
  background: #EFF7F2;
  border: 1px solid #BEDBCF;
  border-top: 5px solid var(--primary);
  border-radius: 12px;
}
#draft-preview { background: #FFF9E8; }
.lucky-reveal {
  background: linear-gradient(120deg, #F0E6FC, #FCE6EA 58%, #FFF0CF);
  border-color: #D7C8EC;
  border-top: 5px solid var(--plum);
  border-radius: 14px;
  box-shadow: 5px 5px 0 #E8DDF2;
}
.lucky-reveal h2 { color: #50377A; }
.reveal-result { background: #FFFBF1; border-left-color: var(--coral); border-radius: 8px; }
.reveal-count { background: var(--mint); border-color: var(--primary); }
.consent-banner {
  background: #FFFBEE;
  border-color: #AA86CD;
  border-top-color: var(--plum);
  box-shadow: 0 6px 0 rgba(106, 72, 149, .14), 0 8px 28px rgba(35, 52, 73, .12);
}
.consent-copy h2 { color: #50377A; }
.consent-actions button[data-consent] {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}
.consent-actions button[data-consent]:hover { background: #144F48; }
footer {
  background: #EDE5F7;
  border-top: 6px solid var(--plum);
}
.footer-index { border-bottom-color: #CDBBDF; gap: 10px; }
.footer-index a {
  padding: 8px 12px;
  border-radius: 6px;
  background: #FFFEF9;
  color: #50377A;
}
.footer-index a:nth-child(3n + 2) { background: var(--mint); color: #20554B; }
.footer-index a:nth-child(3n) { background: var(--butter); color: #714419; }
.footer-index a:hover { background: #DCD0EF; color: var(--ink); }
.colophon strong { color: #50377A; }
.colophon a { color: #20554B; }

@media (max-width: 767px) {
  .site-header nav { gap: 8px; }
  .site-header nav a { padding-inline: 10px; }
  .month-panel { padding: 24px 16px; box-shadow: 4px 4px 0 #DDEDE6; }
  .archive-layout { grid-template-columns: 1fr; }
  .tools, .reading-columns > div, .annotation, .provenance, #feedback-form { padding: 20px 16px; }
  .coverage { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  button:hover, button:active, .detail-sheet:hover, .ledger-row:hover,
  .reveal-ball:hover, .reveal-ball:active { transform: none !important; }
  .reveal-particle { display: none; }
  .reveal-ball.is-revealed .ball-inner { transform: none; }
  .reveal-ball.is-revealed .ball-front { visibility: hidden; }
  .reveal-ball.is-revealed .ball-back { transform: none; }
}
@media (forced-colors: active) {
  .number-badge, .ball-front, .ball-back, .consent-banner { border: 2px solid CanvasText; }
  .reveal-ball.is-revealed .ball-back { outline-color: Highlight; }
  .detail-sheet::before, .site-header::after, .month-panel::after,
  .reveal-star, .reveal-particle { display: none; }
  .has-selection { outline: 2px solid Highlight; }
  body, .month-panel, .detail-sheet, .lucky-reveal { background: Canvas; }
  :focus-visible { outline-color: Highlight; }
}
@media print {
  .site-header nav, .footer-index, .tools, .search, .feedback-actions,
  .lucky-reveal, .consent-banner, .consent-settings { display: none; }
  body { background: white; color: black; padding-bottom: 0; }
  .catalogue { display: block; }
  .draw-record { break-inside: avoid; }
  .detail-sheet { box-shadow: none; transform: none; }
  .number-badge { box-shadow: none; }
  .month-panel, .detail-sheet, .draw-record:nth-of-type(n),
  .coverage, .reading-columns > div, .annotation, .provenance,
  .contents, .notice, #feedback-form, footer, summary,
  details:nth-of-type(even) summary, details[open] summary {
    background: white;
    box-shadow: none;
  }
  h1, h2, h3, a, .brand, .month-panel .month, .month-panel .year,
  .colophon strong { color: black; }
  thead th, .frequency-grid > div:nth-child(2) thead th {
    background: #EEEEEE;
    color: black;
  }
}