.reference-raccoon-universe {
  --ru-orange: #ff9a64;
  --ru-ink: #fff0e8;
  --ru-muted: #c7ada1;
  --case-next-ink: var(--ru-ink);
  --case-next-hover: var(--ru-orange);
  background: var(--case-end);
  color: var(--ru-ink);
}

.ru-hero { position: relative; isolation: isolate; overflow: clip; }
.ru-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg,#100c0c 7%,#100c0cf0 31%,#1b101078 68%,#100c0c9e),
    url("raccoon-port.webp") 60% 56% / cover;
  mask-image: linear-gradient(180deg,transparent,#000 clamp(48px,7vw,112px),#000 73%,transparent);
  opacity: .8;
  animation: ru-arrive 700ms ease-out both;
}
.ru-grid {
  position: relative;
  max-width: var(--case-content-width);
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(0,1fr);
  gap: clamp(30px,7vw,120px);
  align-items: center;
  padding-block: clamp(26px,5.5vw,72px);
}
.ru-case h1,.ru-case h2,.ru-case h3 { font-family: Oswald,Golos,sans-serif; }
.ru-hero h1 {
  font-size: clamp(71px,10.1vw,158px);
  font-weight: 550;
  line-height: .91;
  letter-spacing: -.063em;
}
.ru-hero h1 span { display: block; color: var(--ru-orange); }
.ru-hero-summary {
  max-width: 43ch;
  margin-top: clamp(18px,2.3vw,30px);
  color: var(--ru-muted);
  font-size: clamp(16px,1.65vw,20px);
  line-height: 1.55;
}
.ru-hero-summary strong { color: var(--ru-ink); font-weight: 650; }
.ru-phone {
  position: relative;
  isolation: isolate;
  place-self: center;
  width: min(100%,342px);
  aspect-ratio: 1000 / 1967;
  scroll-margin-top: 18px;
  filter: drop-shadow(0 24px 33px #0009);
  container-type: inline-size;
}
.ru-phone-frame { position:absolute; inset:0; width:100%; height:100%; z-index:2; pointer-events:none; }
.ru-phone-screen {
  position: absolute;
  z-index: 1;
  inset: 3.3% 7.25% 3.5%;
  border-radius: 11% / 5%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 10.7% 5% 5%;
  background: radial-gradient(ellipse at 50% 46%,#622e1b 0%,#2d1813 42%,#150f0f 78%);
}
.ru-game-head { text-align:center; padding-bottom:9px; border-bottom:1px solid #f8976335; font-size:clamp(12px,4.5cqw,16px); font-weight:650; }
.ru-balance { display:grid; text-align:center; gap:3px; margin-top:6cqw; }
.ru-balance span { color:#f7aa80; font-size:clamp(9px,3.25cqw,12px); }
.ru-balance strong { color:#ffe0bb; font:550 clamp(28px,11cqw,42px)/1.07 Oswald,Golos,sans-serif; font-variant-numeric:tabular-nums; }
.ru-tap {
  position:relative;
  flex:1;
  min-height:0;
  margin: 1cqw -2.5cqw;
  padding: 0;
  border:0;
  background:none;
  display:grid;
  place-items:center;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
}
.ru-tap > img { width:100%; height:100%; max-height:78cqw; object-fit:contain; filter:drop-shadow(0 9px 18px #100a08a1); pointer-events:none; }
.ru-tap:active > img { transform:scale(.98); }
.ru-tap:focus-visible { outline:2px solid var(--ru-orange); outline-offset:-2px; border-radius:10px; }
.ru-tap-effects { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.ru-coin-burst {
  position:absolute;
  color:#ffe0a8;
  font:650 clamp(21px,7cqw,30px)/1 Oswald,Golos,sans-serif;
  text-shadow:0 2px 6px #0c0807;
  transform:translate(-50%,-50%);
  animation:ru-coin-up 620ms ease-out both;
}
.ru-energy div { display:flex; justify-content:space-between; gap:6px; color:#e1bca4; font-size:clamp(9px,3.25cqw,12px); font-variant-numeric:tabular-nums; }
.ru-energy progress { display:block; width:100%; height:5px; margin-top:7px; border:0; border-radius:5px; appearance:none; accent-color:#ff9a64; color:#ff9a64; background:#462b22; }
.ru-energy progress::-webkit-progress-bar { background:#462b22; border-radius:5px; }
.ru-energy progress::-webkit-progress-value { background:#ff9a64; border-radius:5px; }
.ru-energy progress::-moz-progress-bar { background:#ff9a64; border-radius:5px; }
.ru-game-help { display:flex;justify-content:center;align-items:center;gap:6px;margin-top:5cqw;color:#f5bf9f;font-size:clamp(10px,3.7cqw,13px) }
.ru-tap-cue { width:12px;height:12px;flex:none;border:1px solid #ffc29b;border-radius:50%;background:#ffab76;box-shadow:inset 0 0 0 3px #36221a;animation:ru-tap-cue 1.6s .5s 3 ease-out }
.ru-game-help[data-used] .ru-tap-cue { display:none }
.ru-sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

.ru-gallery {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  grid-template-areas: "phone copy";
  align-items: center;
  gap: clamp(24px, 6vw, 86px);
  max-width: 1080px;
  padding-block: clamp(34px, 5vw, 68px) clamp(38px, 5vw, 72px);
  scroll-margin-block-start: clamp(64px, 6vw, 90px);
}
.ru-gallery-copy { grid-area:copy;min-width:0; }
.ru-gallery-captions { display:grid; }
.ru-gallery-caption {
  grid-area: 1 / 1;
  align-self: start;
  transition: opacity 180ms ease-out, translate 200ms var(--ease);
}
.ru-gallery-caption[aria-hidden=true] { visibility:hidden;opacity:0;translate:0 3px;transition-duration:0s; }
.ru-gallery-caption h3 { font-size:clamp(32px,4.25vw,60px);font-weight:500;letter-spacing:-.05em;line-height:1.08;text-wrap:balance; }
.ru-gallery-caption p {
  max-width: 39ch;
  margin-block-start: clamp(12px,1.8vw,22px);
  color: var(--ru-muted);
  font-size: clamp(16px,1.4vw,19px);
  line-height: 1.55;
  text-wrap: pretty;
}
.ru-gallery-pager { display:none; }
@media (hover:hover) and (pointer:fine) {
  .ru-gallery-pager:not([hidden]) { display:flex;gap:8px;margin-block-start:22px; }
}
.ru-gallery-pager button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffc79d35;
  border-radius: 8px;
  background: transparent;
  color: var(--ru-muted);
  transition: color 160ms ease-out, border-color 160ms ease-out;
}
.ru-gallery-pager button::before {
  width: 8px;
  height: 8px;
  border-block-start: 1.5px solid;
  border-inline-end: 1.5px solid;
  rotate: 45deg;
  content: "";
}
.ru-gallery-pager [data-gallery-prev]::before { rotate:-135deg; }
.ru-gallery-pager button:not(:disabled):hover { color:var(--ru-orange);border-color:#ffc79d70; }
.ru-gallery-pager button:disabled { opacity:.35;cursor:default; }
.ru-gallery-pager button:focus-visible { outline-offset:2px; }
.ru-gallery-phone { grid-area:phone;width:min(100%,324px);filter:drop-shadow(0 16px 27px #0006); }
.ru-gallery-screen { padding:0;background:#1c100f; }
.ru-gallery-controls:not([hidden]) {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-block-size: 56px;
  block-size: 12.4%;
  padding: 0 3.5% 4%;
  border-block-start: 1px solid #ffc79d26;
  background: radial-gradient(ellipse at 50% 0%, #2c1c19, #1b1412 75%);
}
.ru-gallery-controls::after {
  position: absolute;
  inset: auto 0 7%;
  width: 27%;
  height: 3px;
  margin-inline: auto;
  border-radius: 999px;
  background: #ffeddc83;
  pointer-events: none;
  content: "";
}
.ru-gallery-controls button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ru-muted);
  font-size: clamp(9px,3.9cqw,12px);
  font-weight: 500;
  line-height: 1.1;
  transition: color 180ms ease-out;
}
.ru-gallery-controls img {
  width: clamp(16px,6.45cqw,20px);
  height: auto;
  transition: filter 160ms ease-out, translate 160ms ease-out, scale 140ms ease-out;
}
.ru-gallery-controls button:hover { color:var(--ru-ink); }
.ru-gallery-controls button:focus-visible { outline-color:var(--ru-orange);outline-offset:-2px; }
.ru-gallery-controls button[aria-selected=true] { color:var(--ru-orange);font-weight:700; }
.ru-gallery-controls button:is(:hover,[aria-selected=true]) img { filter:brightness(1.35);translate:0 -1px; }
.ru-gallery-controls button:active img { scale:.92; }
.ru-gallery-track {
  position: absolute;
  inset: 3.4% 0 0;
  display: flex;
  overflow: auto hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #784b3b transparent;
}
.ru-gallery-track:focus-visible { outline-offset:-3px; }
.ru-gallery-track.is-interactive { scrollbar-width:none;cursor:grab; }
.ru-gallery-track.is-dragging { scroll-snap-type:none;cursor:grabbing;user-select:none; }
.ru-gallery-slide { flex:0 0 100%;min-width:0;height:100%;object-fit:fill;scroll-snap-align:start; }
.ru-gallery-outgoing { position:absolute;z-index:1;inset:3.4% 0 0;width:100%;height:96.6%;object-fit:fill;pointer-events:none; }

@keyframes ru-arrive { from { opacity:.43; } to { opacity:.8; } }
@keyframes ru-tap-cue { 60%,100% { box-shadow:inset 0 0 0 3px #36221a,0 0 0 6px #ffab7600 } 15% { box-shadow:inset 0 0 0 3px #36221a,0 0 0 1px #ffab7677 } }
@keyframes ru-coin-up { from { opacity:1; transform:translate(-50%,-22%) scale(.91); } to { opacity:0; transform:translate(-50%,-240%) scale(1.08); } }
@media(max-width:740px) {
  .ru-grid { grid-template-columns:1fr; }
  .ru-grid { padding-top:25px; gap:31px; }
  .ru-hero h1 { font-size:clamp(65px,13.4vw,112px); }
  .ru-hero::before { background-position:70% 50%; }
  .ru-phone { width:min(100%,310px); }
  .ru-gallery { grid-template-columns:minmax(0,1fr);grid-template-areas:"phone" "copy";gap:22px; }
  .ru-gallery-phone { width:min(100%,272px); }
  .ru-gallery-captions { position:relative; }
  .ru-gallery-caption[aria-hidden=true] { position:absolute;inset:0 0 auto; }
}
@media(prefers-reduced-motion:reduce) {
  .ru-hero::before { animation:none; }
  .ru-coin-burst { animation-duration:180ms; }
  .ru-tap-cue { animation:none; }
}
