/* palette: Montana's store.css */
:root{--gold:#d0a04c;--gold-hi:#ecc77e;--gold-lo:#9a7432;--gold-rim:rgba(208,160,76,.34);--ink:#fff;--ink-2:rgba(255,255,255,.72);--ink-3:rgba(255,255,255,.48);--plate:rgba(14,11,7,.78);--line:rgba(208,160,76,.16);--blue:#0A84FF}
/* nikaunicorn.one in Montana's style: black, the gold of the author's sign, the serif of the names; the palette (:root) is
   Montana's store.css, put before this file by site/build.py */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;height:100%}
/* the top and bottom the page keeps clear: the device's safe area, and in the Mini App on the full screen the host's own,
   whose close and menu float over the top (Telegram's telegram-web-app.js sets these variables; Montana-TG app.css) */
:root{--top:max(env(safe-area-inset-top),calc(var(--tg-safe-area-inset-top,0px) + var(--tg-content-safe-area-inset-top,0px)));--bottom:max(env(safe-area-inset-bottom),var(--tg-safe-area-inset-bottom,0px))}
body{background:#000;color:var(--ink);font:17px/1.45 -apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",system-ui,sans-serif;-webkit-font-smoothing:antialiased}
body::before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(90% 45% at 50% 115%,rgba(208,160,76,.08),transparent 70%)}
/* the app, as a tap game: three views over the tab bar at the bottom -- the game fills the screen and does not scroll,
   the wallet and the info scroll under the bar; the bar keeps clear of the device's home indicator */
