@charset "UTF-8";
/* Swarz, neon low-poly direction (from the 17 Nov UI concept in output/swarz-ui-20261117). */
:root {
  color-scheme: dark;
  --bg: #100e1c; --panel: #201d36; --panel-dark: #12101f; --ink: #f2ffe6; --muted: #a4a1bc; --line: #3b3457;
  --accent: #d9ff57; --accent-dark: #637e24; --button-ink: #171a0a; --violet: #9a77ff; --cyan: #4fe3ff; --icon-line: #65811c;
  --display: Impact, Haettenschweiler, 'Arial Narrow Bold', 'Arial Narrow', sans-serif-condensed, sans-serif;
  --body: 'Trebuchet MS', 'Segoe UI', Roboto, Arial, sans-serif;
  --header: 54px; --nav: 62px; --action: 60px; --title: 38px;
}
* { box-sizing: border-box; scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #08070f; }
body { color: var(--ink); font-family: var(--body); display: grid; place-items: center; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
button > * { pointer-events: none; }
svg { display: block; width: 24px; height: 24px; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; pointer-events: none; }

.app { position: relative; background: var(--bg); width: 100%; max-width: 480px; height: 100vh; height: 100dvh; display: grid; grid-template-rows: var(--header) minmax(0, 1fr) var(--nav); overflow: clip; isolation: isolate; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); background: var(--panel-dark); z-index: 3; }
.brand { font-family: var(--display); font-size: 26px; font-weight: 900; letter-spacing: 1px; line-height: 1; }
.brand-dot { color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 8px; }
.ore-wallet { display: flex; gap: 7px; align-items: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ore-icon { width: 22px; height: 24px; color: var(--accent); }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 6px 14px 6px 14px; background: var(--panel); display: grid; place-items: center; color: var(--muted); padding: 0; }
.icon-button svg { width: 21px; height: 21px; }
.icon-button[aria-pressed="true"] { color: #7d7996; }

.screen { min-height: 0; position: relative; overflow: clip; }
.kicker { display: block; font: 800 11px/1.3 var(--body); letter-spacing: 1.9px; color: var(--accent); text-transform: uppercase; }
h1 { font-family: var(--display); font-weight: 900; font-size: var(--title); line-height: 1.1; letter-spacing: .4px; margin-top: 3px; }

/* Mine */
.mine-screen { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.hero { position: relative; min-height: 0; overflow: clip; }
.hero-back { position: absolute; inset: 0; background: radial-gradient(120% 70% at 50% 108%, #2a1f5c 0, transparent 62%), radial-gradient(60% 34% at 50% 96%, #d9ff5726 0, transparent 70%), var(--bg); }
.hero-back i { position: absolute; display: block; opacity: .5; }
.hero-back i:nth-child(1) { left: -6%; top: 12%; width: 46%; height: 62%; background: linear-gradient(160deg, #3a2a86, #191338); clip-path: polygon(0 8%, 62% 0, 100% 46%, 54% 100%, 0 82%); }
.hero-back i:nth-child(2) { right: -8%; top: 4%; width: 50%; height: 58%; background: linear-gradient(200deg, #2b3f9c, #17123a); clip-path: polygon(34% 0, 100% 12%, 100% 78%, 48% 100%, 0 52%); }
.hero-back i:nth-child(3) { left: 4%; bottom: 0; width: 30%; height: 26%; background: linear-gradient(180deg, #4fe3ff66, #2a1f5c00); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: .35; }
.hero-back i:nth-child(4) { right: 6%; bottom: 0; width: 24%; height: 34%; background: linear-gradient(180deg, #d9ff5755, #2a1f5c00); clip-path: polygon(40% 0, 100% 100%, 0 100%); opacity: .3; }
.hero-back b { position: absolute; left: 18%; right: 18%; bottom: 3%; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, #000a, transparent); }
.hero-image { position: absolute; left: 6%; right: 6%; bottom: 4%; top: 78px; width: 88%; height: calc(100% - 78px - 4%); object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 18px #0009); }
.hero-heading { position: absolute; left: 16px; top: 12px; right: 16px; text-shadow: 0 2px 8px #000a; }
.rate-chip { position: absolute; right: 10px; bottom: 8px; display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px; border: 1px solid var(--line); border-radius: 5px 13px 5px 13px; background: #12101fcc; font-size: 12px; color: var(--muted); }
.rate-chip svg { width: 17px; height: 17px; color: var(--violet); }
.rate-chip b { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.ore-pop { position: absolute; top: 34%; left: 0; right: 0; text-align: center; color: var(--accent); font: 900 46px var(--display); text-shadow: 0 3px 0 #000a, 0 0 22px #d9ff5766; opacity: 0; pointer-events: none; }
.dev-bar { position: absolute; left: 10px; bottom: 8px; display: flex; gap: 6px; }
.dev-bar button { border: 1px dashed var(--violet); background: #12101fdd; color: var(--violet); border-radius: 5px; font: 800 10px/1 var(--body); letter-spacing: .8px; padding: 8px 9px; }

.actions { padding: 8px 16px 12px; background: var(--bg); z-index: 2; }
.progress-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; line-height: 20px; color: var(--muted); gap: 10px; }
.progress-label strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-track { position: relative; width: 100%; height: 11px; border-radius: 2px; border: 2px solid var(--panel-dark); background: var(--panel); overflow: clip; box-shadow: 0 1px 0 var(--line); margin: 4px 0 11px; }
.progress-track > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s cubic-bezier(.2, .8, .2, 1); }

.main-action { position: relative; overflow: clip; width: 100%; min-height: var(--action); border-radius: 7px 19px 7px 19px; border: 2px solid #f2e9b433; border-bottom: 5px solid var(--accent-dark); background: var(--accent); color: var(--button-ink); display: flex; justify-content: center; align-items: center; gap: 10px; box-shadow: 0 0 18px #d9ff5718, inset 0 2px 0 #fff5; font-family: var(--display); font-weight: 900; font-size: 25px; letter-spacing: 1.5px; white-space: nowrap; padding: 4px 12px; text-decoration: none; }
.main-action svg { width: 28px; height: 28px; flex: none; }
.main-action > * { position: relative; }
.main-side { font: 800 12px/1 var(--body); border-left: 1px solid #34280840; padding-left: 12px; margin-left: 4px; letter-spacing: 0; }
.main-action:active { translate: 0 3px; border-bottom-width: 2px; }
.main-action.waiting { background: var(--panel); color: var(--ink); border-color: var(--line); border-bottom-color: #0b0a14; box-shadow: none; font-size: 24px; font-variant-numeric: tabular-nums; }
.main-action.waiting svg { color: var(--violet); width: 24px; height: 24px; }
.main-action.waiting .main-side { border-left-color: var(--line); color: var(--muted); }
.main-action.busy { filter: saturate(.5) brightness(.85); pointer-events: none; }
.cart-fill { position: absolute !important; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #9a77ff2e, #9a77ff55); display: none; }
.main-action.waiting .cart-fill { display: block; }

/* Road */
.road-screen, .tasks-screen { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.tasks-screen { grid-template-rows: auto auto minmax(0, 1fr); }
.screen-heading { padding: 16px 18px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 2; }
.screen-heading h1 { font-size: 32px; }
.count-mark { display: flex; flex-direction: column; font-family: var(--display); text-align: right; color: var(--accent); font-size: 28px; line-height: 1; }
.count-mark span { color: var(--muted); font: 11px var(--body); margin-top: 4px; }
.road-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.road { width: min(100%, 400px); margin: auto; position: relative; padding: 4px 14px 22px; }
.road-line { position: absolute; left: 14px; top: 4px; z-index: 0; color: var(--line); overflow: visible; }
.road-line path { fill: none; stroke: currentColor; stroke-width: 14; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.stop { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; height: 104px; padding: 0 16px; }
.stop.right { flex-direction: row-reverse; }
.stop.right .stop-copy { text-align: right; }
.stop-copy { flex: 1; min-width: 0; }
.stop-copy strong { font-size: 16px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop-copy span { font-size: 11px; color: var(--muted); display: block; margin-top: 4px; }
.node { flex: none; position: relative; width: 78px; height: 78px; border-radius: 8px 25px 8px 25px; border: 3px solid var(--line); border-bottom-width: 6px; background: var(--panel); box-shadow: 0 5px 0 var(--panel-dark); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; color: var(--muted); padding: 0; }
.node svg { width: 20px; height: 20px; }
.node-number { font: 900 19px/1 var(--display); letter-spacing: .4px; }
.node-art { position: absolute; inset: 0; overflow: clip; border-radius: 5px 22px 5px 19px; }
.node-art img { position: absolute; left: -40%; top: 5%; width: 180%; height: 180%; object-fit: contain; object-position: center top; }
.node.open { border-color: #5a4f8a; background: linear-gradient(180deg, #2c2752, #1a1730); }
.node.open .node-number, .node.current .node-number { position: absolute; bottom: -9px; left: -7px; min-width: 30px; height: 30px; padding: 0 5px; display: grid; place-items: center; border-radius: 5px 11px 5px 11px; border: 3px solid var(--bg); background: var(--line); color: var(--ink); font-size: 15px; }
.node.current { border-color: var(--accent); background: linear-gradient(180deg, #3a4a1c, #1a1730); }
.node.current .node-number { background: var(--accent); color: var(--button-ink); }
.stop.current .stop-copy strong { color: var(--accent); }
.stop.milestone .node { border-color: #6f7f33; color: var(--accent); }
.road-gap { position: relative; z-index: 1; height: 64px; display: grid; place-items: center; }
.road-gap span { background: var(--bg); border: 1px dashed var(--line); border-radius: 20px; padding: 7px 14px; font-size: 11px; color: var(--muted); }
.road-prize { position: relative; z-index: 1; width: 100%; border: 1px solid #d9ff574d; background: var(--panel); border-radius: 7px 19px 7px 19px; padding: 15px; display: flex; gap: 12px; align-items: center; color: var(--accent); font-weight: 900; font-size: 14px; margin-bottom: 8px; }
.road-prize svg:last-child { margin-left: auto; width: 20px; }

/* Tasks */
.screen-note { padding: 0 18px 12px; font-size: 13px; color: var(--muted); }
.task-list { overflow-y: auto; min-height: 0; padding: 2px 14px 20px; display: flex; flex-direction: column; gap: 10px; }
.task { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 7px 19px 7px 19px; background: var(--panel); }
.task-icon { width: 46px; height: 46px; border-radius: 6px 14px 6px 14px; background: var(--panel-dark); display: grid; place-items: center; color: var(--violet); }
.task strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-reward { display: block; font-size: 12px; color: var(--accent); margin-top: 4px; font-weight: 800; font-variant-numeric: tabular-nums; }
.task-button { min-width: 92px; min-height: 44px; border-radius: 6px 14px 6px 14px; border: 0; border-bottom: 4px solid var(--accent-dark); background: var(--accent); color: var(--button-ink); font: 900 16px var(--display); letter-spacing: 1px; padding: 4px 12px; }
.task-button.waiting { background: var(--panel-dark); color: var(--muted); border-bottom-color: #0b0a14; font: 800 13px var(--body); letter-spacing: 0; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; gap: 5px; }
.task-button.waiting svg { width: 15px; height: 15px; }
.task-button.busy { filter: saturate(.5) brightness(.85); pointer-events: none; }

/* Prize */
.prize-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.prize-number { font: 900 26px var(--display); color: var(--accent); letter-spacing: 1px; border: 1px solid #d9ff5766; border-radius: 6px 14px 6px 14px; padding: 6px 10px; }
.prize-stage { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; overflow: clip; padding: 6px 0; }
.prize-orbit { position: absolute; width: 78%; aspect-ratio: 1; border: 1px solid #d9ff5733; border-radius: 50%; box-shadow: 0 0 0 22px #d9ff5708, 0 0 0 44px #d9ff5705; }
.plush-art { position: relative; height: min(78%, 330px); aspect-ratio: 430 / 547; overflow: clip; background: #f7eacf; border-radius: 48% 48% 16% 16%; box-shadow: 0 15px 25px #0006; flex: none; }
.plush-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prize-tag { position: relative; font-size: 12px; color: var(--muted); text-align: center; padding: 0 24px; line-height: 1.45; }

/* Navigation */
.bottom-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--panel-dark); border-top: 1px solid var(--line); padding: 5px 6px max(5px, env(safe-area-inset-bottom)); z-index: 3; }
.bottom-nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 800; position: relative; border-radius: 10px; color: var(--muted); padding: 0; }
.bottom-nav svg { width: 24px; height: 24px; }
.bottom-nav button[aria-current] { color: var(--accent); background: #d9ff5714; }
.bottom-nav button[aria-current]::before { content: ""; position: absolute; top: -6px; left: calc(50% - 13px); width: 26px; height: 3px; border-radius: 0 0 5px 5px; background: var(--accent); }
.dot { position: absolute; top: 5px; left: calc(50% + 9px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--panel-dark); }

/* Gate (loading, outside Telegram, error) */
.gate { position: fixed; inset: 0; z-index: 10; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.gate-brand { font: 900 54px var(--display); letter-spacing: 2px; }
.gate-text { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 280px; }
.gate-spinner { width: 34px; height: 34px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; }
.gate-action { max-width: 300px; font-size: 20px; }

/* Dialogs */
dialog { width: calc(100% - 28px); max-width: 380px; padding: 0; border: 2px solid var(--line); border-radius: 9px 24px 9px 24px; color: var(--ink); background: var(--panel-dark); box-shadow: 0 25px 90px #000c; max-height: calc(100dvh - 24px); overflow: auto; }
dialog::backdrop { background: #040711e0; }
dialog[open]:not(:modal) { position: fixed; inset: 0; margin: auto; z-index: 20; height: fit-content; }
.close-dialog { position: absolute; z-index: 3; right: 8px; top: 8px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; font-size: 24px; line-height: 1; background: var(--panel); color: var(--ink); padding: 0; }
.reveal-content { padding: 22px 20px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.reveal-stage { position: relative; width: 100%; height: min(40dvh, 330px); margin: 12px 0 12px; display: grid; place-items: center; }
.sealed-card { position: relative; width: 150px; height: 196px; border: 3px solid var(--accent); border-bottom-width: 8px; border-radius: 7px 22px 7px 22px; background: var(--panel); display: grid; place-items: center; box-shadow: 7px 8px 0 #0006; rotate: -4deg; }
.sealed-card > span { font: 900 96px var(--display); color: #4a4470; }
.sealed-card svg { position: absolute; top: 12px; right: 12px; width: 21px; color: var(--accent); }
.sealed-card b { position: absolute; bottom: 9px; left: 0; width: 100%; font: 900 22px var(--display); color: var(--accent); }
.reveal-art { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.reveal-art img { position: relative; max-width: 100%; max-height: min(40dvh, 330px); object-fit: contain; filter: drop-shadow(0 10px 16px #000a); }
.reveal-burst { position: absolute; width: min(36dvh, 290px); height: min(36dvh, 290px); border-radius: 50%; background: radial-gradient(closest-side, #d9ff5740, #9a77ff22 55%, transparent 72%); }
.reveal-content h2 { font: 900 30px/1.12 var(--display); letter-spacing: .4px; }
.reveal-content p { font-size: 14px; line-height: 1.45; color: var(--muted); margin-top: 8px; max-width: 280px; }
.reveal-content p:empty { display: none; }
.gene-card { width: 100%; margin-top: 14px; padding: 11px 13px 9px; border: 1px solid var(--line); border-radius: 6px 16px 6px 16px; background: var(--panel); text-align: left; }
.gene-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.gene-row svg { width: 19px; height: 19px; color: var(--violet); }
.gene-row b { margin-left: auto; color: var(--accent); font: 900 21px var(--display); letter-spacing: .5px; }
.gene-meter { position: relative; height: 8px; margin: 9px 0 5px; border-radius: 2px; background: linear-gradient(90deg, #5a4f8a, #9a77ff 50%, #d9ff57); }
.gene-meter span { position: absolute; top: -4px; width: 5px; height: 16px; margin-left: -2px; background: var(--ink); border-radius: 2px; box-shadow: 0 0 0 2px var(--panel); left: 50%; }
.gene-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gene-scale span:nth-child(2) { color: var(--ink); font-weight: 800; }
.dialog-action { margin-top: 16px; font-size: 22px; min-height: 54px; }

.toast { position: fixed; left: 16px; right: 16px; width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; bottom: calc(var(--nav) + 182px); translate: 0 12px; z-index: 30; padding: 10px 15px; border: 1px solid var(--line); border-radius: 6px 16px 6px 16px; background: #201d36f2; color: var(--ink); font-size: 13px; font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transition: opacity .18s, translate .18s; }
.toast.show { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .gate-spinner { animation: spin .8s linear infinite; }
  .main-action { transition: translate .08s ease-out, filter .12s ease-out; }
  .main-action.ready { animation: pulse 1.6s ease-in-out infinite; }
  .hero.strike .hero-image { animation: strike .3s cubic-bezier(.2, .8, .2, 1); }
  .hero.swap .hero-image { animation: swap .5s cubic-bezier(.2, .9, .3, 1.2); }
  .ore-pop.show { animation: rise .9s ease-out both; }
  .sealed-card.shake { animation: wobble .5s ease-in-out infinite; }
  .reveal-art.in img { animation: pop .55s cubic-bezier(.2, .9, .3, 1.3) both; }
  .reveal-art.in .reveal-burst { animation: burst .7s ease-out both; }
  @keyframes spin { to { rotate: 360deg; } }
  @keyframes pulse { 0%, 100% { box-shadow: 0 0 18px #d9ff5718, inset 0 2px 0 #fff5; } 50% { box-shadow: 0 0 30px #d9ff5766, inset 0 2px 0 #fff5; } }
  @keyframes strike { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(5px) scale(1.02, .98); } }
  @keyframes swap { 0% { transform: scale(.82); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
  @keyframes rise { 0% { opacity: 0; transform: translateY(18px) scale(.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-56px) scale(1); } }
  @keyframes wobble { 0%, 100% { rotate: -5deg; } 50% { rotate: -2deg; } }
  @keyframes pop { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
  @keyframes burst { 0% { transform: scale(.3); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
}

@media (max-height: 700px) {
  :root { --header: 48px; --nav: 56px; --action: 54px; --title: 30px; }
  .brand { font-size: 23px; }
  .icon-button { width: 36px; height: 36px; }
  .hero-heading { top: 8px; }
  .hero-image { top: 62px; height: calc(100% - 62px - 3%); bottom: 3%; }
  .actions { padding: 5px 14px 8px; }
  .progress-track { margin: 3px 0 8px; height: 10px; }
  .main-action { font-size: 22px; }
  .screen-heading { padding: 11px 16px 7px; }
  .screen-heading h1 { font-size: 27px; }
  .stop { height: 92px; }
  .node { width: 68px; height: 68px; }
  .reveal-content { padding: 16px 16px 14px; }
  .reveal-stage { height: 190px; margin: 8px 0; }
  .reveal-art img { max-height: 190px; }
  .sealed-card { width: 118px; height: 154px; }
  .sealed-card > span { font-size: 72px; }
  .reveal-burst { width: 180px; height: 180px; }
  .reveal-content h2 { font-size: 25px; }
  .gene-card { margin-top: 10px; padding: 9px 12px 7px; }
  .dialog-action { margin-top: 12px; min-height: 48px; font-size: 20px; }
  .bottom-nav button { font-size: 10px; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .toast { bottom: calc(var(--nav) + 160px); }
  .plush-art { height: min(74%, 250px); }
}
@media (max-height: 520px) {
  .reveal-stage { height: 130px; }
  .reveal-art img { max-height: 130px; }
  .sealed-card { width: 86px; height: 112px; }
  .sealed-card > span { font-size: 52px; }
  .sealed-card b { font-size: 16px; bottom: 5px; }
  .reveal-burst { width: 130px; height: 130px; }
  .prize-tag { display: none; }
}
@media (max-width: 350px) {
  .task { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
  .task-icon { width: 40px; height: 40px; }
  .task strong { font-size: 14px; }
  .task-button { min-width: 84px; padding: 4px 9px; }
  .task-button.waiting { font-size: 12px; }
  .ore-wallet { font-size: 16px; }
}
