.ic-games{--m:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='2.5'%20y='7'%20width='19'%20height='11'%20rx='5.5'/%3E%3Cpath%20d='M7.5%2010.5v4M5.5%2012.5h4'/%3E%3Ccircle%20cx='15.5'%20cy='11.5'%20r='.7'%20fill='black'/%3E%3Ccircle%20cx='18'%20cy='13.5'%20r='.7'%20fill='black'/%3E%3C/svg%3E")}
.ic-puzzles{--m:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%208h4V6a2%202%200%201%201%204%200v2h4v4h-2a2%202%200%201%200%200%204h2v4H5z'/%3E%3C/svg%3E")}
.ic-stats{--m:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%2020V11M12%2020V4M19%2020v-6'/%3E%3C/svg%3E")}
.ic-settings{--m:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='3'/%3E%3Cpath%20d='M12%202.5v3M12%2018.5v3M2.5%2012h3M18.5%2012h3M5.3%205.3l2.1%202.1M16.6%2016.6l2.1%202.1M5.3%2018.7l2.1-2.1M16.6%207.4l2.1-2.1'/%3E%3C/svg%3E")}
.ic-search{--m:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='10.5'%20cy='10.5'%20r='6.5'/%3E%3Cpath%20d='M15.5%2015.5L21%2021'/%3E%3C/svg%3E")}
.ic-back{--m:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M15%205l-7%207%207%207'/%3E%3C/svg%3E")}
.ic-chevron{--m:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%205l7%207-7%207'/%3E%3C/svg%3E")}
.ic-check{--m:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%2012.5l4.5%204.5L19%207.5'/%3E%3C/svg%3E")}
.ic{display:inline-block;width:24px;height:24px;flex:none;background:currentColor;-webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat}
/* ---- Play Store-style layer: app bars, search, chips, store rows, listing page, buttons, bottom navigation ---- */
body{background:var(--bg);color:var(--ink);font-family:var(--font)}
h1,h2{font-weight:500}.section-title{font-size:1.25rem;margin:24px 16px 4px}
.appbar{display:flex;align-items:center;gap:var(--s3);padding:12px 16px 4px;max-width:960px;margin:0 auto}.appbar .brand{flex:1;margin:0}
.brand-logo{height:40px}.brand-mark{height:40px;width:40px}
.avatar{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--pc);color:var(--ink);font-weight:500;text-decoration:none;flex:none}
.search{display:flex;align-items:center;gap:var(--s3);margin:8px auto 12px;padding:0 16px;height:52px;border-radius:28px;background:var(--tonal);color:var(--muted);max-width:928px;width:calc(100% - 32px)}
.search input{flex:1;min-width:0;height:48px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:1rem}.search input::placeholder{color:var(--muted)}
.chips{display:flex;gap:var(--s2);overflow-x:auto;padding:0 16px 8px;max-width:960px;margin:0 auto;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}
.chip{flex:none;min-height:44px;padding:0 16px;border-radius:12px;border:1px solid var(--line);background:transparent;color:var(--ink);font:500 .875rem var(--font);cursor:pointer}
.chip[aria-pressed=true]{background:var(--pc);border-color:transparent}
.games-list{display:grid;gap:8px;padding:0 8px;max-width:960px;margin:0 auto}@media(min-width:760px){.games-list{grid-template-columns:1fr 1fr}}
.card{display:flex;align-items:center;gap:var(--s4);padding:12px 8px;border:0;border-radius:var(--r);background:transparent;box-shadow:none;overflow:visible;color:var(--ink);text-decoration:none}
.card[hidden]{display:none}@media(hover:hover){.card:hover{transform:none;background:var(--tonal);box-shadow:none}}
.card img.app-icon{width:64px;height:64px;aspect-ratio:1;border-radius:16px;object-fit:cover;flex:none;background:#1b2540;box-shadow:var(--shadow)}
.card .card-body{padding:0;min-width:0;flex:1}.card h2{margin:0;font-size:1rem;font-weight:500}
.card p{margin:2px 0;font-size:.8125rem;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card small{display:block;margin-top:2px;font-size:.75rem;font-weight:500;color:var(--primary-ink)}
.pill{flex:none;padding:8px 20px;border-radius:20px;background:var(--primary);color:var(--on-primary);font:500 .875rem var(--font)}
.empty{margin:24px 16px;color:var(--muted);text-align:center}
.card.note{display:block;margin:8px auto;width:calc(100% - 32px);padding:16px;background:var(--tonal);border-radius:var(--r);max-width:928px}.card.note p{display:block;color:var(--ink);font-size:.9375rem;margin:0 0 var(--s2)}.card.note .link{color:var(--primary-ink)}
.promo{display:flex;align-items:center;gap:var(--s3);margin:8px auto;width:calc(100% - 32px);padding:16px;border-radius:var(--r);background:var(--pc);color:var(--ink);text-decoration:none;max-width:928px}.promo b{display:block;font-weight:500}.promo span{font-size:.8125rem}.promo .ic{margin-left:auto}
main.with-nav{max-width:960px;margin-left:auto;margin-right:auto}
.link{color:var(--primary-ink)}
/* buttons: filled primary pill, outlined, tonal */
.btn{min-height:44px;padding:0 24px;border-radius:20px;background:var(--primary);color:var(--on-primary);font:500 .875rem var(--font);box-shadow:none;border:0}
.btn.alt{background:transparent;color:var(--primary-ink);border:1px solid var(--line)}
.btn.small{background:var(--tonal);color:var(--ink);border:0;padding:0 16px}
.seg [aria-pressed=true]{background:var(--pc);color:var(--ink)}
/* inner-page app bar */
.bar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:var(--s2);padding:8px 8px 8px 8px;min-height:64px;background:var(--bg);border-bottom:0}
.bar h1{flex:1;font-size:1.25rem;font-weight:500;padding-left:var(--s2)}.bar-actions{display:flex;gap:var(--s1)}
.icon-btn{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;color:var(--ink);text-decoration:none;flex:none}.icon-btn:hover{background:var(--tonal)}
.page{max-width:640px;margin:0 auto;padding:0 16px}.page h2{font-size:1.125rem;margin:24px 0 4px}
.rows li{background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:12px 0}.rows li.done{border-color:var(--line)}.rows li.done span::before{content:"";}
.rows a{color:var(--ink);text-decoration:none}
.row-link{display:flex;align-items:center;gap:var(--s3);min-height:56px;padding:0 4px;color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}.row-link .ic{margin-left:auto;color:var(--muted)}
/* store listing page */
.listing{max-width:640px;margin:0 auto;padding:0 16px}
.hero{display:block;width:100%;height:auto;aspect-ratio:16/9;border-radius:var(--r);object-fit:cover;background:#1b2540}
.listing-head{display:flex;gap:var(--s4);align-items:center;margin:16px 0 8px}.listing-head img{width:72px;height:72px;border-radius:18px;object-fit:cover;flex:none;box-shadow:var(--shadow)}
.listing-head h1{margin:0;font-size:1.5rem;line-height:1.2;white-space:normal}.listing-head p{margin:2px 0 0;color:var(--primary-ink);font-weight:500;font-size:.875rem}
.statsrow{display:flex;margin:12px 0 16px;padding:8px 0}.stat{flex:1;text-align:center;display:grid;gap:2px;border-left:1px solid var(--line)}.stat:first-child{border-left:0}.stat b{font-size:1rem;font-weight:500}.stat span{font-size:.75rem;color:var(--muted)}
.play-main{width:100%;min-height:48px;font-size:1rem}
.listing h2{font-size:1.125rem;margin:28px 0 8px}.modes{display:grid;gap:8px}
.modes .btn{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;min-height:52px;border-radius:var(--r-sm);background:var(--tonal);color:var(--ink);border:0;font-weight:400;font-size:.9375rem}
.modes .btn::after{content:"";width:24px;height:24px;flex:none;background:var(--muted);-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%205l7%207-7%207'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%205l7%207-7%207'/%3E%3C/svg%3E") center/contain no-repeat}
.modes .btn[aria-pressed=true]{background:var(--pc)}.modes .btn[aria-pressed]::after{display:none}
.opponent{color:var(--muted);font-size:.8125rem;margin:8px 0 0}
.howto{background:transparent;border:0;border-radius:0;padding:0}.howto summary{font-size:1.125rem;font-weight:500;padding:8px 0;min-height:44px}
details.howto{background:var(--tonal);border-radius:var(--r);padding:8px 16px}section.howto h2{margin-top:28px}
.result{border-radius:28px 28px 0 0;background:var(--tonal);border:0;box-shadow:var(--shadow-lg)}
/* bottom navigation (side rail on desktop) */
.bnav{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;justify-content:space-around;background:var(--tonal);padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
.bnav-item{flex:1;max-width:120px;display:grid;justify-items:center;gap:4px;min-height:56px;padding-top:4px;color:var(--muted);text-decoration:none;font:500 .75rem var(--font)}
.ic-wrap{display:grid;place-items:center;width:64px;height:32px;border-radius:16px}
.bnav-item[aria-current=page]{color:var(--ink)}.bnav-item[aria-current=page] .ic-wrap{background:var(--pc)}
.with-nav{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
@media(min-width:900px){.bnav{top:0;bottom:0;right:auto;width:96px;flex-direction:column;justify-content:flex-start;gap:8px;padding:24px 8px}.bnav-item{flex:none;max-width:none}
#app:has(> .bnav){padding-left:96px}.with-nav{padding-bottom:32px}}
.tier{display:flex;align-items:center;gap:var(--s3);margin:8px 0}.tier-label{width:78px;flex:none;font-size:.8125rem;color:var(--muted)}.tiles{display:flex;gap:var(--s2);flex-wrap:wrap}
.tile{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;background:var(--tonal);color:var(--ink);text-decoration:none;font-weight:500}.tile.done{background:var(--pc)}.tile .ic{width:22px;height:22px}
/* ---- Ludo: classic cross board ---- */
.ludo-board{position:relative;width:min(94vw,62vh,480px);aspect-ratio:1;background:#fff;border:0;border-radius:12px;box-shadow:var(--shadow);overflow:hidden;transition:transform .3s}
.lyard,.lyard-in,.lcell,.ltri,.lslot{position:absolute;box-sizing:border-box}
.lyard-in{background:#fff;border-radius:10%}.lslot{width:9.4%;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);background:#fff;border:2px solid;opacity:.9}
.lcell{background:#fff;border:1px solid rgba(0,0,0,.3)}.lcell.star{display:grid;place-items:center;color:#7d828b;font-size:clamp(8px,3vw,15px);line-height:1}
.ludo-token{width:5.3%;border:2px solid #fff;color:#fff;font:700 clamp(8px,2.6vw,12px)/1 var(--font);display:grid;place-items:center;padding:0;background-image:radial-gradient(circle at 35% 30%,rgba(255,255,255,.55),rgba(255,255,255,0) 55%);box-shadow:0 0 0 1.5px rgba(0,0,0,.6),0 2px 4px rgba(0,0,0,.35);text-shadow:0 0 2px rgba(0,0,0,.6);transition:left .12s linear,top .12s linear;z-index:1}
.ludo-token.can{z-index:3;outline:3px solid var(--ink);outline-offset:2px;animation:pulse 1s ease-in-out infinite}.ludo-token.can::after{inset:-13px}
@keyframes pulse{50%{transform:translate(-50%,-50%) scale(1.18)}}
.ludo-players{display:flex;gap:var(--s2);flex-wrap:wrap;justify-content:center;margin:var(--s2) 0}
.ludo-chip{display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:16px;background:var(--tonal);font-size:.8125rem}.ludo-chip.active{background:var(--pc);box-shadow:inset 0 0 0 2px var(--primary)}
.ludo-chip .dot{width:12px;height:12px;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.25)}.ludo-chip b{font-weight:500;color:var(--ink)}
.ludo-controls{display:flex;align-items:center;justify-content:center;gap:var(--s4);margin-top:var(--s4)}.ludo-tip{margin:0;color:var(--muted);font-size:.875rem;max-width:200px}
.ludo-die{display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);width:64px;height:64px;min-width:0;margin:0;padding:10px;box-sizing:border-box;border:0;border-radius:16px;background:#fff;box-shadow:var(--shadow-lg),inset 0 0 0 1px var(--line);cursor:pointer}
.ludo-die:disabled{opacity:1;cursor:default}.ludo-die:not(:disabled){outline:3px solid var(--primary);outline-offset:3px}.ludo-die[hidden]{display:none}
.ludo-die .pip{width:11px;height:11px;border-radius:50%;background:#1f1f1f;justify-self:center;align-self:center;opacity:0}.ludo-die .pip.on{opacity:1}
.ludo-die.rolling{animation:tumble .45s ease-in-out}@keyframes tumble{50%{transform:rotate(180deg) scale(1.15)}100%{transform:rotate(360deg)}}
/* ---- Carom: scoreboard and power meter ---- */
.crm-canvas{border-radius:14px;box-shadow:var(--shadow-lg)}
.crm-hud{display:flex;gap:var(--s2);justify-content:center;flex-wrap:wrap;margin:var(--s2) 0}
.crm-hud[hidden]{display:none}.crm-chip{display:flex;align-items:center;gap:8px;padding:6px 12px;border-radius:16px;background:var(--tonal);font-size:.8125rem}.crm-chip.active{background:var(--pc);box-shadow:inset 0 0 0 2px var(--primary)}
.cico{width:16px;height:16px;border-radius:50%;box-shadow:inset 0 0 0 1.5px rgba(0,0,0,.35)}.cico.w,.cdot.w{background:#f4efe2}.cico.b,.cdot.b{background:#1d1d1f}
.cdots{display:flex;gap:2px}.cdot{width:6px;height:6px;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,.3)}.cdot.gone{opacity:.15}.crm-chip b{font-weight:500}
.crm-meter{width:min(92vw,62vh,520px);height:10px;border-radius:5px;background:var(--tonal);margin:12px auto 0;overflow:hidden}.crm-meter i{display:block;height:100%;width:60%;background:var(--primary);border-radius:5px}
.cdot.w{background:#f4efe2;box-shadow:0 0 0 1.5px #8a7f66}.cico.w{box-shadow:inset 0 0 0 1.5px #8a7f66}