:root{--tabs:calc(64px + var(--bottom));--c:min(66vw,34vh,300px)}
@supports (height:100dvh){:root{--c:min(66vw,34dvh,300px)}}
main{position:relative;height:100%;max-width:560px;margin:0 auto}
.view{position:absolute;inset:0;overflow-y:auto;-webkit-overflow-scrolling:auto;padding:calc(62px + var(--top)) 16px calc(var(--tabs) + 24px)}
.view.game{overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:6px;text-align:center;padding-bottom:calc(var(--tabs) + 12px)}
.tabs{position:fixed;z-index:40;left:0;right:0;bottom:0;display:flex;justify-content:center;gap:6px;padding:8px 12px calc(8px + var(--bottom));background:rgba(12,9,4,.86);-webkit-backdrop-filter:blur(24px) saturate(1.4);backdrop-filter:blur(24px) saturate(1.4);border-top:1px solid rgba(208,160,76,.22)}
.tab{appearance:none;-webkit-appearance:none;flex:1;max-width:150px;display:flex;flex-direction:column;align-items:center;gap:3px;margin:0;padding:6px 4px;border:0;border-radius:14px;background:none;color:var(--ink-3);font:600 12px/1.2 -apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.tab img,.tab svg{width:26px;height:26px;border-radius:50%}
.tab svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tab img{opacity:.6;filter:grayscale(.6)}
.tab[aria-selected="true"]{color:var(--gold-hi);background:rgba(208,160,76,.12)}
.tab[aria-selected="true"] img{opacity:1;filter:none;box-shadow:0 0 0 1px var(--gold-rim)}
a{color:var(--blue);text-decoration:none}
/* the head, after the Pantheon on Fire of Montana's app (Montana-TG app.css, «the wallet»): the name and its flame, the coin
   that catches fire, the rising coins, the bar of the window, the reward; the gold of the author's sign in place of the blue */
.flame{display:inline-flex;align-items:center;gap:8px;margin:0;font:500 26px/1.15 ui-serif,"New York",Georgia,serif;letter-spacing:.04em;filter:drop-shadow(0 0 0 rgba(255,159,10,0));transition:filter .4s ease-in-out}
.flame.lit{filter:drop-shadow(0 0 10px rgba(255,159,10,.8))}
.flame svg{width:22px;height:22px;flex:none}
.flame span{background:linear-gradient(180deg,var(--gold-hi),var(--gold) 55%,var(--gold-lo));-webkit-background-clip:text;background-clip:text;color:transparent}
.coinhint{margin:0;min-height:2.7em;flex:none;max-width:340px;font-size:13px;line-height:1.35;color:var(--ink-3);opacity:0;transition:opacity .25s ease-in-out}
.coinhint.on{opacity:1}
.coinrow{position:relative;width:100%;display:flex;justify-content:center}
.coinpad{position:relative;width:calc(var(--c) + 24px);height:calc(var(--c) + 24px);border-radius:50%;display:grid;place-items:center;touch-action:none;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none}
.coinpad:focus-visible{box-shadow:0 0 0 2px var(--gold-rim)}
.mintcoin{display:block;position:relative;z-index:1;perspective:373px;pointer-events:none}
.coin{position:relative;display:block;width:var(--c);height:var(--c);transform-style:preserve-3d}
.coin img{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;object-fit:cover;backface-visibility:hidden;-webkit-backface-visibility:hidden;pointer-events:none;box-shadow:0 0 0 1px rgba(208,160,76,.45)}
.coin img.back{transform:rotateY(180deg)}
.mintcoin .coin img{box-shadow:0 0 0 1px rgba(208,160,76,.45),0 0 30px rgba(208,160,76,.28)}
.coin.turn{animation:turn 1.1s ease-in-out}
@keyframes turn{from{transform:rotateY(0deg)}to{transform:rotateY(360deg)}}
@media (prefers-reduced-motion:reduce){.coin.turn{animation:lightup .6s ease-out}}
@keyframes lightup{from{opacity:.35}to{opacity:1}}
/* the fire under the coin: its light follows the speed and flickers while it burns; the ring is the gold, eight points out */
.coinglow{position:absolute;left:50%;top:50%;width:calc(var(--c) + 8px);height:calc(var(--c) + 8px);margin:calc(var(--c) / -2 - 4px) 0 0 calc(var(--c) / -2 - 4px);border-radius:50%;background:radial-gradient(circle,#ffd60a 0,#ff9f0a 42%,#ff6a00 66%,rgba(255,106,0,0) 72%);filter:blur(18px);opacity:0;transition:opacity .25s ease-out;pointer-events:none}
.coinglow.on{animation:flicker 1.3s ease-in-out infinite alternate}
@keyframes flicker{0%{transform:scale(1)}35%{transform:scale(1.08,1.13)}70%{transform:scale(.97,1.05)}100%{transform:scale(1.05,1.02)}}
.coinring{position:absolute;left:50%;top:50%;width:calc(var(--c) + 18px);height:calc(var(--c) + 18px);margin:calc(var(--c) / -2 - 9px) 0 0 calc(var(--c) / -2 - 9px);border-radius:50%;border:3px solid var(--gold);opacity:0;transition:opacity .4s ease-in-out;pointer-events:none;z-index:1}
.coinring.on{opacity:1}
.embers{position:absolute;inset:0;pointer-events:none;z-index:2}
.ember{position:absolute;border-radius:50%;box-shadow:0 0 6px 2px rgba(255,159,10,.65);animation:ember 1.5s ease-out forwards}
@keyframes ember{from{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(.2);opacity:0}}
/* a small coin and «+1» rising where the finger landed: one more unicorn of the window (the taps mint nothing) */
.pop{position:absolute;z-index:3;display:inline-flex;align-items:center;gap:5px;padding:5px 10px 5px 5px;border-radius:999px;background:rgba(60,60,67,.6);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);perspective:50px;pointer-events:none;transform:translate(-50%,-50%);animation:popup .8s ease-out forwards}
@keyframes popup{to{transform:translate(-50%,calc(-50% - 56px));opacity:0}}
.pop b{font:700 18px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;color:var(--gold-hi);font-variant-numeric:tabular-nums}
.pop.still{animation-name:popfade}
@keyframes popfade{to{opacity:0}}
/* the window closed: our coin rises at both edges with the reward, turns once and fades (MTCoinSides) */
.sides{position:absolute;inset:0;display:flex;justify-content:space-between;align-items:center;pointer-events:none;opacity:0;z-index:3}
.sides.go{animation:sidesrise .9s ease-out forwards,sidesfade .3s ease-in .6s forwards}
.sides.still.go{animation:sidesstill .9s forwards}
@keyframes sidesrise{from{transform:translateY(40px);opacity:1}to{transform:translateY(-40px);opacity:1}}
@keyframes sidesfade{from{opacity:1}to{opacity:0}}
@keyframes sidesstill{0%,66%{opacity:1}100%{opacity:0}}
.side{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px;border-radius:999px;background:rgba(60,60,67,.55);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);perspective:67px}
.side .coin{width:30px;height:30px}
.side .coin img.pyr{backface-visibility:visible;-webkit-backface-visibility:visible}
.side b{font-size:17px;font-weight:600;color:var(--gold-hi);font-variant-numeric:tabular-nums}
.prog{display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;max-width:420px;flex:none}
.prog .bar{width:100%;height:10px;border-radius:10px;border:1px solid rgba(208,160,76,.3)}
.bar.fire i{background:linear-gradient(90deg,#ff6a00,#ff9f0a,#ffd60a)}
.mono{font-size:15px;color:var(--ink-2);font-variant-numeric:tabular-nums}
.mono #left{font-weight:700;color:var(--gold-hi)}
/* the game: the reward of the window -- its coins on their back, Montana's pyramid, with the badge of the sum over them --
   the count of unicorns under the coin, the leader and those playing, the prompt and the last window's outcome */
.stats{display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:8px;width:100%;max-width:420px;flex:none}
.stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:84px;padding:8px 6px;border-radius:16px;background:var(--plate);border:1px solid var(--line)}
.sl{font-size:11px;color:var(--ink-3);letter-spacing:.04em;text-transform:uppercase}
.sv{font:600 26px/1.1 ui-serif,"New York",Georgia,serif;color:var(--ink);font-variant-numeric:tabular-nums}
.prize{position:relative}
.badge{position:relative;z-index:1;margin-bottom:-7px;padding:3px 12px;border-radius:999px;background:linear-gradient(180deg,var(--gold-hi),var(--gold));color:#1a1204;font:700 16px/1.25 -apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;font-variant-numeric:tabular-nums;box-shadow:0 2px 10px rgba(0,0,0,.6)}
.stack{display:flex}
.stack img{width:30px;height:30px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgba(208,160,76,.55),0 3px 10px rgba(0,0,0,.6)}
.stack img+img{margin-left:-12px}
.score{display:flex;align-items:center;justify-content:center;gap:10px;flex:none;font:600 52px/1.05 ui-serif,"New York",Georgia,serif;color:var(--gold-hi);font-variant-numeric:tabular-nums}
.score small{align-self:flex-end;margin-bottom:8px;font:600 15px -apple-system,system-ui,sans-serif;color:var(--ink-3)}
.score img{width:38px;height:38px;border-radius:50%;box-shadow:0 0 0 1px rgba(208,160,76,.45)}
.play{margin:0;flex:none;max-width:360px;font-size:14px;color:var(--gold)}
.last{margin:0;flex:none;font-size:14px;color:var(--ink-3);font-variant-numeric:tabular-nums}
.last.you{color:var(--gold-hi)}
/* the personal corner: top left, the pair of Montana's language button at the top right (lang-switcher.js); a tap opens the wallet */
.me{position:absolute;z-index:30;top:calc(10px + var(--top));left:calc(12px + env(safe-area-inset-left))}
.me-btn{appearance:none;-webkit-appearance:none;display:flex;align-items:center;gap:8px;height:40px;max-width:62vw;margin:0;padding:0 14px 0 6px;border-radius:20px;border:1px solid rgba(208,160,76,.42);background:rgba(26,20,11,.55);-webkit-backdrop-filter:blur(24px) saturate(1.4);backdrop-filter:blur(24px) saturate(1.4);color:rgba(255,255,255,.86);font:600 15px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.me-face{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:linear-gradient(180deg,var(--gold-hi),var(--gold));color:#1a1204;font:600 14px/1 -apple-system,system-ui,sans-serif}
.me-face svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.me-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.me-bal{flex:none;padding-left:8px;border-left:1px solid rgba(208,160,76,.32);color:var(--gold-hi);font-variant-numeric:tabular-nums}
.me-bal.up{animation:balup 1.2s ease-out}
@keyframes balup{0%{text-shadow:0 0 12px rgba(255,214,10,.95);transform:scale(1.18)}100%{text-shadow:none;transform:scale(1)}}
.lead{margin:0 auto 16px;max-width:420px;color:var(--ink-2)}
.facts{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;width:100%}
.facts div{padding:14px 10px;border-radius:16px;background:var(--plate);border:1px solid var(--line)}
.facts b{display:block;font:500 22px/1.2 ui-serif,"New York",Georgia,serif;color:var(--gold-hi);font-variant-numeric:tabular-nums}
.facts span{display:block;margin-top:4px;font-size:12px;color:var(--ink-3)}
.card{margin:16px 0;padding:20px;border-radius:20px;background:var(--plate);border:1px solid var(--line)}
h2{margin:0 0 10px;font:500 21px/1.25 ui-serif,"New York",Georgia,serif;color:var(--gold-hi);letter-spacing:.02em}
.row{display:flex;justify-content:space-between;align-items:center;gap:8px}
.row h2{margin:0}
.pill{font:600 13px ui-monospace,Menlo,monospace;color:var(--gold);border:1px solid var(--gold-rim);border-radius:99px;padding:3px 10px;white-space:nowrap}
.note,.small,.kv dt,.kv small{color:var(--ink-3)}
.bar{height:6px;border-radius:6px;background:rgba(255,255,255,.06);overflow:hidden}
.bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--gold-lo),var(--gold-hi))}
.kv{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:14px 0 0;font-size:15px}
.kv dd{margin:0;overflow-wrap:anywhere}
.note{font-size:14px;margin:12px 0 0}
.small{font-size:13px}
code{font:13px ui-monospace,Menlo,monospace;color:var(--gold-hi);overflow-wrap:anywhere}
form{display:grid;gap:10px;margin-top:14px}
label{display:grid;gap:4px;font-size:14px;color:var(--ink-2)}
input,textarea{font:14px ui-monospace,Menlo,monospace;color:var(--ink);background:rgba(0,0,0,.6);border:1px solid var(--line);border-radius:12px;padding:10px;width:100%}
input:focus,textarea:focus{outline:2px solid var(--gold-rim);border-color:transparent}
.button{display:inline-block;justify-self:start;margin-top:12px;padding:13px 20px;border:0;border-radius:14px;font:600 16px/1.2 -apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;color:#1a1204;background:linear-gradient(180deg,var(--gold-hi),var(--gold));cursor:pointer;text-decoration:none}
.button:hover{filter:brightness(1.06)}
.button.quiet{color:var(--gold-hi);background:none;border:1px solid var(--gold-rim)}
form .button{margin-top:4px}
.who{margin:0 0 4px;font:500 20px/1.3 ui-serif,"New York",Georgia,serif;color:var(--gold-hi)}
.result{margin-top:14px;padding:14px;border-radius:14px;background:rgba(0,0,0,.5);border:1px solid var(--line)}
.result .win{margin:0 0 6px;overflow-wrap:anywhere;font:500 22px/1.3 ui-serif,"New York",Georgia,serif;color:var(--gold-hi)}
.result .err{margin:0;color:#ff8a8a}
.scroll{overflow-x:auto;margin:10px 0 0}
table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;font-size:15px}
th,td{text-align:left;padding:7px 4px;border-bottom:1px solid var(--line);white-space:nowrap}
td:last-child,th:last-child{text-align:right}
th{color:var(--ink-3);font-weight:500;font-size:13px}
tr.gap td{color:var(--ink-3);border-bottom-style:dashed}
.countdown b{color:var(--gold-hi)}
.rules{padding-left:22px;margin:0}
.rules li{margin:9px 0;color:var(--ink-2)}
.rules b{color:var(--ink)}
footer{text-align:center;margin-top:30px;font-size:14px;color:var(--ink-3)}
footer p{margin:8px 0}
@media (max-width:560px){.facts{grid-template-columns:1fr}}
@media (max-height:640px){.flame{display:none}.score{font-size:40px}.stat{min-height:70px}}
.net{margin-top:8px}
.net .score{margin:4px 0 18px;font-size:48px}
/* the wallet, as Montana's (Montana-TG app.css .walletbtns): the balance and its ticker, Send and Receive side by side, the
   key to receive with its code, and the history -- the windows won, the NIKA received and sent */
.pair{display:flex;gap:12px}
.capsule{appearance:none;-webkit-appearance:none;flex:1;height:52px;display:flex;align-items:center;justify-content:center;gap:8px;margin:0;padding:0 16px;border:0;border-radius:26px;font:600 17px/1 -apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.capsule:active{opacity:.75;transform:scale(.985)}
.capsule[disabled]{opacity:.4;cursor:default}
.capsule svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.capsule.prominent{background:linear-gradient(180deg,var(--gold-hi),var(--gold));color:#1a1204}
.capsule.tinted{background:rgba(208,160,76,.14);color:var(--gold-hi)}
.capsule[aria-expanded="true"]{box-shadow:0 0 0 2px var(--gold-rim)}
.recv .qr{display:grid;place-items:center;margin:4px 0 14px}
.recv .qr canvas{border-radius:14px}
.hist ol{list-style:none;margin:0;padding:0}
.hist li{display:flex;align-items:center;gap:12px;min-height:52px;padding:8px 0;border-top:1px solid var(--line)}
.hist li:first-child{border-top:0}
.hist .ic{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:rgba(208,160,76,.12);color:var(--gold-hi)}
.hist .ic img{width:34px;height:34px;border-radius:50%}
.hist .ic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hist .lt{flex:1;min-width:0;display:flex;flex-direction:column}
.hist .lw{font-size:16px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hist .cap{font-size:13px;color:var(--ink-3)}
.hist .ld{flex:none;font:600 17px/1 -apple-system,system-ui,sans-serif;font-variant-numeric:tabular-nums;color:var(--ink-2)}
.hist .ld.plus{color:var(--gold-hi)}
.hist li.wait{opacity:.6}
.net .kh{margin:10px 0 4px;color:var(--gold);font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}
.kh{margin:0 0 6px;color:var(--gold);font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}
.net .kh:first-child{margin-top:0}
.keyrow{display:flex;align-items:center;gap:8px}
.keyrow code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.mini{appearance:none;-webkit-appearance:none;flex:none;padding:4px 10px;border-radius:10px;border:1px solid rgba(208,160,76,.42);background:transparent;color:var(--gold-hi);font:600 12px/1.4 -apple-system,system-ui,sans-serif;cursor:pointer}
.net .kv{margin:10px 0 0}
.net form label{display:block;margin-top:6px}
.net form input{width:100%}
/* the explorer of sealed windows: the number of a window is the button that re-runs its draw */
#chain td .mini{font-variant-numeric:tabular-nums}
#chain td.you{color:var(--gold-hi)}
.net-test{color:var(--gold)}
/* the language button of Montana keeps clear of the host's menu in the Mini App */
html.tg .mt-lang{top:calc(10px + var(--top))}
