:root {
  --navy-1000: #011126;
  --navy-950: #031a37;
  --navy-900: #062a55;
  --navy-800: #0a376b;
  --burgundy-900: #4d0000;
  --burgundy-800: #650000;
  --burgundy-700: #790000;
  --burgundy-600: #941414;
  --gold-700: #9b6c0a;
  --gold-600: #bd8718;
  --gold-500: #d7a62a;
  --gold-400: #f4c95d;
  --gold-200: #f5dfa1;
  --ivory: #fff9ee;
  --parchment: #f7ecd8;
  --parchment-2: #ebd8b8;
  --black: #101010;
  --ink: #101010;
  --muted: #6e6256;
  --line: rgba(126, 84, 16, .32);
  --serif: Georgia, "Cormorant Garamond", "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 20px 70px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -15%, rgba(28, 82, 137, .62), transparent 42rem),
    linear-gradient(155deg, #020913, #031a37 52%, #010814);
  font-family: var(--sans);
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; }

.maintenance-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.maintenance-shell {
  width: min(650px, 100%);
  padding: clamp(34px, 7vw, 70px) 24px;
  border: 2px solid var(--gold-500);
  border-radius: 16px;
  color: #fff8e7;
  text-align: center;
  background: radial-gradient(circle at 50% 0, #164e86, transparent 52%), linear-gradient(150deg, var(--navy-900), var(--navy-1000));
  box-shadow: var(--shadow);
}
.maintenance-shell img { width: 150px; height: 150px; margin: 0 auto 13px; object-fit: contain; }
.maintenance-shell > p:first-of-type { margin: 0; color: var(--gold-400); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.maintenance-shell h1 { margin: 7px 0 25px; color: var(--gold-400); font: 600 clamp(36px,8vw,62px)/1 var(--serif); letter-spacing: .07em; }
.maintenance-shell h2 { margin: 0 0 9px; font: 600 25px/1.2 var(--serif); }
.maintenance-shell > p:last-child { margin: 0 auto; max-width: 460px; color: #d8d9dc; }

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 11px 16px;
  border: 2px solid var(--gold-400);
  border-radius: 4px;
  color: #fff;
  background: var(--navy-950);
  font-weight: 800;
}
.skip-link:focus { transform: none; }

.royal-frame {
  position: relative;
  width: min(1500px, calc(100% - 36px));
  min-height: calc(100vh - 36px);
  margin: 18px auto;
  overflow: hidden;
  border: 2px solid var(--gold-600);
  border-radius: 20px;
  background: var(--ivory);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 246, 201, .45);
}

/* Royal parchment masthead */
.site-header {
  position: relative;
  z-index: 40;
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  padding: 10px 80px 8px;
  border-bottom: 2px solid #4a0805;
  background-image:
    var(--site-parchment-image, none),
    radial-gradient(ellipse at 50% 105%, rgba(170, 113, 28, .26), transparent 52%),
    repeating-linear-gradient(100deg, rgba(126, 86, 28, .025) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #fffdf6 0%, #f5e9d0 70%, #dfc28e 100%);
  background-position: center, center, center, center;
  background-size: cover, auto, auto, auto;
}
.site-header::before,
.site-header::after {
  position: absolute;
  z-index: 0;
  bottom: -58px;
  width: 34%;
  height: 180px;
  border: 3px solid rgba(133, 83, 12, .45);
  border-radius: 50%;
  content: "";
  box-shadow: inset 0 0 0 7px rgba(255, 244, 212, .38);
}
.site-header::before { left: -9%; transform: rotate(-8deg); }
.site-header::after { right: -9%; transform: rotate(8deg); }
.header-arch {
  position: absolute;
  z-index: 0;
  top: -120px;
  left: 50%;
  width: min(720px, 58vw);
  height: 245px;
  transform: translateX(-50%);
  border: 4px double rgba(143, 94, 14, .5);
  border-radius: 0 0 52% 52%;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,.72), transparent 68%);
}
.header-curtain {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 12%, rgba(108,0,0,.07) 12.2% 12.7%, transparent 12.9% 100%),
    linear-gradient(242deg, transparent 0 12%, rgba(108,0,0,.07) 12.2% 12.7%, transparent 12.9% 100%);
}
.site-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 17px;
  color: var(--navy-950);
  text-align: center;
  text-decoration: none;
  filter: drop-shadow(0 2px 1px rgba(255,255,255,.8));
}
.brand-crest { width: 116px; height: 116px; object-fit: contain; }
.site-brand > span { display: grid; justify-items: center; min-width: 310px; }
.site-brand strong {
  font-family: var(--serif);
  font-size: clamp(37px, 4vw, 62px);
  font-weight: 500;
  line-height: .88;
  letter-spacing: .07em;
  white-space: nowrap;
  text-shadow: 0 1px #fff, 0 3px 0 rgba(133,86,16,.24);
}
.site-brand strong b { color: var(--burgundy-700); font-weight: 700; }
.site-brand small {
  margin-top: 12px;
  color: var(--gold-700);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .42em;
}
.menu-toggle { display: none; }

