:root {
  color-scheme: dark;
  --gold: #f5c451;
  --royal-blue: #1330a0;
  --bright-blue: #284de5;
  --gutter: clamp(12px, 3vw, 32px);
}

* { box-sizing: border-box; }
html { background: #061140; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: #fff;
  background: #061140;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", Arial, sans-serif;
}
img, video, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.page-shell {
  width: 100%;
  max-width: 832px;
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding-top: env(safe-area-inset-top, 0px);
  background: #0a1c5c url("../img/bg/bg-portrait.png") center top / cover no-repeat;
  box-shadow: 0 0 42px rgba(0, 8, 52, .5);
}
.site-header { padding: 16px var(--gutter) 12px; }
.plotto-logo { width: clamp(130px, 30vw, 240px); height: auto; }
.bonus-section, .content-section { padding-inline: var(--gutter); }
.image-link {
  display: block;
  overflow: hidden;
}
/* The artwork already includes its gold frame. Trim only transparent margins. */
.image-link picture { position: relative; aspect-ratio: 1307 / 401; overflow: hidden; }
.image-link img {
  position: absolute; width: 104.5142%; max-width: none; height: auto;
  left: -2.2188%; top: -5.2369%;
}
@media (max-width: 520px) {
  .image-link picture { aspect-ratio: 706 / 217; }
  .image-link img { width: 110.0567%; left: -6.6572%; top: -8.7558%; }
}
.quick-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(60px, .55fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
  margin: 20px var(--gutter) 8px;
  padding: 8px clamp(8px, 2vw, 24px);
  border: 1px solid rgba(245, 196, 81, .6);
  border-radius: 8px;
  background: rgba(10, 30, 110, .65);
  box-shadow: inset 0 0 18px rgba(70, 119, 255, .25);
}
.quick-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  transition: filter 180ms ease, transform 180ms ease;
}
.quick-link img { width: 100%; height: auto; }
.quick-link--vip { z-index: 2; max-width: 130px; justify-self: center; }
.section-title { width: 100%; max-width: 768px; margin: 22px auto 12px; }
.section-title img { width: 100%; height: auto; }
.speed-panel {
  padding: clamp(12px, 2.5vw, 28px);
  border: 1px solid rgba(245, 196, 81, .85);
  border-radius: 8px;
  background: rgba(14, 34, 110, .65);
}
.gauge-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 8px; max-width: 440px; margin-inline: auto; }
.gauge { grid-column: span 2; }
.gauge:nth-child(4) { grid-column: 2 / span 2; }
.gauge:nth-child(5) { grid-column: 4 / span 2; }
.speed-note { margin: 12px 0 0; text-align: center; font: 12px/1.4 Arial, sans-serif; color: #d6e0ff; }
.gauge { display: block; min-width: 0; text-align: center; border-radius: 8px; }
.gauge-face { position: relative; width: 100%; max-width: 112px; aspect-ratio: 246 / 230; margin-inline: auto; }
.gauge-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gauge-reading {
  position: absolute;
  /* Center inside the visible ring bounds, excluding transparent asset padding.
     Native image: 246x230; visible ring: x=15..227, y=18..230. */
  inset: 7.8261% 7.7236% 0 6.0976%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  text-align: center;
  line-height: 1;
  text-shadow: 0 2px 2px #000, 0 0 5px #000;
  font-family: Arial, Helvetica, sans-serif;
}
.gauge-number { font-size: clamp(18px, 4vw, 32px); font-weight: 900; font-variant-numeric: tabular-nums; }
.gauge-unit { margin-top: 0; font-size: 11px; font-weight: 800; }
.line-label { margin-top: 6px; font-size: clamp(14px, 2vw, 20px); line-height: 1.2; text-shadow: 1px 1px 2px #071342; }
.enter-button {
  cursor: pointer; color: #fff; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  width: min(100%, 240px); min-height: 48px;
  margin: 20px auto 0; padding: 12px 16px;
  border: 1px solid rgba(215, 226, 255, .9); border-radius: 8px;
  background: linear-gradient(180deg, #3b5ae8, #1c34a8);
  font-size: 18px; line-height: 1.25; text-align: center;
  text-shadow: 1px 1px 0 #071342;
  transition: box-shadow 180ms ease, filter 180ms ease;
}
.lotto-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2vw, 20px); max-width: 280px; margin-inline: auto; }
.lotto-card {
  display: flex; min-width: 0; flex-direction: column;
  padding: clamp(5px, 1vw, 8px);
  border: 1px solid rgba(245, 196, 81, .9); border-radius: 8px;
  background: rgba(10, 26, 96, .65);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.lotto-card video { width: 100%; aspect-ratio: 1; border-radius: 5px; object-fit: cover; background: #0c1f68; }
.lotto-card span {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; margin-top: 8px; padding: 8px 4px;
  border: 1px solid rgba(215, 226, 255, .8); border-radius: 5px;
  background: linear-gradient(180deg, var(--bright-blue), var(--royal-blue));
  font-size: clamp(15px, 2vw, 22px); line-height: 1.3; text-align: center;
  overflow-wrap: anywhere; text-shadow: 1px 1px 0 #071342;
}
/* Match the section edges while keeping source tiles below their native size. */
.popular-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: center; gap: 12px; max-width: 378px; margin-inline: auto; padding-bottom: 24px; }
.popular-grid a { display: block; min-width: 0; min-height: 44px; padding: 4px; border: 1px solid rgba(245, 196, 81, .65); background: rgba(10, 26, 96, .65); border-radius: 8px; filter: drop-shadow(0 3px 8px rgba(0, 7, 50, .45)); }
.popular-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; transition: transform 200ms ease, filter 200ms ease; }
.payment-footer {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #020d2d;
  box-shadow: 0 -4px 14px rgba(0, 5, 40, .55);
}
.payment-footer picture { max-width: 900px; margin-inline: auto; }
.payment-footer img { width: 100%; height: auto; }
@media (min-width: 600px) {
  .lotto-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 600px; }
  .popular-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: none; }
  .site-header { padding-top: 24px; }
}
@media (min-width: 900px) {
  .page-shell { background-image: url("../img/bg/bg-landscape.png"); }
  .section-title { margin-top: 32px; }
}
@media (max-width: 359px) {
  .popular-grid { grid-template-columns: repeat(2, minmax(0, 118px)); }
  .quick-links { gap: 4px; padding-inline: 4px; }
}
@media (hover: hover) {
  .quick-link:hover { z-index: 3; filter: brightness(1.12); transform: translateY(-2px); }
  .enter-button:hover { filter: brightness(1.15); box-shadow: 0 0 12px rgba(120, 156, 255, .7); }
  .lotto-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 7, 50, .5); }
  .popular-grid a:hover img { filter: brightness(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
