#coin {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor:pointer;
  transform-origin:center;
  will-change:transform;
}
#coin img { pointer-events:none; user-select:none; -webkit-user-drag:none; }
#effects { pointer-events:none; z-index:5; }
.tap-number {
  position:absolute; color:#ffd31b; font-size:clamp(20px,7vw,32px); font-weight:800;
  line-height:1; white-space:nowrap; text-shadow:0 2px 6px #000;
  animation:racco-rise .82s cubic-bezier(.15,.55,.3,1) both;
}
@keyframes racco-rise {
  0% { transform:translate(-50%,-30%) scale(.83); opacity:0 }
  13% { opacity:1 }
  68% { opacity:1 }
  100% { transform:translate(-50%,-115px) scale(1.05); opacity:0 }
}
[data-progress] { transition:width 150ms ease-out }
.racco-toast {
  position:fixed; z-index:18; bottom:max(106px,env(safe-area-inset-bottom) + 80px); left:50%;
  max-width:min(350px,85vw); width:max-content; transform:translate(-50%,8px);
  opacity:0; pointer-events:none; padding:11px 16px; color:#fff; font:500 14px/1.35 Arial,sans-serif;
  background:#24221c; border:1px solid #55472b; border-radius:12px; box-shadow:0 8px 26px #0008;
  text-align:center; transition:opacity .15s,transform .15s;
}
.racco-toast.visible { opacity:1; transform:translate(-50%,0) }
.racco-dialog {
  box-sizing:border-box; width:min(340px,calc(100% - 34px)); max-width:none;
  color:#f6f6f6; background:linear-gradient(145deg,#22211d,#151515); border:1px solid #494239;
  border-radius:20px; padding:20px; text-align:center; font:14px/1.45 Arial,sans-serif;
  box-shadow:0 14px 65px #000a; animation:racco-in .2s ease-out;
}
.racco-dialog::backdrop { background:#0009; }
.racco-dialog h2 { font-size:23px; margin:0 0 7px; }
.racco-dialog p { margin:0 0 14px; color:#d5d5d5; overflow-wrap:anywhere; }
.racco-dialog input { box-sizing:border-box;width:100%;margin-bottom:13px;border:1px solid #514940;border-radius:10px;padding:10px;color:#fff;background:#101010; }
.racco-dialog-actions { display:flex;flex-wrap:wrap;justify-content:center;gap:7px; }
.racco-dialog-actions button {
  min-height:36px;border:1px solid #ffd35a66;border-radius:11px;padding:6px 12px;
  color:#171300;background:linear-gradient(#ffce22,#f6ae02);font:700 13px Arial,sans-serif;cursor:pointer;
}
.racco-dialog-actions button:last-child { color:#eee;background:#262626;border-color:#444; }
.racco-dialog-actions button:disabled { opacity:.62; }
@keyframes racco-in { from{opacity:0;transform:translateY(4px) scale(.98)} to{opacity:1;transform:none} }
@media(prefers-reduced-motion:reduce) {
  .tap-number,.racco-dialog { animation:none; }
  [data-progress],.racco-toast { transition:none; }
}

@font-face {
  font-family: racco-roboto; src: url(/assets/fonts/roboto-latin-wght-normal.woff2) format("woff2");
  font-style: normal; font-weight: 100 900; font-display: swap; unicode-range: U+0000-024F;
}
@font-face {
  font-family: racco-roboto; src: url(/assets/fonts/roboto-cyrillic-wght-normal.woff2) format("woff2");
  font-style: normal; font-weight: 100 900; font-display: swap; unicode-range: U+0400-052F;
}

@font-face {
  font-family: racco-onest; src: url(/assets/fonts/onest-latin-wght-normal.woff2) format("woff2");
  font-style: normal; font-weight: 100 900; font-display: swap; unicode-range: U+0000-024F;
}
@font-face {
  font-family: racco-onest; src: url(/assets/fonts/onest-cyrillic-wght-normal.woff2) format("woff2");
  font-style: normal; font-weight: 100 900; font-display: swap; unicode-range: U+0400-052F;
}

@font-face {
  font-family: racco-golos-text; src: url(/assets/fonts/golos-text-latin-wght-normal.woff2) format("woff2");
  font-style: normal; font-weight: 100 900; font-display: swap; unicode-range: U+0000-024F;
}


/* These measured faces preserve real text rather than baking words into images. */
.home .balance > span { font-family: racco-roboto, Arial, sans-serif; font-size: 32.8rem; font-weight: 650; letter-spacing: .3rem; }
.earn .screen-heading h1 { font-family: racco-roboto, Arial, sans-serif; font-size: 29.8rem; font-weight: 750; letter-spacing: .3rem; }
.upgrades .screen-heading h1 { font-family: racco-roboto, Arial, sans-serif; font-size: 30.6rem; font-weight: 700; letter-spacing: 0; }
.earn .screen-heading p, .upgrades .screen-heading p { font-family: racco-onest, Arial, sans-serif; font-size: 15.2rem; font-weight: 400; letter-spacing: -.3rem; }
.earn .row-text strong { font-family: racco-onest, Arial, sans-serif; font-size: 14.2rem; font-weight: 650; letter-spacing: -.55rem; }
.upgrades .row-text strong { font-family: racco-onest, Arial, sans-serif; font-size: 14.2rem; font-weight: 600; letter-spacing: 0; }
.profile .profile-identity h1 { font-family: racco-golos-text, Arial, sans-serif; font-size: 27.2rem; font-weight: 600; letter-spacing: .3rem; }
.profile .profile-menu button { font-family: racco-roboto, Arial, sans-serif; font-size: 15.6rem; font-weight: 400; letter-spacing: -.3rem; }
.home .balance > .icon { translate:-1rem 0 }
.home .balance > span { translate:-4rem 1rem }
.earn .screen-heading h1 { translate:2rem -1rem }
.earn .screen-heading p { translate:2rem 0 }
.upgrades .screen-heading p { translate:1rem -1rem }
.earn [data-quest-row="channel"] strong,.earn [data-quest-row="invite"] strong { translate:1rem 0 }
.earn [data-quest-row="video"] strong,.earn [data-quest-row="minigame"] strong,.earn [data-quest-row="daily"] strong { translate:3rem 0 }
.upgrades [data-upgrade-row="tap"] strong { translate:1rem -1rem }
.upgrades [data-upgrade-row="passive"] strong { translate:2rem -1rem }
.upgrades [data-upgrade-row="recovery"] strong { translate:1rem 0 }
.upgrades [data-upgrade-row="multi"] strong { translate:-1rem 0 }
.profile .profile-identity h1 { translate:0 -1rem }
.profile [data-action="achievements"] > span:first-of-type { translate:-3rem 0 }
.profile [data-action="settings"] > span:first-of-type { translate:0 1rem }
.profile [data-action="support"] > span:first-of-type { translate:2rem 0 }

/* Independent icon placement: the source has slightly different nav alignments per screen. */
#app .tabs [data-tab="home"] .tab-icon { translate:var(--nav-home-x,0) 1rem; }
#app .tabs [data-tab="earn"] .tab-icon { translate:var(--nav-earn-x,1rem) 1rem; }
#app .tabs [data-tab="upgrades"] .tab-icon { translate:var(--nav-upgrades-x,1rem) var(--nav-upgrades-y,1rem); }
#app .tabs [data-tab="profile"] .tab-icon { translate:var(--nav-profile-x,0) 0; }
#app[data-active-view="earn"] {
  --nav-home-x:-1rem; --nav-earn-x:-2rem; --nav-upgrades-x:-3rem; --nav-profile-x:-5rem;
}
#app[data-active-view="upgrades"] {
  --nav-home-x:-2rem; --nav-earn-x:-3rem; --nav-upgrades-x:-3rem; --nav-upgrades-y:0; --nav-profile-x:-2rem;
}
#app[data-active-view="profile"] {
  --nav-home-x:-1rem; --nav-earn-x:-2rem; --nav-upgrades-x:-2rem; --nav-upgrades-y:0; --nav-profile-x:-2rem;
}
#app[data-active-view="earn"] .header-avatar { translate:1rem 0 }
#app[data-active-view="earn"] .player-name,#app[data-active-view="earn"] .player-level { translate:2rem 0 }
#app[data-active-view="upgrades"] .header-avatar,#app[data-active-view="profile"] .header-avatar,
#app[data-active-view="upgrades"] .player-name,#app[data-active-view="profile"] .player-name { translate:-1rem 0 }
.home .energy-icon { translate:0 -1rem }
.upgrades [data-upgrade-row="tap"] .row-icon { translate:-1rem -7rem }