.site-nav {
  position: relative;
  z-index: 35;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 54px;
  border-top: 1px solid #a31d1d;
  border-bottom: 2px solid var(--gold-500);
  background:
    linear-gradient(180deg, rgba(255,255,255,.1), transparent 50%),
    linear-gradient(90deg, var(--burgundy-900), var(--burgundy-700) 50%, var(--burgundy-900));
  box-shadow: inset 0 -3px 0 rgba(33,0,0,.25);
}
.site-nav a {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 0 clamp(14px, 2.2vw, 34px);
  color: #fff8e9;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .055em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav a + a::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 1px;
  background: rgba(255, 228, 159, .34);
  content: "";
}
.site-nav a::after {
  position: absolute;
  right: 24%;
  bottom: 6px;
  left: 24%;
  height: 2px;
  transform: scaleX(0);
  background: var(--gold-400);
  content: "";
  transition: transform .18s ease;
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.active::after { transform: scaleX(1); }
.site-nav a.active { color: var(--gold-400); }

.flash {
  padding: 13px 5%;
  border-bottom: 1px solid rgba(0,0,0,.14);
  text-align: center;
  font-weight: 700;
}
.flash.success { color: #124a2e; background: #daf1df; }
.flash.error { color: #7a1111; background: #f7dddd; }

/* Home hero */
.royal-hero {
  display: grid;
  grid-template-columns: minmax(0, 56.5%) minmax(0, 43.5%);
  min-height: 368px;
  border-bottom: 4px solid var(--gold-500);
  background: var(--navy-950);
}
.palace-photo { min-width: 0; height: 100%; overflow: hidden; background: #1d2430; }
.palace-photo img { width: 100%; height: 100%; min-height: 368px; object-fit: cover; object-position: center 48%; }
.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 34px 54px 30px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(46, 98, 154, .55), transparent 32%),
    linear-gradient(150deg, #082e5d 0%, #031a37 62%, #020e20 100%);
}
.hero-copy::before,
.hero-copy::after {
  position: absolute;
  top: -20%;
  width: 56%;
  height: 54%;
  border: 2px solid rgba(219,170,46,.25);
  border-radius: 0 0 55% 55%;
  content: "";
}
.hero-copy::before { left: -20%; transform: rotate(12deg); }
.hero-copy::after { right: -20%; transform: rotate(-12deg); }
.curtain-swag {
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image: var(--site-curtain-image, none), repeating-radial-gradient(ellipse at 50% -20%, transparent 0 56px, var(--gold-400) 57px 59px, transparent 60px 89px);
  background-position: center, center;
  background-size: cover, auto;
}
.royal-flourish { position: relative; z-index: 1; color: var(--gold-400); font-size: 24px; }
.hero-copy h1 {
  position: relative;
  z-index: 1;
  margin: 7px 0 4px;
  color: var(--gold-400);
  font-family: var(--serif);
  font-size: clamp(35px, 3.4vw, 56px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: .035em;
  text-transform: uppercase;
  text-shadow: 0 3px 0 #030d1b, 0 0 24px rgba(226,180,57,.22);
}
.hero-subtitle {
  position: relative;
  z-index: 1;
  margin: 4px 0 3px;
  color: #fff4d2;
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  letter-spacing: .08em;
}
.hero-intro {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 0 12px;
  color: #d9dee5;
  font-size: 10px;
  line-height: 1.4;
}
.hero-intro p { margin: 0; }
.next-card {
  position: relative;
  z-index: 2;
  width: min(460px, 100%);
  padding: 12px 22px 16px;
  border: 1px solid var(--gold-500);
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 9, 23, .76);
  box-shadow: 0 8px 25px rgba(0,0,0,.36), inset 0 0 24px rgba(15,67,116,.25);
}
.next-card h2 { margin: 0; color: var(--gold-400); font-family: var(--serif); font-size: 16px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.next-card h2 strong { color: #fff; font-weight: 700; }
.next-card > p { display: flex; justify-content: center; gap: 9px; margin: 5px 0 10px; color: #ddd3bb; font-size: 11px; }
.hero-countdown { display: flex; align-items: center; justify-content: center; gap: 12px; }
.hero-countdown span { display: grid; min-width: 58px; }
.hero-countdown b { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-countdown small { margin-top: 5px; color: var(--gold-400); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-countdown i { color: var(--gold-400); font-family: var(--serif); font-size: 27px; font-style: normal; }

/* Parchment result surface */
.parchment-section,
.inner-shell {
  background:
    radial-gradient(circle at 48% 0, rgba(255,255,255,.8), transparent 32rem),
    repeating-linear-gradient(93deg, rgba(115, 79, 26, .018) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #fffaf0, var(--parchment) 74%, #ead5b1);
}
.result-and-draws {
  display: grid;
  grid-template-columns: minmax(350px, 36%) minmax(0, 64%);
  min-height: 252px;
  border-bottom: 2px solid var(--gold-600);
}
.latest-panel { min-width: 0; padding: 21px clamp(24px, 3vw, 47px) 24px; text-align: center; }
.result-and-draws > .latest-panel { border-right: 1px solid var(--line); }
.ornate-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 8px;
  color: var(--burgundy-700);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  text-transform: uppercase;
}
.ornate-heading::before,
.ornate-heading::after { width: min(90px, 22%); height: 1px; background: linear-gradient(90deg, transparent, var(--gold-600)); content: ""; }
.ornate-heading::after { transform: scaleX(-1); }
.draw-badge {
  display: inline-block;
  padding: 4px 22px;
  border-radius: 99px;
  color: var(--gold-700);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.result-meta { display: flex; justify-content: center; gap: 8px; margin: 6px 0 12px; color: #5c5044; font-size: 12px; text-transform: uppercase; }
.result-digits { display: flex; justify-content: center; gap: clamp(7px, 1.2vw, 17px); margin: 0 auto 15px; }
.result-digits b {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  width: clamp(54px, 5.2vw, 76px);
  aspect-ratio: 1;
  padding: 0 0 .08em;
  border: 2px solid #b67a15;
  border-radius: 5px;
  color: var(--gold-400);
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 38%),
    linear-gradient(180deg, #101820, #02070e);
  box-shadow: inset 0 0 0 1px rgba(255,226,131,.22), inset 0 -8px 15px rgba(0,0,0,.54), 0 3px 7px rgba(77,44,6,.38);
  font-family: var(--serif);
  font-size: clamp(29px, 3vw, 44px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  text-indent: 0;
  text-shadow: 0 1px #fff0a0, 0 2px 0 #6b4300;
}
.royal-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 9px 22px;
  border: 1px solid var(--gold-600);
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(180deg, #8e1512, #5e0000);
  box-shadow: inset 0 1px rgba(255,255,255,.17), 0 3px 7px rgba(45,0,0,.2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
}
.royal-button:hover,
.royal-button:focus-visible { filter: brightness(1.13); transform: translateY(-1px); }
.royal-button span { color: var(--gold-400); font-size: 20px; line-height: .6; }
.royal-button.outline { border-color: var(--gold-500); color: var(--gold-400); background: transparent; box-shadow: none; }

.daily-panel { min-width: 0; padding: 21px clamp(20px, 3vw, 44px) 22px; }
.daily-panel .ornate-heading { margin-bottom: 15px; }
.daily-draws { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid rgba(120,74,5,.28); border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.26); }
.draw-item { position: relative; display: grid; min-width: 0; min-height: 151px; place-items: center; align-content: start; padding: 12px 6px 9px; text-align: center; }
.draw-item + .draw-item { border-left: 1px solid rgba(120,74,5,.25); }
.draw-icon { display: grid; width: 50px; height: 50px; place-items: center; margin-bottom: 5px; border: 1px solid var(--gold-600); border-radius: 50%; background: radial-gradient(circle at 35% 28%, #fff9d9 0 7%, #dca927 25%, #8e5804 72%, #3d2100 100%); box-shadow: 0 3px 9px rgba(89,54,0,.3); }
.draw-icon svg { width: 34px; height: 34px; color: #fff9de; fill: currentColor; }
.draw-item h3 { min-height: 32px; margin: 0; color: var(--navy-950); font-family: var(--serif); font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; }
.draw-item time { margin: 1px 0 5px; color: var(--muted); font-size: 10px; }
.draw-status { display: inline-flex; min-height: 22px; align-items: center; padding: 2px 7px; border: 1px solid currentColor; border-radius: 99px; font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.draw-status.completed { color: #126238; background: #e3f3df; }
.draw-status.up-next { color: var(--burgundy-700); background: #f5ded9; }
.draw-status.awaiting-result { color: #805710; background: #fff1c7; }
.draw-status.upcoming { color: var(--navy-800); background: #e0ebf3; }
.draw-item > strong { margin-top: 5px; color: var(--burgundy-700); font-family: var(--serif); font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.draw-item > strong span { font-size: 13px; }

/* Lower navy statistics/history */
.royal-dark-section { color: #fff; background: linear-gradient(145deg, #062a55, #02162f 62%, #010d1e); }
.home-lower { display: grid; grid-template-columns: 42% 58%; min-height: 265px; border-bottom: 2px solid var(--gold-600); }
.home-lower > article { min-width: 0; padding: 23px clamp(23px, 3vw, 42px); }
.home-lower > article + article { border-left: 1px solid rgba(226,177,48,.28); }
.home-lower h2 { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 0 14px; color: var(--gold-400); font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.home-lower h2 svg { width: 22px; height: 22px; fill: currentColor; }
.royal-table-wrap { width: 100%; overflow-x: auto; scrollbar-color: var(--gold-600) rgba(0,0,0,.2); }
.royal-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.royal-table th { padding: 7px 9px; border-bottom: 1px solid rgba(231,188,72,.46); color: var(--gold-400); font-family: var(--serif); font-size: 10px; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.royal-table td { padding: 7px 9px; border-bottom: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
.royal-table td b { color: var(--gold-400); font-family: var(--serif); font-size: 16px; letter-spacing: .08em; }
.empty-cell { color: #c8d0db; text-align: center; white-space: normal !important; }
.home-lower .royal-button { display: flex; width: max-content; margin: 15px auto 0; }
.number-ranks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 38px); }
.number-ranks section { min-width: 0; text-align: center; }
.number-ranks h3,
.number-ranks h2 { justify-content: center; margin: 0 0 8px; font-family: var(--serif); font-size: 15px; text-transform: uppercase; }
.number-ranks section > div { display: flex; justify-content: center; gap: 8px; }
.number-ranks section > div > span { display: grid; width: clamp(45px, 4.1vw, 61px); aspect-ratio: 1; place-items: center; align-content: center; border: 1px solid currentColor; border-radius: 50%; background: rgba(0,0,0,.22); font-family: var(--serif); }
.number-ranks section > div b { font-size: clamp(22px, 2.1vw, 31px); line-height: 1; }
.number-ranks section > div small { margin-top: 2px; font: 700 8px var(--sans); }
.number-ranks p { margin: 7px 0 0; color: #c2cbd5; font-size: 9px; }
.number-ranks .hot { color: var(--gold-400); }
.number-ranks .cold { color: #a9d0f3; }
.mobile-actions { display: none; }

/* Inner routes */
.inner-banner {
  position: relative;
  overflow: hidden;
  padding: 40px 6% 37px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(91,0,0,.8), transparent 25% 75%, rgba(91,0,0,.8)),
    radial-gradient(circle at 50% -15%, #164e86, transparent 46%),
    var(--navy-950);
  border-bottom: 3px solid var(--gold-500);
}
.inner-banner::before,
.inner-banner::after { position: absolute; top: 50%; width: 24%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-400)); content: ""; }
.inner-banner::before { left: 7%; }
.inner-banner::after { right: 7%; transform: scaleX(-1); }
.inner-banner p { margin: 0 0 4px; color: var(--gold-400); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.inner-banner h1 { position: relative; z-index: 1; margin: 0; color: #fff7e1; font-family: var(--serif); font-size: clamp(34px, 4vw, 53px); font-weight: 600; line-height: 1.1; letter-spacing: .04em; text-transform: uppercase; }
.inner-shell { min-height: 390px; padding: clamp(30px, 4.5vw, 64px) clamp(24px, 6vw, 90px) clamp(45px, 6vw, 80px); }
.latest-page-panel { display: grid; gap: 26px; justify-items: center; }
.latest-page-panel .latest-panel { width: min(760px, 100%); border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.45); box-shadow: 0 10px 30px rgba(92,59,14,.1); }
.next-card.wide { width: min(760px,100%); margin: 0 auto 34px; padding: 20px 30px; text-align: center; background: linear-gradient(135deg, var(--navy-900), var(--navy-1000)); }
.next-card.wide .hero-countdown b { font-size: 42px; }
.schedule-cards { display: grid; width: min(1050px,100%); margin: 0 auto; gap: 12px; }
.schedule-cards > article { display: grid; grid-template-columns: 62px minmax(0,1fr) auto auto; gap: 18px; align-items: center; padding: 15px 20px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.55); box-shadow: 0 4px 14px rgba(74,43,6,.07); }
.schedule-cards .draw-icon { margin: 0; }
.schedule-cards h2 { margin: 0; color: var(--navy-950); font-family: var(--serif); font-size: 20px; text-transform: uppercase; }
.schedule-cards p { margin: 2px 0; color: var(--muted); font-size: 12px; }
.schedule-cards small { color: #87745e; font-size: 9px; }
.schedule-cards time { min-width: 96px; color: var(--burgundy-700); font-family: var(--serif); font-size: 20px; font-weight: 700; text-align: right; }
.schedule-cards i { justify-self: end; font-style: normal; }
.official-note { margin: 18px auto 0; color: var(--muted); font-size: 11px; text-align: center; }

.filter-form { display: grid; grid-template-columns: repeat(5,minmax(130px,1fr)); gap: 12px; align-items: end; margin: 0 0 24px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.5); }
.filter-form.compact { width: min(970px,100%); grid-template-columns: repeat(3,minmax(150px,1fr)) auto; margin-right: auto; margin-left: auto; }
.filter-form label { display: grid; gap: 5px; min-width: 0; }
.filter-form label span,
.contact-form label span { color: #665441; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.filter-form input,
.filter-form select,
.contact-form input,
.contact-form textarea { width: 100%; min-height: 44px; border: 1px solid #bca889; border-radius: 4px; color: var(--ink); background: #fffdf8; outline: none; }
.filter-form input,
.filter-form select { padding: 8px 10px; }
.filter-form input:focus,
.filter-form select:focus,
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--gold-700); box-shadow: 0 0 0 3px rgba(215,166,42,.2); }
.filter-form > div { display: flex; align-items: center; gap: 10px; }
.text-button { min-height: 42px; display: inline-flex; align-items: center; color: var(--burgundy-700); font-size: 12px; font-weight: 800; }
.royal-table-wrap.light { border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.62); }
.royal-table-wrap.light .royal-table { min-width: 760px; color: var(--ink); font-size: 12px; }
.royal-table-wrap.light th { color: #fff; background: var(--navy-900); }
.royal-table-wrap.light td { border-color: rgba(105,74,27,.18); }
.royal-table-wrap.light td b { color: var(--burgundy-700); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 22px; }
.pagination a { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 3px; color: var(--navy-950); background: #fffdf7; font-weight: 800; text-decoration: none; }
.pagination a.active { color: #fff; background: var(--burgundy-700); }

.number-ranks.full { width: min(900px,100%); margin: 0 auto 30px; gap: 22px; }
.number-ranks.full section { padding: 25px; border: 1px solid var(--line); border-radius: 8px; background: var(--navy-950); }
.number-ranks.full h2 { display: block; color: inherit; font-size: 20px; }
.number-ranks.full section > div > span { width: clamp(56px,6vw,78px); }
.number-ranks.full section > div b { font-size: 35px; }
.frequency-grid { display: grid; width: min(900px,100%); grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 25px; margin: 0 auto; }
.frequency-grid article { padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.52); }
.frequency-grid header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.frequency-grid header b { color: var(--burgundy-700); font-family: var(--serif); font-size: 23px; }
.frequency-grid header span { color: var(--muted); font-size: 10px; }
.frequency-grid article > div { height: 7px; overflow: hidden; border-radius: 99px; background: #d8c8ad; }
.frequency-grid article > div i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg,var(--burgundy-700),var(--gold-500)); }
.frequency-grid p { margin: 6px 0 0; color: var(--muted); font-size: 9px; }

.prose { max-width: none; }
.prose > h2,
.contact-layout h2 { margin: 0 0 16px; color: var(--burgundy-700); font-family: var(--serif); font-size: clamp(27px,3vw,40px); font-weight: 600; }
.prose > h3 { margin: 28px 0 8px; color: var(--navy-900); font-family: var(--serif); font-size: 22px; }
.prose > p,
.prose .editable-copy,
.contact-layout > article p,
.contact-layout .editable-copy { max-width: 850px; color: #514638; font-family: var(--serif); font-size: 17px; line-height: 1.75; }
.editable-copy > :first-child { margin-top: 0; }
.editable-copy > :last-child { margin-bottom: 0; }
.value-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 38px; }
.value-cards article { padding: 25px; border: 1px solid var(--line); border-radius: 8px; text-align: center; background: rgba(255,255,255,.5); }
.value-cards article > b { display: grid; width: 68px; height: 68px; place-items: center; margin: 0 auto 10px; border: 2px solid var(--gold-600); border-radius: 50%; color: var(--burgundy-700); font: 700 37px var(--serif); }
.value-cards h3 { margin: 0; color: var(--navy-950); font-family: var(--serif); }
.value-cards p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.contact-layout { display: grid; grid-template-columns: minmax(250px,.75fr) minmax(380px,1.25fr); gap: clamp(30px,6vw,90px); }
.contact-layout > article a { color: var(--burgundy-700); font-weight: 800; }
.contact-form { display: grid; gap: 13px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.58); }
.contact-form label { display: grid; gap: 5px; }
.contact-form input,
.contact-form textarea { padding: 10px 12px; }
.contact-form textarea { min-height: 155px; resize: vertical; }
.contact-form .royal-button { justify-self: start; min-width: 165px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* Footer */
.site-footer {
  position: relative;
  min-height: 146px;
  overflow: hidden;
  padding: 32px clamp(25px,5vw,72px) 28px;
  color: #f9ead1;
  text-align: center;
  background:
    radial-gradient(circle at 50% -50%, rgba(244,201,93,.24), transparent 62%),
    linear-gradient(110deg, var(--burgundy-900), #730b09 48%, #470000);
  border-top: 2px solid var(--gold-500);
}
.footer-ornament { position: absolute; top: 15px; left: 50%; width: 220px; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg,transparent,var(--gold-400),transparent); }
.footer-ornament::after { position: absolute; top: -5px; left: calc(50% - 5px); width: 10px; height: 10px; transform: rotate(45deg); border: 1px solid var(--gold-400); content: ""; }
.site-footer > strong { display: block; color: var(--gold-400); font-family: var(--serif); font-size: 21px; letter-spacing: .18em; }
.site-footer p { margin: 6px 0 14px; font-size: 10px; }
.site-footer .footer-copy { margin: 5px auto 0; font: 12px/1.45 var(--serif); }
.site-footer .footer-copy p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.site-footer nav a { min-height: 32px; color: #fff8e7; font-size: 10px; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 4px; }

@media (max-width: 1200px) {
  .royal-frame { width: min(1500px, calc(100% - 24px)); margin: 12px auto; }
  .site-nav a { padding-right: 18px; padding-left: 18px; font-size: 12px; }
  .royal-hero { grid-template-columns: 54% 46%; }
  .hero-copy { padding-right: 30px; padding-left: 30px; }
  .result-and-draws { grid-template-columns: 35% 65%; }
  .daily-panel { padding-right: 16px; padding-left: 16px; }
  .draw-icon { width: 44px; height: 44px; }
  .draw-icon svg { width: 29px; height: 29px; }
  .draw-item h3 { font-size: 10px; }
  .filter-form { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 992px) {
  .site-header { min-height: 128px; }
  .brand-crest { width: 94px; height: 94px; }
  .site-brand > span { min-width: 250px; }
  .site-brand strong { font-size: 42px; }
  .site-nav a { padding: 0 11px; font-size: 10px; }
  .royal-hero { grid-template-columns: 51% 49%; min-height: 335px; }
  .palace-photo img { min-height: 335px; }
  .hero-copy h1 { font-size: 35px; }
  .hero-copy { padding: 24px 20px; }
  .result-and-draws { grid-template-columns: 1fr; }
  .result-and-draws > .latest-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .daily-panel { padding: 24px; }
  .home-lower { grid-template-columns: 1fr; }
  .home-lower > article + article { border-top: 1px solid rgba(226,177,48,.28); border-left: 0; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body { background: var(--navy-1000); }
  .royal-frame { width: calc(100% - 16px); min-height: calc(100vh - 16px); margin: 8px auto; border-width: 1px; border-radius: 12px; }
  .site-header { display: flex; min-height: 122px; align-items: center; justify-content: center; padding: 7px 55px 7px 10px; overflow: visible; }
  .site-header::before,
  .site-header::after,
  .header-arch { display: none; }
  .site-brand { gap: 7px; }
  .brand-crest { width: 76px; height: 76px; }
  .site-brand > span { min-width: 0; }
  .site-brand strong { font-size: clamp(26px,9.2vw,39px); letter-spacing: .035em; }
  .site-brand small { margin-top: 7px; font-size: 7px; letter-spacing: .28em; }
  .menu-toggle {
    position: absolute;
    z-index: 60;
    top: 38px;
    right: 14px;
    display: grid;
    width: 45px;
    height: 45px;
    place-content: center;
    gap: 5px;
    border: 1px solid rgba(83,50,3,.35);
    border-radius: 4px;
    background: rgba(255,250,238,.66);
    cursor: pointer;
  }
  .menu-toggle span { width: 23px; height: 2px; border-radius: 2px; background: var(--burgundy-700); transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: absolute;
    z-index: 50;
    top: 130px;
    right: 9px;
    left: 9px;
    display: none;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    border: 1px solid var(--gold-500);
    border-radius: 0 0 7px 7px;
    box-shadow: 0 14px 28px rgba(0,0,0,.42);
  }
  .site-nav.open { display: block; }
  .site-nav a { min-height: 47px; justify-content: start; padding: 0 20px; border-bottom: 1px solid rgba(255,228,159,.2); font-size: 12px; }
  .site-nav a + a::before { display: none; }
  .site-nav a::after { top: 11px; right: auto; bottom: 11px; left: 7px; width: 2px; height: auto; transform: scaleY(0); }
  .site-nav a.active::after { transform: scaleY(1); }

  .royal-hero { display: flex; min-height: 0; flex-direction: column; border-bottom-width: 2px; }
  .palace-photo { width: 100%; height: clamp(102px,29vw,124px); }
  .palace-photo img { min-height: 0; height: 100%; object-position: center 48%; }
  .hero-copy { min-height: 110px; justify-content: center; padding: 8px 12px 9px; }
  .hero-copy::before,
  .hero-copy::after,
  .hero-copy > .royal-flourish,
  .hero-copy > h1,
  .hero-copy > .hero-subtitle,
  .hero-copy > .hero-intro { display: none; }
  .curtain-swag { opacity: .1; }
  .next-card { width: 100%; padding: 7px 10px 8px; border-radius: 6px; }
  .next-card h2 { font-size: 14px; }
  .next-card > p { margin: 2px 0 4px; font-size: 9px; }
  .hero-countdown { gap: 9px; }
  .hero-countdown span { min-width: 54px; }
  .hero-countdown b { font-size: 27px; }

  .result-and-draws { display: block; min-height: 0; }
  .latest-panel { padding: 15px 13px 16px; }
  .ornate-heading { gap: 8px; font-size: 21px; }
  .ornate-heading::before,
  .ornate-heading::after { width: 44px; }
  .draw-badge { font-size: 12px; }
  .result-meta { font-size: 10px; }
  .result-digits { gap: clamp(7px,3vw,13px); }
  .result-digits b { width: min(19vw,68px); max-width: 68px; font-size: clamp(28px,10vw,40px); }
  .royal-button { min-height: 45px; }
  .daily-panel { padding: 13px 12px 16px; }
  .daily-panel .ornate-heading { margin-bottom: 8px; }
  .daily-draws { display: grid; grid-template-columns: 1fr; border-radius: 6px; }
  .draw-item { grid-template-columns: 39px minmax(0,1fr) auto; grid-template-rows: auto auto; min-height: 47px; align-items: center; place-items: initial; align-content: normal; gap: 0 8px; padding: 5px 10px; text-align: left; }
  .draw-item + .draw-item { border-top: 1px solid rgba(120,74,5,.25); border-left: 0; }
  .draw-icon { grid-row: 1 / 3; width: 34px; height: 34px; margin: 0; }
  .draw-icon svg { width: 23px; height: 23px; }
  .draw-item h3 { min-height: 0; align-self: end; font-size: 11px; }
  .draw-item time { grid-column: 2; align-self: start; margin: 0; font-size: 9px; }
  .draw-status { grid-column: 3; grid-row: 1; min-height: 18px; justify-self: end; padding: 1px 6px; font-size: 7px; }
  .draw-item > strong { grid-column: 3; grid-row: 2; align-self: start; justify-self: end; margin: 0; font-size: 15px; }
  .draw-item > strong span { font-size: 12px; }
  .daily-draws .draw-status.completed { display: none; }
  .daily-draws .draw-status.completed + strong { grid-row: 1 / 3; align-self: center; }
  .home-lower { display: none; }
  .mobile-actions { display: grid; background: #fffaf0; }
  .mobile-actions a { display: grid; grid-template-columns: 36px 1fr auto; min-height: 60px; align-items: center; gap: 10px; padding: 9px 17px; border-bottom: 1px solid var(--line); color: var(--navy-950); font-family: var(--serif); font-size: 14px; font-weight: 700; text-decoration: none; text-transform: uppercase; }
  .mobile-actions svg { width: 27px; height: 27px; fill: var(--burgundy-700); }
  .mobile-actions b { color: var(--gold-700); font-size: 24px; }

  .inner-banner { padding: 30px 15px 27px; }
  .inner-banner::before,
  .inner-banner::after { display: none; }
  .inner-banner h1 { font-size: 30px; }
  .inner-shell { min-height: 320px; padding: 25px 13px 44px; }
  .latest-page-panel .latest-panel { padding-right: 9px; padding-left: 9px; }
  .next-card.wide { margin-bottom: 24px; padding: 17px 10px; }
  .next-card.wide .hero-countdown b { font-size: 32px; }
  .schedule-cards > article { grid-template-columns: 52px minmax(0,1fr) auto; gap: 10px; padding: 12px 10px; }
  .schedule-cards h2 { font-size: 15px; }
  .schedule-cards p { font-size: 10px; }
  .schedule-cards small { font-size: 8px; }
  .schedule-cards time { grid-column: 3; grid-row: 1; min-width: 0; font-size: 15px; }
  .schedule-cards i { grid-column: 3; grid-row: 2; }
  .filter-form,
  .filter-form.compact { width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; }
  .filter-form > div { grid-column: 1 / -1; }
  .royal-table-wrap.light { margin-right: -13px; margin-left: -13px; border-right: 0; border-left: 0; border-radius: 0; }
  .number-ranks.full { grid-template-columns: 1fr; }
  .number-ranks.full section { padding: 20px 10px; }
  .number-ranks.full section > div { gap: 5px; }
  .number-ranks.full section > div > span { width: min(19vw,68px); }
  .frequency-grid { grid-template-columns: 1fr; }
  .value-cards { grid-template-columns: 1fr; }
  .prose > p,
  .prose .editable-copy,
  .contact-layout > article p,
  .contact-layout .editable-copy { font-size: 15px; }
  .contact-form { padding: 16px 12px; }
  .contact-form .royal-button { width: 100%; }
  .site-footer { min-height: 136px; padding: 31px 18px 25px; }
  .site-footer > strong { font-size: 17px; }
  .site-footer nav a { min-height: 44px; align-items: center; display: inline-flex; }
}

@media (max-width: 480px) {
  .brand-crest { width: 69px; height: 69px; }
  .site-brand strong { font-size: clamp(25px,9vw,35px); }
  .site-brand small { display: none; }
  .hero-copy { min-height: 108px; }
  .hero-countdown b { font-size: 29px; }
  .hero-countdown span { min-width: 48px; }
  .latest-panel .royal-button { width: min(310px,100%); }
}

@media (max-width: 360px) {
  .royal-frame { width: calc(100% - 10px); margin: 5px auto; }
  .site-header { min-height: 112px; padding-right: 50px; }
  .brand-crest { width: 61px; height: 61px; }
  .site-brand strong { font-size: 27px; }
  .menu-toggle { top: 35px; right: 9px; width: 42px; height: 42px; }
  .site-nav { top: 117px; right: 6px; left: 6px; }
  .palace-photo { height: 96px; }
  .hero-countdown { gap: 5px; }
  .hero-countdown b { font-size: 27px; }
  .hero-countdown span { min-width: 46px; }
  .result-digits { gap: 6px; }
  .result-digits b { width: 66px; font-size: 32px; }
  .filter-form,
  .filter-form.compact { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* --------------------------------------------------------------------------
   Reference-accurate Lima Lotto public composition (v1.5)
   Uses the supplied clean header and hero backgrounds as complete compositions,
   plus the supplied eagle crest and wordmark. No reconstructed corner, curtain,
   palace, filter, or gradient layer is placed over these two backgrounds.
   -------------------------------------------------------------------------- */
.reference-design-v11 .royal-frame {
  width: min(1180px, calc(100% - 12px));
  min-height: 0;
  margin: 5px auto;
  border-width: 2px;
  border-radius: 12px;
}
.reference-design-v11 .site-header {
  min-height: 145px;
  padding: 5px 70px 4px 28px;
  background-color: #f7ecd8;
  background-image: var(--site-header-image, url('../images/lima-background-header-clean.png'));
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.reference-design-v11 .site-header::before,
.reference-design-v11 .site-header::after { display: none; }
.reference-design-v11 .header-arch { display: none; }
.reference-design-v11 .header-curtain {
  display: none;
}
.reference-design-v11 .site-brand {
  width: min(550px, 74vw);
  justify-content: center;
  filter: drop-shadow(0 2px 1px rgba(255,255,255,.8));
}
.reference-design-v11 .site-brand > .reference-brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.reference-design-v11 .brand-reference-crest {
  width: 165px;
  height: 132px;
  flex: 0 0 165px;
  object-fit: fill;
}
.reference-design-v11 .brand-reference-type {
  display: grid;
  min-width: 0;
  justify-items: center;
}
.reference-design-v11 .brand-reference-type img {
  width: 350px;
  height: auto;
  object-fit: contain;
}
.reference-design-v11 .brand-reference-type small {
  margin-top: 8px;
  color: #805713;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .24em;
  line-height: 1;
}
.reference-design-v11 .brand-custom-logo {
  width: min(580px, 74vw);
  height: auto;
  max-height: 132px;
  object-fit: contain;
}
.reference-design-v11 .site-nav { min-height: 38px; }
.reference-design-v11 .site-nav a {
  min-height: 36px;
  padding: 0 clamp(15px,2.35vw,30px);
  font-size: 11px;
}
.reference-design-v11 .site-nav a + a::before { top: 10px; bottom: 10px; }
.reference-design-v11 .site-nav a::after { bottom: 3px; }
.reference-design-v11 .site-nav a.active {
  background: linear-gradient(180deg,rgba(164,25,21,.76),rgba(92,0,0,.46));
  box-shadow: inset 0 -2px var(--gold-400);
}

.reference-design-v11 .royal-hero {
  position: relative;
  grid-template-columns: minmax(0,56%) minmax(0,44%);
  min-height: 225px;
  max-height: 286px;
  border-bottom-width: 2px;
  background-color: var(--navy-950);
  background-image: var(--site-hero-image, url('../images/lima-background-hero-clean.png'));
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.reference-design-v11 .royal-hero::before,
.reference-design-v11 .royal-hero::after {
  position: absolute;
  z-index: 4;
  top: 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  content: "";
  pointer-events: none;
}
.reference-design-v11 .royal-hero::before,
.reference-design-v11 .royal-hero::after { display: none; }
.reference-design-v11 .palace-photo img {
  min-height: 225px;
  height: 100%;
  opacity: 0;
  transform: none;
  filter: none;
}
.reference-design-v11 .palace-photo { position: relative; background: transparent; }
.reference-design-v11 .palace-photo::after { display: none; }
.reference-design-v11 .hero-copy {
  padding: 14px 0 12px;
  background: transparent;
}
.reference-design-v11 .hero-copy::before,
.reference-design-v11 .hero-copy::after { display: none; }
.reference-design-v11 .hero-copy > .royal-flourish,
.reference-design-v11 .hero-copy > h1,
.reference-design-v11 .hero-copy > .hero-subtitle,
.reference-design-v11 .hero-copy > .hero-intro,
.reference-design-v11 .hero-copy > .next-card {
  transform: translateX(clamp(-66px,-6.2vw,-48px));
}
.reference-design-v11 .hero-copy h1 {
  width: 74%;
  max-width: none;
  margin: 1px 0 2px;
  color: var(--gold-500);
  font-size: clamp(29px,3.35vw,42px);
  line-height: 1.02;
}
.reference-design-v11 .royal-flourish {
  width: 122px;
  height: 18px;
  background: url('../images/lima-scrollwork.svg') center / contain no-repeat;
  font-size: 0;
}
.reference-design-v11 .royal-flourish::before {
  display: none;
}
.reference-design-v11 .royal-flourish::after {
  display: none;
}
.reference-design-v11 .hero-subtitle { width: 70%; margin: 2px 0 7px; font-size: 15px; font-style: normal; text-align: center; }
.reference-design-v11 .hero-intro { display: none; }
.reference-design-v11 .curtain-swag {
  display: none;
}
.reference-design-v11 .next-card {
  width: min(360px,70%);
  padding: 7px 14px 8px;
  border-radius: 4px;
}
.reference-design-v11 .next-card h2 { font-size: 14px; }
.reference-design-v11 .next-card > p { margin: 2px 0 5px; font-size: 9px; }
.reference-design-v11 .hero-countdown { gap: 7px; }
.reference-design-v11 .hero-countdown span { min-width: 45px; }
.reference-design-v11 .hero-countdown b { font-size: 27px; }
.reference-design-v11 .hero-countdown small { margin-top: 2px; font-size: 6px; }
.reference-design-v11 .hero-countdown i { font-size: 22px; }

.reference-design-v11 .result-and-draws {
  grid-template-columns: minmax(300px,35.3%) minmax(0,64.7%);
  min-height: 166px;
}
.reference-design-v11 .parchment-section,
.reference-design-v11 .inner-shell {
  background-image:
    var(--site-parchment-image, none),
    radial-gradient(circle at 48% 0,rgba(255,255,255,.8),transparent 32rem),
    repeating-linear-gradient(93deg,rgba(115,79,26,.018) 0 1px,transparent 1px 5px),
    linear-gradient(180deg,#fffaf0,var(--parchment) 74%,#ead5b1);
  background-position: center,center,center,center;
  background-repeat: repeat,no-repeat,repeat,no-repeat;
  background-size: cover,auto,auto,auto;
}
.reference-design-v11 .result-and-draws > .latest-panel { padding: 6px 20px; }
.reference-design-v11 .result-and-draws .ornate-heading { margin-bottom: 4px; font-size: 19px; line-height: 1; }
.reference-design-v11 .result-and-draws .ornate-heading::before,
.reference-design-v11 .result-and-draws .ornate-heading::after {
  width: 58px;
  height: 14px;
  flex: 0 1 58px;
  background: url('../images/lima-scrollwork.svg') center / contain no-repeat;
  content: "";
}
.reference-design-v11 .result-and-draws .ornate-heading::after { transform: scaleX(-1); }
.reference-design-v11 .result-and-draws .draw-badge {
  padding: 3px 22px;
  border: 1px solid var(--gold-600);
  border-radius: 4px;
  color: var(--gold-400);
  background: var(--navy-950);
  font-size: 12px;
  line-height: 1;
}
.reference-design-v11 .result-and-draws .result-meta { margin: 3px 0 4px; font-size: 9px; line-height: 1.1; }
.reference-design-v11 .result-and-draws .result-digits { gap: 5px; margin-bottom: 4px; }
.reference-design-v11 .result-and-draws .result-digits b { width: 53px; height: 50px; aspect-ratio: auto; font-size: 35px; }
.reference-design-v11 .result-and-draws .royal-button { min-height: 22px; padding: 2px 16px; font-size: 9px; line-height: 1; }
.reference-design-v11 .result-and-draws .royal-button span { font-size: 15px; }
.reference-design-v11 .daily-panel { padding: 8px 8.25% 6px 1.5%; }
.reference-design-v11 .daily-panel .ornate-heading { margin-bottom: 4px; font-size: 19px; line-height: 1; }
.reference-design-v11 .daily-draws { border: 0; border-radius: 0; background: transparent; }
.reference-design-v11 .daily-draws .draw-label { display: grid; min-width: 0; justify-items: center; }
.reference-design-v11 .daily-draws .draw-item { min-height: 122px; padding: 2px 4px; }
.reference-design-v11 .daily-draws .draw-icon { width: 48px; height: 48px; margin-bottom: 2px; }
.reference-design-v11 .daily-draws .draw-icon svg { width: 30px; height: 30px; }
.reference-design-v11 .draw-item:nth-child(1) .draw-icon { background: radial-gradient(circle at 35% 28%,#fff4c7 0 7%,#c69416 25%,#790000 72%,#330000 100%); }
.reference-design-v11 .draw-item:nth-child(2) .draw-icon,
.reference-design-v11 .draw-item:nth-child(3) .draw-icon { background: radial-gradient(circle at 35% 28%,#fffbe0 0 7%,#d3a520 25%,#123f78 72%,#031a37 100%); }
.reference-design-v11 .draw-item:nth-child(4) .draw-icon,
.reference-design-v11 .draw-item:nth-child(5) .draw-icon { background: radial-gradient(circle at 35% 28%,#fffbe0 0 7%,#173f82 25%,#062a55 72%,#011126 100%); }
.reference-design-v11 .daily-draws .draw-item h3 { min-height: 15px; font-size: 11px; line-height: 1.1; }
.reference-design-v11 .daily-draws .draw-item time { margin: 0 0 2px; font-size: 9px; line-height: 1; }
.reference-design-v11 .daily-draws .draw-status { min-height: 14px; padding: 1px 7px; font-size: 7px; line-height: 1; }
.reference-design-v11 .daily-draws .draw-status.completed {
  border-color: #b8ae9f;
  color: #292725;
  background: linear-gradient(180deg,#eeeae2,#d1cabf);
}
.reference-design-v11 .daily-draws .draw-status.up-next {
  border-color: #790000;
  color: #fff9ee;
  background: linear-gradient(180deg,#a91919,#790000);
}
.reference-design-v11 .daily-draws .draw-item > strong { margin-top: 1px; font-size: 15px; line-height: 1; }

.reference-design-v11 .home-lower {
  position: relative;
  grid-template-columns: 40.5% 59.5%;
  min-height: 171px;
  overflow: hidden;
  background:
    linear-gradient(90deg,rgba(101,0,0,.3),transparent 13% 87%,rgba(101,0,0,.3)),
    linear-gradient(145deg,#062a55,#02162f 62%,#010d1e);
}
.reference-design-v11 .home-lower::before,
.reference-design-v11 .home-lower::after {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  height: 100%;
  opacity: 1;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  content: "";
  pointer-events: none;
}
.reference-design-v11 .home-lower::before {
  left: 0;
  width: 4.5%;
  background-image: var(--site-curtain-image, url('../images/lima-lower-left-curtain.png'));
}
.reference-design-v11 .home-lower::after {
  right: 0;
  width: 6.6%;
  background-image: var(--site-curtain-image, url('../images/lima-lower-right-curtain.png'));
}
.reference-design-v11 .home-lower > article { position: relative; z-index: 1; padding: 8px 20px; }
.reference-design-v11 .home-lower > .history-preview { padding-left: 32px; }
.reference-design-v11 .home-lower > .statistics-preview > h2,
.reference-design-v11 .home-lower > .statistics-preview > .royal-button { position: relative; left: -27px; }
.reference-design-v11 .home-lower > .statistics-preview > .number-ranks { position: relative; left: -20px; }
.reference-design-v11 .home-lower h2 { margin-bottom: 4px; font-size: 17px; line-height: 1; }
.reference-design-v11 .home-lower h2 svg { width: 17px; height: 17px; }
.reference-design-v11 .home-lower .royal-table { font-size: 9px; line-height: 1.1; }
.reference-design-v11 .home-lower .royal-table th { padding: 2px 7px; font-size: 8px; line-height: 1; }
.reference-design-v11 .home-lower .royal-table td { padding: 2px 7px; line-height: 1.05; }
.reference-design-v11 .home-lower .royal-table td b { font-size: 11px; line-height: 1; }
.reference-design-v11 .home-lower > article { display: flex; flex-direction: column; }
.reference-design-v11 .home-lower > .history-preview > .royal-button { position: relative; left: -7px; }
.reference-design-v11 .home-lower .royal-button { width: min(256px,100%); min-height: 24px; margin: auto auto 6px; padding: 2px 16px; font-size: 9px; line-height: 1; }
.reference-design-v11 .home-lower .number-ranks { width: min(420px,100%); margin: 7px auto 0; gap: 0; }
.reference-design-v11 .home-lower .number-ranks section { display: grid; position: relative; min-height: 100px; padding: 7px 8px 8px; border: 1px solid var(--gold-600); }
.reference-design-v11 .home-lower .number-ranks .hot {
  color: var(--gold-400);
  background: linear-gradient(145deg,#790000,#4d0000 72%,#300000);
}
.reference-design-v11 .home-lower .number-ranks .cold {
  color: var(--gold-400);
  background: linear-gradient(145deg,#062a55,#031a37 72%,#011126);
}
.reference-design-v11 .home-lower .number-ranks h3 { margin-bottom: 4px; font-size: 10px; line-height: 1; }
.reference-design-v11 .home-lower .number-ranks section > div { gap: 10px; }
.reference-design-v11 .home-lower .number-ranks section > div > span { position: relative; width: 34px; border-color: var(--gold-500); color: var(--gold-400); }
.reference-design-v11 .home-lower .number-ranks .hot section > div > span,
.reference-design-v11 .home-lower .number-ranks .hot > div > span { background: radial-gradient(circle,#9d1717,#650000 68%,#300000); }
.reference-design-v11 .home-lower .number-ranks .cold section > div > span,
.reference-design-v11 .home-lower .number-ranks .cold > div > span { background: radial-gradient(circle,#0a376b,#031a37 70%,#011126); }
.reference-design-v11 .home-lower .number-ranks section > div b { font-size: 21px; }
.reference-design-v11 .home-lower .number-ranks section > div small { position: absolute; top: calc(100% + 15px); left: 50%; margin: 0; transform: translateX(-50%); color: #fff5dc; font-size: 8px; }
.reference-design-v11 .home-lower .number-ranks p { margin: 4px 0 11px; font-size: 8px; line-height: 1; text-transform: uppercase; }
.reference-design-v11 .result-and-draws > .latest-panel .royal-button { color: var(--gold-400); background: linear-gradient(180deg,#062a55,#031a37); }
.reference-design-v11.page-home .site-footer { display: none; }

/* Keep the complete desktop composition through tablet landscape. */
@media (min-width: 769px) and (max-width: 992px) {
  .reference-design-v11 .site-header { min-height: 145px; }
  .reference-design-v11 .site-nav a { padding-right: 14px; padding-left: 14px; font-size: 10px; }
  .reference-design-v11 .royal-hero { grid-template-columns: 56% 44%; min-height: 225px; }
  .reference-design-v11 .palace-photo img { min-height: 225px; }
  .reference-design-v11 .hero-copy { padding: 12px 0; }
  .reference-design-v11 .hero-copy h1 { font-size: 30px; }
  .reference-design-v11 .result-and-draws { grid-template-columns: 35.3% 64.7%; }
  .reference-design-v11 .result-and-draws > .latest-panel { border-right: 1px solid var(--line); border-bottom: 0; }
  .reference-design-v11 .daily-panel { padding: 8px 8.25% 6px 1.5%; }
  .reference-design-v11 .daily-draws .draw-icon { width: 48px; height: 48px; }
  .reference-design-v11 .home-lower { grid-template-columns: 40.5% 59.5%; }
  .reference-design-v11 .home-lower > article + article { border-top: 0; border-left: 1px solid rgba(226,177,48,.28); }
}

@media (min-width: 769px) {
  .reference-design-v11 .site-nav { justify-content: flex-start; padding-left: clamp(68px,8.2vw,96px); }
  .reference-design-v11 .site-nav a { padding-right: 18px; padding-left: 18px; }
  .reference-design-v11 .result-and-draws { height: 166px; min-height: 166px; }
  .reference-design-v11 .home-lower { height: 179px; min-height: 179px; }
}

/*
   The supplied desktop reference is a 1120px-wide composition.  The earlier
   build retained its compact 870px measurements on wide screens; this block
   scales the masthead, hero, result surface, and lower panels together so the
   proportions remain faithful through the 1180px frame maximum.
*/
@media (min-width: 993px) {
  .reference-design-v11 .site-header {
    height: clamp(165px,16.35vw,194px);
    min-height: clamp(165px,16.35vw,194px);
    padding: clamp(6px,.65vw,8px) clamp(76px,7.3vw,88px) clamp(5px,.55vw,7px) clamp(32px,3.2vw,39px);
  }
  .reference-design-v11 .header-arch,
  .reference-design-v11 .header-curtain { display: none; }
  .reference-design-v11 .site-brand { width: min(720px,74vw); }
  .reference-design-v11 .site-brand > .reference-brand-lockup { gap: clamp(20px,2vw,24px); }
  .reference-design-v11 .brand-reference-crest {
    width: clamp(188px,18.45vw,218px);
    height: clamp(150px,14.7vw,174px);
    flex-basis: clamp(188px,18.45vw,218px);
  }
  .reference-design-v11 .brand-reference-type img { width: clamp(398px,38.5vw,458px); }
  .reference-design-v11 .brand-reference-type small {
    margin-top: clamp(9px,.85vw,10px);
    font-size: clamp(19px,1.85vw,22px);
  }
  .reference-design-v11 .brand-custom-logo {
    width: min(720px,74vw);
    max-height: clamp(150px,14.7vw,174px);
  }
  .reference-design-v11 .site-nav { min-height: clamp(43px,4.25vw,51px); }
  .reference-design-v11 .site-nav a {
    min-height: clamp(42px,4.15vw,50px);
    padding-right: clamp(20px,2vw,24px);
    padding-left: clamp(20px,2vw,24px);
    font-size: clamp(12px,1.15vw,14px);
  }
  .reference-design-v11 .site-nav a + a::before { top: clamp(11px,1.05vw,13px); bottom: clamp(11px,1.05vw,13px); }

  .reference-design-v11 .royal-hero {
    height: clamp(258px,25.85vw,306px);
    min-height: clamp(258px,25.85vw,306px);
    max-height: clamp(258px,25.85vw,306px);
  }
  .reference-design-v11 .palace-photo img { min-height: clamp(258px,25.85vw,306px); }
  .reference-design-v11 .hero-copy { padding: clamp(16px,1.55vw,19px) 0 clamp(14px,1.4vw,17px); }
  .reference-design-v11 .hero-copy > .royal-flourish,
  .reference-design-v11 .hero-copy > h1,
  .reference-design-v11 .hero-copy > .hero-subtitle,
  .reference-design-v11 .hero-copy > .hero-intro,
  .reference-design-v11 .hero-copy > .next-card { transform: translateX(clamp(-80px,-6.7vw,-66px)); }
  .reference-design-v11 .hero-copy h1 {
    width: 86%;
    margin: 2px 0 3px;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(34px,3.48vw,42px);
    letter-spacing: .025em;
  }
  .reference-design-v11 .hero-copy h1.reference-hero-title span { display: block; white-space: nowrap; }
  .reference-design-v11 .royal-flourish { width: clamp(138px,13.5vw,160px); height: clamp(20px,1.95vw,23px); }
  .reference-design-v11 .hero-subtitle { margin: 3px 0 clamp(8px,.8vw,10px); font-size: clamp(17px,1.65vw,20px); }
  .reference-design-v11 .next-card { width: min(390px,70%); padding: clamp(8px,.8vw,10px) clamp(16px,1.6vw,19px) clamp(9px,.9vw,11px); }
  .reference-design-v11 .next-card h2 { font-size: clamp(15px,1.48vw,18px); }
  .reference-design-v11 .next-card > p { margin: 3px 0 6px; font-size: clamp(10px,1vw,12px); }
  .reference-design-v11 .hero-countdown { gap: clamp(8px,.8vw,10px); }
  .reference-design-v11 .hero-countdown span { min-width: clamp(51px,5.1vw,61px); }
  .reference-design-v11 .hero-countdown b { font-size: clamp(30px,3vw,36px); }
  .reference-design-v11 .hero-countdown small { font-size: clamp(7px,.68vw,8px); }
  .reference-design-v11 .hero-countdown i { font-size: clamp(24px,2.35vw,28px); }

  .reference-design-v11 .result-and-draws {
    height: clamp(190px,19.25vw,228px);
    min-height: clamp(190px,19.25vw,228px);
  }
  .reference-design-v11 .result-and-draws > .latest-panel { padding: clamp(8px,.85vw,10px) clamp(23px,2.3vw,27px); }
  .reference-design-v11 .result-and-draws .ornate-heading,
  .reference-design-v11 .daily-panel .ornate-heading { margin-bottom: clamp(5px,.5vw,6px); font-size: clamp(21px,2.05vw,24px); }
  .reference-design-v11 .result-and-draws .ornate-heading::before,
  .reference-design-v11 .result-and-draws .ornate-heading::after { width: clamp(64px,6.25vw,74px); height: clamp(15px,1.5vw,18px); flex-basis: clamp(64px,6.25vw,74px); }
  .reference-design-v11 .result-and-draws .draw-badge { padding: clamp(4px,.4vw,5px) clamp(25px,2.5vw,30px); font-size: clamp(13px,1.3vw,15px); }
  .reference-design-v11 .result-and-draws .result-meta { margin: 4px 0 5px; font-size: clamp(10px,1vw,12px); }
  .reference-design-v11 .result-and-draws .result-digits { gap: clamp(6px,.6vw,7px); margin-bottom: clamp(5px,.5vw,6px); }
  .reference-design-v11 .result-and-draws .result-digits b {
    width: clamp(60px,5.75vw,68px);
    height: clamp(57px,5.4vw,64px);
    font-size: clamp(39px,3.8vw,45px);
  }
  .reference-design-v11 .result-and-draws .royal-button { min-height: clamp(25px,2.45vw,29px); font-size: clamp(10px,.95vw,11px); }
  .reference-design-v11 .result-and-draws .royal-button span { font-size: clamp(16px,1.55vw,18px); }
  .reference-design-v11 .daily-panel { padding: clamp(9px,.95vw,11px) clamp(74px,8.25vw,98px) clamp(7px,.7vw,9px) clamp(15px,1.5vw,18px); }
  .reference-design-v11 .daily-draws .draw-item { min-height: clamp(139px,13.9vw,165px); padding: 3px clamp(4px,.45vw,6px); }
  .reference-design-v11 .daily-draws .draw-icon { width: clamp(54px,5.25vw,62px); height: clamp(54px,5.25vw,62px); margin-bottom: 3px; }
  .reference-design-v11 .daily-draws .draw-icon svg { width: clamp(34px,3.3vw,39px); height: clamp(34px,3.3vw,39px); }
  .reference-design-v11 .daily-draws .draw-item h3 { min-height: clamp(17px,1.6vw,19px); font-size: clamp(12px,1.18vw,14px); }
  .reference-design-v11 .daily-draws .draw-item time { margin-bottom: 3px; font-size: clamp(10px,.95vw,11px); }
  .reference-design-v11 .daily-draws .draw-status { min-height: clamp(16px,1.5vw,18px); padding: 2px clamp(8px,.8vw,10px); font-size: clamp(8px,.75vw,9px); }
  .reference-design-v11 .daily-draws .draw-item > strong { margin-top: 2px; font-size: clamp(17px,1.6vw,19px); }

  .reference-design-v11 .home-lower {
    height: clamp(205px,20.4vw,241px);
    min-height: clamp(205px,20.4vw,241px);
  }
  .reference-design-v11 .home-lower > article { padding: clamp(9px,.95vw,11px) clamp(23px,2.3vw,27px); }
  .reference-design-v11 .home-lower > .history-preview { padding-left: clamp(36px,3.65vw,43px); }
  .reference-design-v11 .home-lower h2 { margin-bottom: 5px; font-size: clamp(19px,1.85vw,22px); }
  .reference-design-v11 .home-lower h2 svg { width: clamp(19px,1.85vw,22px); height: clamp(19px,1.85vw,22px); }
  .reference-design-v11 .home-lower .royal-table { font-size: clamp(10px,.95vw,11px); }
  .reference-design-v11 .home-lower .royal-table th { padding: 3px 8px; font-size: clamp(9px,.85vw,10px); }
  .reference-design-v11 .home-lower .royal-table td { padding: 3px 8px; }
  .reference-design-v11 .home-lower .royal-table td b { font-size: clamp(12px,1.15vw,14px); }
  .reference-design-v11 .home-lower .royal-button { width: min(330px,100%); min-height: clamp(27px,2.7vw,32px); font-size: clamp(10px,.95vw,11px); }
  .reference-design-v11 .home-lower .number-ranks { width: min(540px,100%); margin-top: clamp(8px,.8vw,10px); }
  .reference-design-v11 .home-lower .number-ranks section { min-height: clamp(114px,11.4vw,135px); padding: clamp(8px,.8vw,10px); }
  .reference-design-v11 .home-lower .number-ranks h3 { font-size: clamp(11px,1.08vw,13px); }
  .reference-design-v11 .home-lower .number-ranks section > div > span { width: clamp(38px,3.75vw,44px); }
  .reference-design-v11 .home-lower .number-ranks section > div b { font-size: clamp(24px,2.35vw,28px); }
  .reference-design-v11 .home-lower .number-ranks p { font-size: clamp(9px,.85vw,10px); }
}

@media (max-width: 768px) {
  .reference-design-v11 .royal-frame { width: calc(100% - 10px); margin: 5px auto; border-radius: 10px; }
  .reference-design-v11 .site-header {
    min-height: 128px;
    padding: 6px 53px 5px 8px;
    overflow: visible;
    background-position: center;
    background-size: 100% 100%;
  }
  .reference-design-v11 .header-arch { display: none; }
  .reference-design-v11 .header-curtain { display: none; }
  .reference-design-v11 .site-brand { width: min(285px,calc(100vw - 74px)); }
  .reference-design-v11 .site-brand > .reference-brand-lockup { gap: 7px; }
  .reference-design-v11 .brand-reference-crest { width: 92px; height: 102px; flex-basis: 92px; }
  .reference-design-v11 .brand-reference-type img { width: 176px; }
  .reference-design-v11 .brand-reference-type small { display: block; margin-top: 5px; font-size: 8px; letter-spacing: .18em; }
  .reference-design-v11 .brand-custom-logo { width: min(270px,calc(100vw - 76px)); max-height: 104px; }
  .reference-design-v11 .menu-toggle { top: 10px; right: 10px; width: 41px; height: 37px; border-color: var(--gold-600); background: linear-gradient(180deg,#790000,#4d0000); }
  .reference-design-v11 .menu-toggle span { background: var(--gold-400); }
  .reference-design-v11 .site-nav { top: 128px; right: 5px; left: 5px; min-height: 0; padding-left: 0; }
  .reference-design-v11 .site-nav a { min-height: 47px; justify-content: start; padding: 0 20px; font-size: 12px; }
  .reference-design-v11 .royal-hero { max-height: none; background-image: none; }
  .reference-design-v11 .royal-hero::before,
  .reference-design-v11 .royal-hero::after { display: none; }
  .reference-design-v11 .palace-photo {
    height: clamp(105px,31vw,125px);
    background-color: #1d2430;
    background-image: var(--site-hero-image, url('../images/lima-background-hero-clean.png'));
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 178.58% 100%;
  }
  .reference-design-v11 .palace-photo img { min-height: 0; opacity: 0; transform: none; filter: none; }
  .reference-design-v11 .palace-photo::after { display: none; }
  .reference-design-v11 .curtain-swag { display: none; }
  .reference-design-v11 .hero-copy {
    min-height: 108px;
    padding: 7px 10px 8px;
    background-color: var(--navy-950);
    background-image: var(--site-hero-image, url('../images/lima-background-hero-clean.png'));
    background-position: right center;
    background-repeat: no-repeat;
    background-size: 227.28% 100%;
  }
  .reference-design-v11 .hero-copy > .royal-flourish,
  .reference-design-v11 .hero-copy > h1,
  .reference-design-v11 .hero-copy > .hero-subtitle,
  .reference-design-v11 .hero-copy > .hero-intro,
  .reference-design-v11 .hero-copy > .next-card { transform: none; }
  .reference-design-v11 .next-card { width: min(330px,100%); }
  .reference-design-v11 .result-and-draws { display: block; min-height: 0; }
  .reference-design-v11 .result-and-draws > .latest-panel { padding: 13px 9px 14px; }
  .reference-design-v11 .result-and-draws .ornate-heading { font-size: 19px; }
  .reference-design-v11 .result-and-draws .result-digits b { width: min(19vw,61px); font-size: clamp(29px,10vw,37px); }
  .reference-design-v11 .result-and-draws .royal-button { min-height: 36px; font-size: 9px; }
  .reference-design-v11 .daily-panel { padding: 10px 10px 13px; }
  .reference-design-v11 .daily-draws { border: 1px solid rgba(120,74,5,.28); }
  .reference-design-v11 .daily-draws .draw-item { display: grid; grid-template-columns: 31px minmax(0,1fr) auto auto; grid-template-rows: 38px; min-height: 38px; height: 38px; align-items: center; gap: 0 7px; padding: 0 8px; }
  .reference-design-v11 .daily-draws .draw-icon { grid-column: 1; grid-row: 1; width: 30px; height: 30px; }
  .reference-design-v11 .daily-draws .draw-icon svg { width: 20px; height: 20px; }
  .reference-design-v11 .daily-draws .draw-label { grid-column: 2; grid-row: 1; justify-items: start; align-content: center; }
  .reference-design-v11 .daily-draws .draw-item h3 { min-height: 0; align-self: auto; font-size: 10px; }
  .reference-design-v11 .daily-draws .draw-item time { grid-column: auto; align-self: auto; margin: 0; font-size: 8px; }
  .reference-design-v11 .daily-draws .draw-status { grid-column: 3; grid-row: 1; min-height: 17px; justify-self: end; }
  .reference-design-v11 .daily-draws .draw-item > strong { grid-column: 4; grid-row: 1; align-self: center; justify-self: end; font-size: 13px; }
  .reference-design-v11 .daily-draws .draw-status.completed { display: inline-flex; }
  .reference-design-v11 .daily-draws .draw-status.completed + strong { grid-column: 4; grid-row: 1; align-self: center; }
  .reference-design-v11 .home-lower { display: none; }
  .reference-design-v11 .mobile-actions { display: grid; gap: 5px; padding: 8px; background: linear-gradient(180deg,#f7ecd8,#ebd8b8); }
  .reference-design-v11 .mobile-actions a { min-height: 54px; border: 1px solid var(--gold-500); border-radius: 3px; color: var(--gold-400); background: linear-gradient(180deg,#062a55,#031a37); }
  .reference-design-v11 .mobile-actions svg { fill: var(--gold-400); }
  .reference-design-v11 .mobile-actions b { color: var(--gold-400); }
  .reference-design-v11.page-home .site-footer { display: block; min-height: 84px; padding: 29px 14px 12px; }
  .reference-design-v11.page-home .site-footer .footer-copy,
  .reference-design-v11.page-home .site-footer > p,
  .reference-design-v11.page-home .site-footer nav { display: none; }
}

@media (max-width: 360px) {
  .reference-design-v11 .site-header { min-height: 116px; padding-right: 48px; }
  .reference-design-v11 .brand-reference-crest { width: 78px; height: 88px; flex-basis: 78px; }
  .reference-design-v11 .brand-reference-type img { width: 150px; }
  .reference-design-v11 .brand-reference-type small { font-size: 7px; }
  .reference-design-v11 .menu-toggle { top: 13px; width: 41px; height: 41px; }
  .reference-design-v11 .site-nav { top: 116px; }
}
