:root {
  color-scheme: dark;
  --ink: #0b0d12;
  --gold: #f3d991;
  --gold-dark: #9a6b31;
  --light: #fbf7ee;
  --muted: #c5bcaa;
  --red: #711913;
  --body-width: 1230px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 82px; }
body { margin: 0; background: #0c0b0f; color: var(--light); font: 16px/1.5 system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid #ffe38f; outline-offset: 3px; }
h1, h2, p { margin: 0; }
img { display: block; width: 100%; }
.container { width: min(var(--body-width), calc(100% - 44px)); margin-inline: auto; }
.skip { position: fixed; left: 12px; top: 12px; transform: translateY(-150%); background: var(--gold); color: #140d09; padding: 10px 14px; z-index: 20; }
.skip:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 10; background: #0a0c11; border-bottom: 1px solid #ffffff18; }
.header-inner { min-height: 66px; padding: 0 22px; display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; flex: none; color: #eac576; font: 900 italic clamp(21px, 2.1vw, 30px)/1 Georgia, serif; letter-spacing: -.035em; text-shadow: 0 2px #61390e; white-space: nowrap; }
.monogram { display: none; }
.desktop-nav { margin-left: clamp(14px, 3vw, 56px); display: flex; align-items: center; gap: clamp(13px, 2.1vw, 38px); }
.desktop-nav a { display: flex; min-height: 44px; align-items: center; white-space: nowrap; }
.desktop-nav a:hover { color: var(--gold); }
.account-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.pill { min-height: 44px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 15px; font-weight: 750; }
.login { background: #e4e1e54a; }
.register { color: #15171e; background: #9dedfc; }
.flag { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #21366a url('/assets/ragnabet/uk.svg') center/cover; }
.drawer { position: relative; flex: none; }
.menu-button { display: grid; place-items: center; width: 44px; height: 44px; list-style: none; border: 1px solid transparent; border-radius: 9px; cursor: pointer; }
.menu-button::-webkit-details-marker { display: none; }
.menu-button span, .menu-button span::before, .menu-button span::after { display: block; position: relative; width: 20px; height: 2px; border-radius: 1px; background: #fff; }
.menu-button span::before, .menu-button span::after { position: absolute; content: ""; left: 0; }
.menu-button span::before { top: -6px; }
.menu-button span::after { top: 6px; }
.drawer-panel { position: absolute; top: calc(100% + 8px); left: 0; width: min(280px, calc(100vw - 28px)); max-height: calc(100dvh - 110px); overflow: auto; padding: 9px; border: 1px solid #977345; border-radius: 12px; background: #121217; box-shadow: 0 14px 35px #0008; }
.drawer-panel a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 7px; }
.drawer-panel a:hover { background: #ffffff15; }
.hero { position: relative; isolation: isolate; min-height: clamp(440px, 40vw, 680px); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: #263747; }
.hero-image { position: absolute; z-index: -2; inset: 0; height: 100%; object-fit: cover; object-position: 50% 39%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #080a10ec 0%, #12141c78 29%, #07101818 67%, #07101846 100%); }
.crumbs { position: absolute; top: 14px; left: max(22px, calc((100% - var(--body-width))/2)); display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 5px; color: #f4eedf; background: #07091072; font-size: 12px; }
.crumbs a { text-decoration: underline; text-underline-offset: 2px; }
.hero-copy { width: min(94%, 760px); padding: 12px 12px clamp(52px, 5vw, 98px); text-align: center; text-shadow: 0 2px 10px #000; }
.hero h1 { color: var(--gold); font-size: clamp(17px, 2.1vw, 29px); font-weight: 780; line-height: 1.15; margin-bottom: 7px; }
.offer { font-size: clamp(25px, 3.25vw, 53px); font-weight: 880; letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; }
.offer-label { margin: 6px 0 17px; font-size: clamp(15px, 1.7vw, 22px); }
.join-cta { display: inline-flex; align-items: center; justify-content: center; position: relative; isolation: isolate; min-height: 58px; width: min(82%, 320px); margin-inline: auto; padding: 10px 20px; border: 4px solid #f4d895; border-radius: 12px 12px 36px 36px; background: linear-gradient(167deg, #73141b 9%, #cf2b32 33%, #651019 54%, #a61e25 79%); color: white; text-transform: uppercase; box-shadow: inset 0 0 0 2px #683211, 0 5px #54311a, 0 11px 30px #0008; font-size: clamp(20px, 2.5vw, 31px); font-weight: 900; line-height: 1.1; }
.join-cta::before, .join-cta::after { content: ""; position: absolute; z-index: -1; top: -3px; width: 35px; height: 100%; background: repeating-linear-gradient(18deg, #fff0bb 0 4px, #bc8d48 6px 8px, #e9c37a 10px 12px); clip-path: polygon(0 0, 100% 15%, 100% 95%, 65% 78%, 24% 40%); }
.join-cta::before { left: -29px; }
.join-cta::after { right: -29px; transform: scaleX(-1); }
.join-cta:hover { filter: brightness(1.16); }
.quick-tabs { display: none; }
.category-strip { background: linear-gradient(90deg, #ceb783, #e9d6a2 56%, #c9ad71); color: #2c200c; border-block: 2px solid #f8dfa4; box-shadow: inset 0 2px #94734366, inset 0 -2px #94734366; }
.rail { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 9px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #d2b579 #211712; }
.categories { width: min(var(--body-width), calc(100% - 44px)); margin-inline: auto; padding-block: 7px; scrollbar-width: none; gap: 6px; }
.categories > * { min-height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 6px 15px; border: 0; border-radius: 24px; background: #6845152d; color: #2e210c; font-weight: 750; white-space: nowrap; }
.categories > *:hover { background: #68451550; }
.categories .search-button { width: 44px; padding: 0; }
.magnifier { position: relative; display: inline-block; width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50%; margin: 0 4px 4px 0; }
.magnifier::after { position: absolute; right: -5px; bottom: -3px; width: 7px; height: 2px; transform: rotate(45deg); background: currentColor; content: ""; }
.shelf { padding-block: 23px; border-bottom: 2px solid #8d6a3e75; background: radial-gradient(ellipse at top, #2b1925, #100e14 62%); }
.shelf.top-shelf { background: repeating-linear-gradient(134deg, #0000 0 3px, #0000000f 3px 5px), radial-gradient(ellipse at top left, #932c22, #681714 75%); border-bottom: 5px solid #d0a75b; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h2, .live-shelf h2, .help h2 { font-size: clamp(20px, 2.35vw, 30px); line-height: 1.25; }
.section-title h2 { text-transform: uppercase; }
.see-all { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: #ffffff19; border-radius: 999px; white-space: nowrap; }
.cards { gap: 12px; padding-bottom: 14px; }
.game-card { position: relative; display: flex; align-items: end; isolation: isolate; flex: 1 0 calc((100% - 60px)/6); min-width: 120px; aspect-ratio: 2/3; border: 3px solid #dbb471; border-radius: 13px 13px 18px 18px; background: #211c24; box-shadow: 0 0 0 1px #684422, 0 8px 14px #0005; scroll-snap-align: start; overflow: hidden; }
.game-card:hover { border-color: #fff0be; }
.game-card::after { content: ""; position: absolute; z-index: -1; inset: 40% 0 0; background: linear-gradient(0deg, #100b0de8 0%, transparent 100%); }
.game-art { position: absolute; z-index: -2; inset: 0; background: url('/assets/ragnabet/cards.webp') var(--tile-x) var(--tile-y)/600% 200% no-repeat; }
.game-label { width: 100%; text-align: center; padding: 9px 4px; font-size: clamp(13px, 1.4vw, 17px); font-weight: 820; text-shadow: 0 1px 5px #000; }
.top-shelf .game-card { border-color: #f3cd85; box-shadow: 0 0 0 1px #674111, inset 0 0 0 2px #f6df9b; }
.top-shelf .game-card::before { position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 16px; content: ""; background: linear-gradient(118deg,#9e6329,#ffe3a5 33%,#be8951 49%,#fff0c0 64%,#9e6329); clip-path: polygon(0 0,35% 20%,50% 0,65% 20%,100% 0,100% 23%,50% 100%,0 23%); }
.top-shelf .game-label { padding-bottom: 29px; }
.game-rank { position: absolute; left: calc(50% - 12px); bottom: 3px; width: 24px; height: 24px; border: 2px solid #eed191; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #5791f1, #132b63 65%); color: #fff; text-align: center; font-size: 14px; font-weight: 850; line-height: 20px; }
.live-shelf { padding-block: 25px; background: #151219; }
.live-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 12px; }
.live-grid a { display: grid; gap: 4px; padding: 16px; border: 1px solid #826749; border-radius: 12px; background: linear-gradient(140deg,#272237,#341b20); }
.live-grid strong { font-size: 18px; }
.live-grid span, .help p, footer p { color: var(--muted); }
.help { padding-block: 24px; }
.help h2 { margin-bottom: 12px; }
.help details { border-top: 1px solid #584b3a; }
.help summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.help p { padding: 0 0 15px; }
footer { border-top: 1px solid #584b3a; padding: 14px 0 24px; }
footer > a:last-child { min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; color: var(--gold); }
.bottom-nav { display: none; }
.search-dialog { width: min(90vw, 460px); padding: 17px; border: 1px solid #ae844c; border-radius: 13px; background: #181620; color: var(--light); }
.search-dialog::backdrop { background: #000a; }
.search-dialog form { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.search-dialog form button { min-width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 26px; }
.search-dialog label { display: block; margin-top: 8px; }
.search-dialog input { width: 100%; min-height: 44px; margin-top: 4px; padding: 7px 9px; border: 1px solid #796347; border-radius: 7px; background: #0c0b11; }
.search-results { list-style: none; padding: 0; margin: 8px 0 0; max-height: 38vh; overflow: auto; }
.search-results a { min-height: 44px; display: flex; align-items: center; text-decoration: underline; color: var(--gold); }
@media (max-width: 860px) {
  .desktop-nav { display: none; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 12px; }
  .container, .categories { width: calc(100% - 24px); }
  main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .site-header { position: absolute; top: 0; width: 100%; background: #0b0c1066; }
  .header-inner { min-height: 62px; padding-inline: 8px; gap: 5px; }
  .drawer-panel { left: 1px; }
  .wordmark { display: none; }
  .monogram { display: inline; font-size: 29px; }
  .account-actions { gap: 4px; }
  .pill { padding-inline: 9px; min-height: 44px; font-size: 13px; }
  .flag { width: 23px; height: 23px; }
  .hero { min-height: clamp(430px, 118vw, 590px); }
  .hero-image { object-position: 71% 38%; }
  .crumbs { top: 69px; left: 12px; }
  .hero-copy { padding-bottom: 64px; }
  .join-cta { min-height: 50px; }
  .quick-tabs { position: absolute; bottom: 0; width: 100%; padding-inline: 9px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; background: #0c0b0f97; }
  .quick-tabs a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 750; text-transform: uppercase; }
  .quick-tabs a[aria-current] { border-bottom: 2px solid var(--gold); color: var(--gold); }
  .shelf { padding-block: 14px; }
  .cards { gap: 9px; }
  .game-card { flex-basis: 43%; min-width: 115px; max-width: 180px; }
  .live-grid { grid-template-columns: 1fr; }
  .bottom-nav { position: fixed; z-index: 8; left: 50%; bottom: calc(8px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(540px,calc(100% - 18px)); min-height: 62px; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); padding: 2px; border: 2px solid #d8b475; border-radius: 34px; background: linear-gradient(130deg,#24222c,#111017 70%); box-shadow: 0 6px 22px #000b; }
  .bottom-nav > * { min-width: 0; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 3px 0; border: 0; background: transparent; color: #f0ede8; font-size: 10px; font-weight: 710; white-space: nowrap; }
  .bottom-nav > * > span { font-size: 19px; line-height: 1; color: var(--gold); }
  .bottom-nav .magnifier { width: 12px; height: 12px; margin-top: 4px; }
  .bottom-nav .bottom-join { background: radial-gradient(ellipse at 50% 10%, #3763ae91, transparent 70%); border-radius: 20px; }
}
@media (max-width: 350px) {
  .header-inner { padding-inline: 6px; gap: 3px; }
  .hero-copy { width: 100%; padding-inline: 14px; }
  .offer-label { margin-bottom: 13px; }
  .join-cta { width: 76%; }
  .join-cta::before, .join-cta::after { width: 28px; }
  .join-cta::before { left: -22px; }
  .join-cta::after { right: -22px; }
}
