/* Home: the one-path game (src/pages/home.mjs). The win ground from win.css:
   the balance big at the top, one huge glowing move, the spin as a prize, the
   rest folded into More. Nothing under 15px, tap targets 48px and up, headings
   700 at most; every animation stops under prefers-reduced-motion (app.css). */
.home{gap:16px}

/* The balance, like a betting balance, with the R5 top-up beside it */
.home-bal{display:flex;align-items:stretch;gap:10px;padding:8px 8px 8px 16px;border-radius:16px;background:#ffffff14;box-shadow:inset 0 0 0 1.5px #ffffff2e}
.home-bal-main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;min-height:64px}
.home-bal-label{font-size:15px;font-weight:600;color:#dfe6ff}
.home-bal-line{display:flex;align-items:baseline;gap:8px}
.home .balance-num{font-family:Archivo,'Archivo Fallback',system-ui,sans-serif;font-size:44px;line-height:1;font-weight:700;font-stretch:80%;letter-spacing:-.03em;color:var(--gold)}
.home-bal-word{font-size:19px;font-weight:600;color:#fff}
.home-bal-add{display:flex;align-items:center;gap:4px;min-height:56px;padding:0 16px;border-radius:12px;align-self:center;background:var(--gold);color:var(--gold-ink);font-size:20px;font-weight:700;box-shadow:0 4px 0 var(--gold-deep)}
.home-bal-add .icon{width:20px;height:20px;stroke-width:3}
.home-bal-guest{align-items:center;min-height:60px;padding:8px 14px;font-size:17px;font-weight:600;color:#fff}
.home-bal-guest>span{flex:1}
.home-bal-guest .icon{width:22px;height:22px;color:var(--gold)}

/* The move: one card, glowing, the one thing to do */
.move{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:center;gap:10px;padding:22px 18px 20px;border-radius:22px;text-align:center;background:radial-gradient(120% 90% at 50% 0%,var(--win-light),var(--win-ground) 72%);box-shadow:inset 0 0 0 3px var(--gold),0 18px 40px #06105a73}
/* The glow breathes as an opacity layer: no repaint on cheap phones. */
.move::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 36px 6px #ffcf3d59;opacity:0;animation:move-glow 2.4s ease-in-out infinite;will-change:opacity}
.move::before{content:'';position:absolute;left:50%;top:34%;width:600px;height:600px;margin:-300px 0 0 -300px;z-index:-1;border-radius:50%;background:repeating-conic-gradient(from 0deg,#ffffff14 0 8deg,#fff0 8deg 22deg);-webkit-mask:radial-gradient(circle,#000 0,#000 20%,#0000 64%);mask:radial-gradient(circle,#000 0,#000 20%,#0000 64%);animation:win-spin 60s linear infinite;pointer-events:none}
.move-kicker{display:flex;align-items:center;justify-content:center;gap:8px;max-width:100%;font-size:17px;line-height:1.3;font-weight:700;color:var(--gold)}
.move-kicker .icon{flex:0 0 22px;width:22px;height:22px}
.move-big{font-size:clamp(68px,22vw,100px);line-height:.95;font-weight:700;font-stretch:78%;letter-spacing:-.04em;color:var(--gold);text-shadow:0 5px 0 var(--gold-ink);font-variant-numeric:tabular-nums}
.move-big.is-long{font-size:clamp(48px,15vw,66px)}
.move-unit{margin-top:-4px;font-size:17px;font-weight:600;color:#e6ebff}
.move-title{font-size:29px;line-height:1.12;font-weight:700;font-stretch:86%;letter-spacing:-.02em;color:#fff;overflow-wrap:anywhere}
.move-sub{font-size:17px;line-height:1.4;color:#e6ebff}
.move-bar{width:100%;height:16px;padding:3px;border-radius:8px;background:#ffffff26}
.move-bar i{display:block;height:100%;border-radius:5px;background:var(--gold);transform-origin:left;animation:road-grow 1s cubic-bezier(.2,.8,.2,1) .2s both}
.move-btn{margin-top:6px;min-height:78px;font-size:22px;animation:move-ping 1.8s ease-out infinite}
.move-btn:active{animation:none}
.move-odds{display:flex;align-items:flex-start;gap:8px;font-size:15px;line-height:1.45;color:#dfe6ff;text-align:left}
.move-odds .icon{flex:0 0 18px;width:18px;height:18px;margin-top:2px;color:var(--gold)}
.move-odds a{color:#fff;text-decoration:underline;text-underline-offset:3px}
@keyframes move-glow{0%,100%{opacity:0}50%{opacity:1}}
/* A ring that keeps leaving the button: motion that never moves the button itself. */
@keyframes move-ping{0%{box-shadow:0 5px 0 var(--gold-deep),0 12px 26px #06105a59,0 0 0 0 #ffcf3dcc}80%,100%{box-shadow:0 5px 0 var(--gold-deep),0 12px 26px #06105a59,0 0 0 16px #ffcf3d00}}
@keyframes road-grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}

/* The daily spin as a prize */
.home-spin{display:flex;align-items:center;gap:12px;min-height:76px;padding:10px 12px;border-radius:18px;background:#fff;color:var(--ink);box-shadow:0 10px 26px #06105a4d}
.home-spin-icon{flex:0 0 52px;display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:var(--gold);color:var(--gold-ink);box-shadow:0 4px 0 var(--gold-deep)}
.home-spin-icon .icon{width:28px;height:28px;animation:win-spin 5s linear infinite}
.home-spin-text{flex:1;min-width:0;display:flex;flex-direction:column}
.home-spin-title{font-size:18px;line-height:1.25;font-weight:700}
.home-spin-sub{font-size:15px;color:var(--muted)}
.home-spin-go{display:grid;place-items:center;min-height:48px;padding:0 18px;border-radius:12px;background:var(--blue);color:#fff;font-size:18px;font-weight:700}
.home-spin.is-done{justify-content:center;min-height:56px;background:#ffffff14;color:#fff;box-shadow:none;font-size:16px;font-weight:600}
.home-spin.is-done .icon{width:22px;height:22px;color:var(--gold)}
.home-spin.is-done .num{color:var(--gold);font-weight:700}

/* A one-time notice (family topped them up) */
.home-notice .tile-hero{background:var(--gold);color:var(--gold-ink)}
.home-notice .tile-hero .tile-sub,.home-notice .tile-hero>.icon{color:var(--gold-ink)}
.home-notice .tile-hero .tile-icon{background:var(--gold-ink);color:var(--gold)}

/* Everything else, folded away */
.home-more{border-radius:16px;background:#ffffff0f}
.home-more summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:56px;font-size:17px;font-weight:600;color:#fff;cursor:pointer;list-style:none}
.home-more summary::-webkit-details-marker{display:none}
.home-more summary .icon{width:20px;height:20px;transition:transform .16s}
.home-more[open] summary .icon{transform:rotate(45deg)}
.home-more .tiles{padding:0 10px 10px}
.home-more .tile{min-height:64px;background:#ffffff1a;color:#fff}
.home-more .tile-icon{width:40px;height:40px;background:#ffffff26}
.home-more .tile-icon .icon{width:22px;height:22px}
.home-more .tile-sub,.home-more .tile>.icon{color:#dfe6ff}
.home-more .card{background:#ffffff1a}
.home-more .link-btn{color:#fff;font-size:16px}

/* The wallet: the balance huge, R5 the one move, the history on a white card */
.wallet-top{text-align:center}
.wallet-top .home-bal-label{font-size:17px;font-weight:600;color:#dfe6ff}
.wallet-line{display:flex;justify-content:center;align-items:baseline;gap:10px}
.wallet .balance-num{font-size:clamp(84px,28vw,120px);text-shadow:0 5px 0 var(--gold-ink)}
.wallet .home-bal-word{font-size:24px}
.wallet-split{max-width:32ch;margin:6px auto 0;font-size:15px;line-height:1.45;color:#dfe6ff}
.wallet-pay .topup{margin:0}
.wallet-pay .topup-main{min-height:88px}
.wallet-pay .topup-sub{color:var(--gold-ink);opacity:.8}
.wallet-friends{display:flex;align-items:center;gap:10px;min-height:56px;padding:0 16px;border-radius:14px;background:#ffffff14;color:#fff;font-size:17px;font-weight:600}
.wallet-friends span{flex:1}
.wallet-friends .icon{width:22px;height:22px;color:var(--gold)}
.wallet-history{padding:14px 16px;border-radius:16px;background:#fff;color:var(--ink)}
.wallet-history .note{color:var(--muted)}
