:root {
  color-scheme: dark;
  font-size: clamp(.86px, 100vw / 364, 1.1264px);
  --text: #f4f4f4;
  --subtle: #e5e5e5;
  --muted: #d3d3d3;
  --yellow: #ffda19;
  --card: linear-gradient(164deg, #191919 0%, #171717 54%, #131313 100%);
  --border: #343331;
  --gold: linear-gradient(160deg, #ffdb26 0%, #ffc20c 52%, #ffb501 100%);
  --bar: linear-gradient(180deg, #ffda32 0%, #ffc00c 69%, #ffb204 100%);
  font-family: -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  background: #0c0c0c;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; min-height: 100vh; min-height: 100svh; font-size: 15rem }
button { padding: 0; border: 0; font: inherit; color: inherit; cursor: pointer; background: none; -webkit-tap-highlight-color: transparent }
button:focus-visible { outline: 2rem solid #ffda19; outline-offset: -2rem }
button:disabled { cursor: default }
p, h1 { margin: 0 }
[hidden] { display: none !important }
#app {
  --chrome-top: 0rem;
  --chrome-bottom: 0rem;
  position: relative; margin-inline: auto; width: min(100%,410px); height: 100vh; height: 100svh;
  overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 13%, #111 0%, transparent 36%), linear-gradient(#0b0b0b 0%, #0a0a0a 81%, #0c0c0c);
}
body.telegram-client #app {
  --chrome-top: calc(-33rem + max(
    var(--tg-safe-area-inset-top, 0px),
    var(--tg-content-safe-area-inset-top, 0px),
    env(safe-area-inset-top, 0px)
  ));
  --chrome-bottom: max(-18rem, calc(max(
    var(--tg-safe-area-inset-bottom, 0px),
    var(--tg-content-safe-area-inset-bottom, 0px),
    env(safe-area-inset-bottom, 0px)
  ) + 4px - 31rem));
  height: var(--tg-viewport-stable-height, 100svh);
}
body.telegram-client .status-bar, body.telegram-client .home-indicator { display: none }
.icon { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none }
.status-bar {
  position: absolute; top: 15rem; left: 36rem; right: 23rem; height: 18rem;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; font-size: 16rem; font-weight: 700;
}
.status-bar svg { width: 70rem; height: 14rem }
.player-header {
  position: absolute; top: calc(54rem + var(--chrome-top)); left: 18rem; right: 14rem; height: 59rem;
  display: grid; grid-template-columns: 59rem minmax(0, 1fr) 48rem 42rem; column-gap: 10rem;
  align-items: start;
}
.header-avatar { width: 59rem; height: 59rem }
.player-info { min-width: 0; margin: 3rem 0 0 5rem }
.player-name { display: block; margin-top: 1rem; font-size: 17rem; line-height: 20rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.player-level { display: block; font-size: 13rem; line-height: 15rem; color: #fff }
.meter { display: block; position: relative; overflow: hidden; border: .8rem solid #3b3a38; border-radius: 999rem; background: linear-gradient(#0c0c0c,#080808) }
.player-info .meter { height: 12rem; margin-top: 4rem }
.meter > span {
  position: absolute; inset: -1rem auto -1rem -1rem; max-width: calc(100% + 2rem);
  border-radius: inherit; background: var(--bar); box-shadow: inset 0 1rem 2rem #ffed71a8;
  transition: width 180ms ease-out;
}
.square {
  border-radius: 12rem; border: 1rem solid transparent;
  background: linear-gradient(#1b1a17, #171612) padding-box, linear-gradient(#4b4945,#22211d 60%,#23211e) border-box;
  display: grid; place-items: center;
}
.player-header .square { height: 41rem; margin-top: 5rem; position: relative }
.player-header .square .icon { width: 21rem; height: 23rem }
.player-header .streak { display: flex; align-items: center; justify-content: center; gap: 1rem; font-weight: 700; font-size: 15rem }
.player-header .streak .icon { width: 18rem }
.notification-dot {
  position: absolute; right: 0; top: -1rem; width: 11rem; height: 11rem; border-radius: 50%; background: var(--bar);
  box-shadow: inset 0 1rem 1rem #ffef78;
}

#app main { position: absolute; inset: calc(113rem + var(--chrome-top)) 0 calc(97rem + var(--chrome-bottom)); }
.view { height: 100%; overflow: auto; scrollbar-width: none; overscroll-behavior: contain; }
.view::-webkit-scrollbar { display: none }
.view:not([hidden]) { animation: view-in 135ms ease-out }
@keyframes view-in { from { opacity: .76; transform: translateX(3rem) } to { opacity: 1; transform: none } }

.home { padding-top: 29rem; }
.balance { display: flex; gap: 13rem; justify-content: center; align-items: center; white-space: nowrap; font-size: 34rem; font-weight: 800; line-height: 47rem; margin-left: 12rem; }
.balance .icon { width: 49rem; height: 48rem }
.per-tap { text-align: center; margin: 6rem 0 0 21rem; font-size: 16rem; line-height: 22rem; color: var(--subtle) }
.per-tap strong { color: var(--yellow); font-size: 18rem }
.coin-stage { position: relative; isolation: isolate; height: 303rem; margin-top: 8rem }
.coin-stage::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  top: 5rem; left: 14rem; width: 343rem; height: 283rem;
  background: radial-gradient(ellipse at 48% 49%, #734912 0%, #8a561e4d 50%, #63360a20 63%, transparent 76%);
}
#coin {
  display: block; position: absolute; width: 249rem; height: 251rem; top: 33rem; left: 61rem;
  border-radius: 50%; touch-action: none; user-select: none; will-change: transform;
  filter: drop-shadow(0 11rem 12rem #000b) drop-shadow(0 -3rem 12rem #df8c2855);
}
#coin .icon { border-radius: inherit }
#effects { position: absolute; inset: 0; overflow: visible; pointer-events: none }
.orbit { position: absolute; filter: drop-shadow(0 3rem 5rem #8e49064d); }
.nw { top: 6rem; left: 36rem; width: 52rem; height: 52rem }
.ne { top: 2rem; left: 288rem; width: 49rem; height: 49rem }
.sw { top: 231rem; left: 28rem; width: 42rem; height: 42rem }
.se { top: 229rem; left: 292rem; width: 46rem; height: 46rem }
.energy-line { position: relative; height: 52rem; display: grid; grid-template-columns: 25rem 1fr 38rem; column-gap: 10rem; margin: -2rem 26rem 0 33rem; }
.energy-icon { width: 25rem; height: 40rem; margin-top: -1rem }
.energy-plus { width: 38rem; height: 38rem; line-height: 30rem; font-size: 32rem; font-weight: 400; }
.energy-meter { text-align: center; padding-top: 11rem }
.energy-meter .meter { height: 19rem }
.energy-meter p { margin-top: 4rem; font-size: 15rem; color: #fff; }
.shortcuts { display: flex; justify-content: space-between; gap: 14rem; margin: 15rem 16rem 0 22rem; padding-bottom: 10rem }
.shortcuts button {
  display: grid; justify-items: center; align-content: center; gap: 5rem;
  flex: 1 1 0; min-width: 0; height: 80rem;
  border: 1rem solid transparent; border-radius: 14rem;
  background: var(--card) padding-box, linear-gradient(#414141,#171717) border-box;
  font-size: 13rem; white-space: nowrap;
}
.shortcuts .icon { width: 37rem; height: 34rem }

.earn, .upgrades { padding: 16rem 14rem 12rem 18rem; }
.upgrades { padding-left: 14rem; padding-right: 12rem; }
.screen-heading { text-align: center; margin: 0 0 22rem }
.screen-heading h1 { margin: 0; font-size: 31rem; line-height: 38rem; font-weight: 750; letter-spacing: -.5rem }
.screen-heading p { margin-top: 3rem; font-size: 16rem; line-height: 20rem; color: var(--subtle); }
.upgrades .screen-heading { margin-top: -1rem; }
.filter-bar {
  display: grid; height: 40rem; margin-bottom: 22rem; border-radius: 16rem;
  border: .8rem solid #343331; background: linear-gradient(#181818,#141414);
}
.earn-filter { grid-template-columns: 108fr 126fr 95fr; margin-left: 1rem; }
.filter-bar button { min-width: 0; font-size: 15rem; line-height: 1; }
.earn-filter button + button { border-left: .7rem solid #252525 }
.filter-bar button.active {
  background: var(--gold); border-radius: 15rem; border: 0; font-weight: 700; color: #080808;
  box-shadow: inset 0 1rem 1rem #ffec70a8;
}
.earn-filter .active { margin: -.8rem }
.upgrades-filter { grid-template-columns: repeat(4,1fr); gap: 1rem; height: 38rem; border: 0; background: transparent; margin-bottom: 24rem; }
.upgrades-filter button { background: linear-gradient(#181818,#141414); border: .8rem solid #343331; border-radius: 17rem; }
.upgrades-filter button.active { border-radius: 16rem; }

.rows { display: grid; gap: 9rem; }
.row {
  display: grid; align-items: center; height: 70rem;
  grid-template-columns: 44rem 1fr auto; column-gap: 12rem; padding: 0 6rem 0 11rem;
  background: var(--card) padding-box, linear-gradient(#3e3d3b,#212121) border-box;
  border: .8rem solid transparent; border-radius: 15rem;
}
.row-icon { width: 43rem; height: 43rem; display: grid; place-items: center; }
.quest-icon .icon { width: 37rem; height: 37rem }
.quest-icon.channel-icon, .quest-icon.video-icon {
  width: 42rem; height: 42rem; border-radius: 9rem;
  background: linear-gradient(#171717,#121212) padding-box, linear-gradient(#414141,#202020) border-box;
  border: .8rem solid transparent;
}
.quest-icon.channel-icon .icon { width: 35rem; height: 33rem }
.quest-icon.video-icon .icon { width: 32rem; height: 32rem }
.row-text { min-width: 0; display: grid; gap: 2rem; }
.row-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5rem; font-weight: 700; line-height: 17rem; letter-spacing: -.24rem }
.quest-reward { color: var(--yellow); font-size: 14.5rem; line-height: 18rem; margin-top: 5rem; }
.pill {
  min-height: 33rem; background: var(--gold); color: #060606; font-weight: 700;
  border-radius: 14rem; box-shadow: inset 0 1rem 1rem #ffeb70a0; white-space: nowrap;
  transition: transform 95ms, filter 95ms;
}
.pill:active { transform: scale(.96); filter: brightness(.92) }
.quest-button { width: 89rem; font-size: 12.5rem; }
.quest-button.completed { width: 57rem; height: 35rem; margin-right: 4rem; border-radius: 11rem; background: linear-gradient(#393939,#303030); box-shadow: none; color: #dedede; }
.quest-button .icon { width: 28rem; height: 23rem; margin: auto; }
.upgrade-row { height: 70rem; grid-template-columns: 44rem 1fr 90rem; column-gap: 10rem; padding-left: 11rem; padding-right: 5rem; }
.upgrade-row .row-text { gap: 2rem }
.upgrade-meta { font-size: 13.5rem; line-height: 15rem; white-space: nowrap; }
.upgrade-meta .arrow { padding: 0 5rem; }
.upgrade-next.tap-next { color: var(--yellow) }
.upgrade-next.passive-next,.upgrade-next.recovery-next { color: #ceeeff }
.upgrade-button { min-width: 90rem; display: flex; justify-content: center; align-items: center; gap: 6rem; font-size: 14rem; }
.price-rco {
  display: grid; place-items: center; width: 16rem; height: 16rem; border-radius: 50%;
  background: #090909; color: #ffdc15; font-size: 11rem; line-height: 1; font-weight: 800;
}

.profile { padding: 23rem 15rem 15rem 20rem; }
.profile-identity { text-align: center; }
.portrait { position: relative; width: 130rem; height: 131rem; margin: 0 auto; }
.profile-edit {
  position: absolute; width: 35rem; height: 35rem; right: -2rem; bottom: 1rem;
  border: 2rem solid #f2f2f2; border-radius: 50%; background: #141414; display: grid; place-items: center;
}
.profile-edit .icon { width: 22rem; height: 23rem; }
.profile-identity h1 { margin-top: 7rem; font-size: 28rem; font-weight: 800; line-height: 34rem; }
.profile-identity p { margin-top: 1rem; color: #fff; font-size: 15rem; line-height: 20rem; }
.profile-progress { width: 243rem; margin: 6rem auto 0; }
.profile-progress .meter { height: 13rem; border-color: #676664; }
.profile-progress p { margin-top: 4rem; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9rem; margin-top: 21rem; }
.profile-stats > div {
  height: 61rem; border: .8rem solid #3e3d3b; border-radius: 12rem;
  background: var(--card); display: grid; grid-template-columns: 36rem auto; grid-template-rows: 27rem 19rem;
  column-gap: 8rem; align-content: center; align-items: center; justify-content: center;
}
.profile-stats .icon { width: 36rem; height: 37rem; grid-row: span 2; align-self: start; margin-top: 1rem; }
.profile-stats > div:nth-child(2) { grid-template-columns: 26rem auto; gap: 0 3rem; }
.profile-stats > div:nth-child(2) .icon { width: 26rem; height: 27rem; grid-row: 1; }
.profile-stats > div:nth-child(2) .stat-label { grid-column: span 2; }
.profile-stats strong { font-size: 22rem; line-height: 25rem; }
.profile-stats .stat-label { text-align: center; font-size: 15rem; color: #e4e4e4; }
.profile-menu {
  border-radius: 14rem; overflow: hidden; margin-top: 21rem;
  border: .8rem solid transparent; background: var(--card) padding-box,linear-gradient(#3f3e3b,#171717) border-box;
}
.profile-menu button { display: grid; grid-template-columns: 35rem 1fr 10rem; gap: 14rem; align-items: center; text-align: left; width: 100%; height: 49.5rem; padding: 0 17rem; font-size: 16rem; letter-spacing: -.21rem; }
.profile-menu button + button { border-top: 1rem solid #3c3a39; }
.profile-menu .icon { width: 33rem; height: 33rem; }
.chevron { justify-self: end; width: 10rem; height: 10rem; border: solid var(--muted); border-width: 1.8rem 1.8rem 0 0; transform: rotate(45deg); margin-right: 2rem; }

.tabs {
  position: absolute; z-index: 3; left: 8rem; right: 5rem; bottom: calc(31rem + var(--chrome-bottom)); height: 65rem;
  display: grid; grid-template-columns: repeat(4,1fr);
  border: .8rem solid transparent; border-radius: 21rem 21rem 19rem 19rem;
  background: linear-gradient(#151515,#0e0e0e) padding-box, linear-gradient(#464444,#1b1b1b 68%,#101010) border-box;
}
.tabs button {
  display: grid; justify-items: center; align-content: center; gap: 4rem;
  font-size: 12.8rem; letter-spacing: -.27rem; line-height: 15rem; white-space: nowrap;
  color: #f5f5f5; border-radius: 20rem;
}
.tab-icon { width: 29rem; height: 29rem; display: block; mask: var(--asset) center / contain no-repeat; background: #dedede; }
.tabs button.active { color: #ffdc0d; font-weight: 700; background: radial-gradient(ellipse at 49% 45%, #46351669 0%, #2f251564 55%, #2d241646 90%); }
.tabs button.active .tab-icon { background: #ffdd12; }
.home-indicator {
  height: 4rem; width: 106rem; position: absolute; bottom: 10rem; left: 50%; transform: translateX(-50%);
  border-radius: 999rem; background: #f5f5f5;
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Coordinates calibrated against the approved 364 × 801 mobile canvas. */
.status-bar > span { transform: translateY(1rem); }
.status-bar > svg { transform: translate(1rem,-1rem); }
.player-name { transform: translateX(-1rem); }
.player-level { transform: translateX(1rem); }
.player-header .streak .icon,.player-header .streak [data-field] { transform: translateX(-1rem); }

.home { padding-top: 27rem; }
.home .balance { font-size: 33rem; margin-left: 16rem; }
.home .balance .icon { transform: translate(-1rem,2rem); }
.home .balance > span { transform: translate(2rem,-2rem); }
.home .per-tap { margin-left: 29rem; }
.home .coin-stage { margin-top: 7rem; }
.home .energy-meter p { transform: translate(4rem,-2rem); }
.home .shortcuts { margin-top: 13rem; }
.home .shortcuts button { gap: 6rem; }
.home .shortcuts .icon { transform: translateY(-2rem); }
.home .shortcuts button:first-child .icon { transform: translate(2rem,-2rem); }
.tabs button > span { transform: translateX(var(--tab-x,0)); }
.tabs button:nth-child(1) { --tab-x: 2rem; }
.tabs button:nth-child(2) { --tab-x: 3rem; }
.tabs button:nth-child(3),.tabs button:nth-child(4) { --tab-x: 4rem; }
.home-indicator { transform: translateX(calc(-50% + 5rem)); }

.earn .screen-heading { transform: translateX(-2rem); }
.earn .screen-heading h1 { transform: translateY(1rem); }
.earn-filter button { padding-bottom: 5rem; }
.earn-filter button:nth-child(2) { text-indent: -4rem; }
.earn .row { column-gap: 10rem; padding-right: 8rem; }
.earn .row-text strong { font-size: 14rem; letter-spacing: -.4rem; overflow: visible; text-overflow: clip; }
.earn .row-text { transform: translate(var(--quest-x,0), var(--quest-y,-2rem)); }
.earn .quest-reward { transform: translateX(2rem); }
.earn .quest-button { transform: translateY(-2rem); }
.earn .quest-button:active { transform: translateY(-2rem) scale(.96); }
.quest-row[data-quest-row="channel"] { --quest-x: 0rem; --quest-y: -3rem; }
.quest-row[data-quest-row="video"] { --quest-x: 7rem; --quest-y: -1rem; }
.quest-row[data-quest-row="minigame"] { --quest-x: 7rem; --quest-y: -1rem; }
.quest-row[data-quest-row="invite"] { --quest-x: 11rem; --quest-y: -4rem; }
.quest-row[data-quest-row="daily"] { --quest-x: 12rem; --quest-y: -2rem; }
.quest-row[data-quest-row="invite"] .row-icon { transform: translate(1rem,-1rem); }
.quest-row[data-quest-row="daily"] .row-icon { transform: translate(1rem,-3rem); }

.upgrades .screen-heading h1 { transform: translateX(1rem); }
.upgrades .screen-heading p { transform: translate(3rem,1rem); }
.upgrades-filter { grid-template-columns: 80fr 79fr 83fr 95fr; }
.upgrades-filter button { padding-bottom: 4rem; }
.upgrade-row .row-text { transform: translate(var(--upgrade-x,0),var(--upgrade-y,0)); }
.upgrade-row[data-upgrade-row="energy"] { --upgrade-x: 3rem; --upgrade-y: 1rem; }
.upgrade-row[data-upgrade-row="passive"] { --upgrade-x: 5rem; --upgrade-y: 1rem; }
.upgrade-row[data-upgrade-row="recovery"] { --upgrade-x: 7rem; }
.upgrade-row[data-upgrade-row="multi"] { --upgrade-x: 9rem; --upgrade-y: 2rem; }
.upgrade-button { transform: translate(1rem,-1rem); }
.upgrade-button:active { transform: translate(1rem,-1rem) scale(.96); }

.profile .portrait,.profile-identity h1 { position: relative; left: -4rem; }
.profile-identity h1 { top: -1rem; }
.profile-identity > p { position: relative; left: -2rem; top: -2rem; }
.profile .profile-progress { margin-top: 4rem; transform: translateX(-1rem); }
.profile-stats { margin-top: 20rem; }
.profile-stats > div:nth-child(2) strong { transform: translateX(11rem); }
.profile-stats > div:nth-child(2) .icon { transform: translateX(5rem); }
.profile-menu .icon { transform: translateX(-2rem); }
.profile-menu button > span:not(.chevron) { transform: translate(var(--menu-x,3rem),1rem); }
.profile-menu button:nth-child(1) { --menu-x: 1rem; }
.profile-menu button:nth-child(2) { --menu-x: 5rem; }

/* Edge highlights and gold fills sampled from the approved artwork. */
:root {
  --gold: linear-gradient(168deg, #ffdb2e 0%, #ffc713 24%, #fbc00b 49%, #f8b202 100%);
  --bar: linear-gradient(180deg, #ffd73b 0%, #ffc924 11%, #ffc00e 44%, #f9b003 100%);
  --card: radial-gradient(ellipse at 75% 38%, #0908074a, transparent 76%),
    linear-gradient(170deg, #181818 0%, #151515 62%, #131313 100%);
}
.row {
  background: var(--card) padding-box, linear-gradient(#302e2e,#262524 37%,#292827) border-box;
}
.earn-filter { height: 39rem; transform: translateY(-1rem); margin-bottom: 22rem; }
.earn-filter,.upgrades-filter button { background: linear-gradient(#1b1b1b,#131313); }
.filter-bar button.active { background: radial-gradient(ellipse at 58% 25%, #ffcd10b5, transparent 76%), var(--gold); }
.pill:not(.completed) { background: radial-gradient(ellipse at 75% 33%, #ffd51b80, transparent 76%), var(--gold); }
.quest-button.completed .icon { mix-blend-mode: screen; }
.profile-stats > div { background: var(--card) padding-box, linear-gradient(#464443,#302f2e) border-box; border-color: transparent; }
.tabs {
  isolation: isolate;
  border-color: transparent;
  background: transparent;
}
.tabs::before {
  content: ''; pointer-events: none; position: absolute; z-index: -1;
  inset: 0rem -1rem -1rem;
  border: 1rem solid transparent; border-radius: 21rem 21rem 19rem 19rem;
  background: linear-gradient(#121212,#0c0c0c) padding-box, linear-gradient(#454342,#1b1b1b 68%,#101010) border-box;
}
.tabs button.active { background: radial-gradient(ellipse at 52% 39%, #523d1a80 0%, #382a1772 48%, #24201722 92%); }

.earn { padding-right: 15rem; }
.earn .quest-button,.earn .row-text,.earn .row-icon { translate: 0 1rem; }
.earn .quest-row[data-quest-row="minigame"] { translate: 0 1rem; }
