/* The streaming-style home (shell/home.js): full width, a hero carousel, shelves of cards that scroll sideways.
   Everything here is scoped to the home (.shome, .who), the game card (dialog.gsheet), the preview (#peek) and the
   player menu (#pmenu), so the other pages keep shell.css alone. */
html.pkt-wide { --gut: clamp(16px, 4vw, 48px); }
html.pkt-wide #app { max-width: none; padding: 0 0 calc(28px + var(--pkt-ad-bottom)); }
html.pkt-wide .top { margin: 0; padding-left: var(--gut); padding-right: var(--gut); }
html.pkt-who .top { display: none; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hsearch { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.25); width: min(260px, 34vw); min-width: 0; }
.hsearch:focus-within { border-color: var(--accent); }
.hsearch input { flex: 1; min-width: 0; background: none; border: 0; outline: none; height: 100%; }
.hsearch input::placeholder { color: var(--faint); }
.me { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 5px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: .875rem; max-width: 34vw; }
.me .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .pic, #pmenu .pic { width: 34px; height: 34px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: color-mix(in srgb, var(--ac, var(--accent)) 45%, #18214a); }
@media (max-width: 620px) { html.pkt-wide .brand-name, .me .nm { display: none; } .me { padding: 0 5px; } }
@media (max-width: 380px) { html.pkt-wide #settings-btn { display: none; } }
#pmenu { position: fixed; right: var(--gut, 16px); top: 64px; z-index: 30; width: 270px; max-height: calc(100vh - 80px); overflow: auto; padding: 8px; border-radius: 20px; background: #18214a; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 2px; }
#pmenu [role=menuitem] { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px; border-radius: 12px; border: 0; background: none; text-align: left; font-weight: 600; text-decoration: none; }
#pmenu [role=menuitem]:hover, #pmenu [role=menuitem]:focus-visible { background: rgba(255,255,255,.09); }
#pmenu [aria-current="true"] { background: color-mix(in srgb, var(--accent) 20%, transparent); }
#pmenu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }

/* Who is playing? */
.who { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 40px var(--gut); text-align: center; }
.who-in { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.who h1 { font-size: clamp(1.75rem, 5vw, 3rem); text-wrap: balance; }
.who .brand.big .brand-name { display: inline; }
.faces { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 3vw, 28px); max-width: 900px; }
.face { width: clamp(104px, 26vw, 150px); background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; }
.face .pic { width: 100%; aspect-ratio: 1; border-radius: 28px; display: grid; place-items: center; font-size: clamp(3rem, 11vw, 4.6rem); line-height: 1; background: linear-gradient(140deg, var(--ac), color-mix(in srgb, var(--ac) 40%, #18214a)); border: 3px solid transparent; transition: transform .15s, border-color .15s; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.face:hover .pic, .face:focus-visible .pic { transform: scale(1.06); border-color: #fff; }
.face:focus-visible { outline: none; }
.face b { font-size: 1rem; overflow-wrap: anywhere; }
.face small { color: var(--faint); font-size: .8125rem; margin-top: -8px; }
.face.add .pic { background: rgba(255,255,255,.07); border: 2px dashed var(--line); font-size: 3rem; color: var(--soft); box-shadow: none; }
.plain-btn { display: inline-grid; place-items: center; min-height: 44px; padding: 0 22px; border-radius: 14px; border: 1px solid rgba(255,255,255,.4); background: none; font-weight: 700; text-decoration: none; }

/* Kinds */
.shome .kinds { display: flex; gap: 8px; overflow-x: auto; padding: 12px var(--gut) 4px; scrollbar-width: none; }
.shome .kinds::-webkit-scrollbar, .shome .track::-webkit-scrollbar, .shome .heroes::-webkit-scrollbar { display: none; }
.shome .kind { flex: none; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: .875rem; white-space: nowrap; }
.shome .kind[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #06201c; }
.shome .hello { margin: 12px var(--gut) 0; }
.shome .quick { margin: 14px var(--gut) 0; overflow-x: auto; scrollbar-width: none; }
.shome .quick-btn { flex: 1 0 auto; }
.shome .foot { padding: 0 var(--gut); }

/* Hero */
.hero-wrap { position: relative; margin-top: 12px; }
.heroes { position: relative; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gut); scroll-padding: 0 var(--gut); scrollbar-width: none; overscroll-behavior-x: contain; }
.hero { position: relative; flex: none; scroll-snap-align: start; scroll-snap-stop: always; border-radius: 28px; overflow: hidden; background: #0d1430; border: 1px solid var(--line); aspect-ratio: 16 / 7; min-height: 300px; max-height: 62vh; width: 100%; }
.hero > img, .hero > video, .hero > .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,12,30,.9) 0, rgba(8,12,30,.55) 38%, transparent 70%), linear-gradient(0deg, rgba(8,12,30,.85) 0, transparent 45%); pointer-events: none; }
.hero-text { position: absolute; z-index: 1; left: clamp(16px, 4vw, 44px); bottom: clamp(16px, 4vw, 40px); right: 16px; max-width: 520px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.eyebrow { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: 6px; }
html[lang="hi"] .eyebrow { letter-spacing: 0; }
.eyebrow .icon { width: 16px; height: 16px; }
.hero-h { font-size: clamp(1.9rem, 5.2vw, 3.6rem) !important; line-height: 1.05; margin: 0 !important; text-wrap: balance; text-shadow: 0 3px 14px rgba(0,0,0,.5); }
.hero p { color: var(--soft); font-size: clamp(.9375rem, 1.6vw, 1.125rem); text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact { font-size: .8125rem; font-weight: 700; padding: 3px 9px; border-radius: 9px; background: rgba(255,255,255,.14); white-space: nowrap; }
.fact.age { background: none; border: 1.5px solid rgba(255,255,255,.6); }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.play { min-height: 48px; padding: 0 22px; border-radius: 16px; border: 0; background: linear-gradient(180deg, #ffe680, #ffc21a); color: #3a2400; font-weight: 800; font-family: var(--display); display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 0 #c98f00; text-decoration: none; }
.play:active { transform: translateY(2px); box-shadow: 0 2px 0 #c98f00; }
.play .icon { fill: currentColor; stroke: none; }
.more { min-height: 48px; padding: 0 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,.35); background: rgba(20,28,60,.72); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5); background: rgba(20,28,60,.72); display: inline-grid; place-items: center; padding: 0; }
.round:hover { border-color: #fff; background: rgba(255,255,255,.14); }
.round[aria-pressed="true"] { background: #fff; color: #10172f; border-color: #fff; }
.round.fav[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #3a2400; }
.round.fav[aria-pressed="true"] .icon { fill: currentColor; }
.clip-btn { position: absolute; z-index: 1; right: 14px; top: 14px; }
.hero-arrow { position: absolute; z-index: 2; top: 50%; margin-top: -36px; display: none; }
.hero-arrow.l { left: calc(var(--gut) + 12px); } .hero-arrow.r { right: calc(var(--gut) + 12px); }
@media (hover: hover) and (pointer: fine) and (min-width: 621px) { .hero-text { left: 76px; } }
@media (hover: hover) and (pointer: fine) { .hero-arrow { display: inline-grid; opacity: 0; transition: opacity .15s; } .hero-wrap:hover .hero-arrow, .hero-arrow:focus-visible { opacity: 1; } }
.dots { display: flex; justify-content: center; gap: 2px; margin-top: 8px; }
.dot { width: 32px; height: 28px; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.dot i { display: block; width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.35); transition: width .25s; overflow: hidden; }
.dot[aria-current="true"] i { width: 26px; }
.dot[aria-current="true"] i::after { content: ''; display: block; height: 100%; width: 100%; background: var(--gold); border-radius: 4px; }
.dot[aria-current="true"].run i::after { animation: pkt-fill var(--hero-ms, 6500ms) linear both; }
@keyframes pkt-fill { from { width: 0; } to { width: 100%; } }
@media (max-width: 620px) { .hero { aspect-ratio: 4 / 5; max-height: 70vh; } .hero::after { background: linear-gradient(0deg, rgba(8,12,30,.95) 0, rgba(8,12,30,.5) 45%, transparent 75%); } }

/* Shelves and cards */
.shome .shelf { margin-top: 26px; position: relative; }
.shome .shelf h2 { font-size: clamp(1.0625rem, 2vw, 1.3125rem); margin: 0; padding: 0 var(--gut); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.shome .shelf h2 small { font: 600 .8125rem var(--body); color: var(--faint); margin-left: 0; }
.shome .track { display: flex; gap: 10px; overflow-x: auto; padding: 12px var(--gut) 14px; scroll-snap-type: x proximity; scroll-padding: 0 var(--gut); scrollbar-width: none; }
.gcard { position: relative; flex: none; scroll-snap-align: start; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: #0d1430; text-align: left; box-shadow: 0 6px 16px rgba(0,0,0,.3); transition: transform .15s; color: #fff; }
.gcard.wide { width: clamp(168px, 44vw, 250px); aspect-ratio: 16 / 9; }
.gcard.big { width: clamp(250px, 72vw, 400px); aspect-ratio: 16 / 9; border-radius: 20px; }
.gcard.tall { width: clamp(124px, 31vw, 178px); aspect-ratio: 2 / 3; }
.gcard > img, .gcard > .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art { display: grid; place-items: center; background: linear-gradient(140deg, var(--a), var(--b)); }
.art .e { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.hero > .art .e { font-size: 6rem; }
.gcard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,10,26,.88) 0, rgba(6,10,26,.2) 46%, transparent 62%); }
.gcard .ttl { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 8px; font: 700 1rem/1.15 var(--display); text-shadow: 0 2px 6px rgba(0,0,0,.7); overflow-wrap: anywhere; }
.gcard.big .ttl { font-size: 1.375rem; left: 14px; bottom: 12px; }
.gcard.tall .ttl { font-size: 1.0625rem; bottom: 10px; }
.gcard .sub { display: block; font: 600 .75rem/1.3 var(--body); color: var(--soft); margin-top: 3px; }
.gcard .rank { position: absolute; z-index: 1; left: 0; top: 0; min-width: 40px; height: 44px; padding: 0 10px; display: grid; place-items: center; background: var(--gold); color: #3a2400; font: 800 1.375rem/1 var(--display); border-radius: 0 0 16px 0; }
.gcard .trend { position: absolute; z-index: 1; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--gold); color: #3a2400; font: 800 .8125rem/1 var(--display); }
.gcard .trend .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.gcard .mark { position: absolute; z-index: 1; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,15,30,.78); }
.gcard .mark.done { background: #22c55e; color: #052e14; right: 40px; }
.gcard .mark.done:last-of-type { right: 8px; }
.gcard .mark .icon { width: 15px; height: 15px; }
.gcard .mark.done .icon { stroke-width: 3; }
.gcard .bar { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); }
.gcard .bar i { display: block; height: 100%; background: var(--gold); }
.gcard.no > img { filter: grayscale(1) brightness(.6); }
.gcard.locked > img { filter: saturate(.5) brightness(.55); }
@media (hover: hover) { .gcard:hover { transform: translateY(-3px); } }
.gcard:active { transform: scale(.97); }
html[data-band="little"] .gcard.wide { width: clamp(190px, 52vw, 280px); }
.shome .nudge { position: absolute; z-index: 5; top: 44px; bottom: 14px; width: calc(var(--gut) - 4px); min-width: 36px; border: 0; background: rgba(10,15,30,.72); display: none; place-items: center; padding: 0; opacity: 0; transition: opacity .15s; }
.shome .nudge.l { left: 0; border-radius: 0 12px 12px 0; } .shome .nudge.r { right: 0; border-radius: 12px 0 0 12px; }
@media (hover: hover) and (pointer: fine) { .shome .nudge { display: grid; } .shome .shelf:hover .nudge { opacity: 1; } }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(168px, 42vw), 1fr)); gap: 10px; padding: 12px var(--gut); }
.ggrid .gcard { width: auto; aspect-ratio: 16 / 9; }
.shome .empty { padding: 28px var(--gut); color: var(--soft); }

/* Ads on the home (shell/ads.js draws them): a sponsored card is a wide card; bands sit between the shelves. */
.shome .track .pkt-ad-card { flex: none; scroll-snap-align: start; width: clamp(168px, 44vw, 250px); aspect-ratio: 16 / 9; min-height: 0; border-radius: 16px; }
.shome .ggrid .pkt-ad-card { aspect-ratio: 16 / 9; min-height: 0; border-radius: 16px; }
.shome > #rows > .pkt-ad-band { width: calc(100% - 2 * var(--gut)); margin: 26px auto 0; }
@media (max-width: 560px) { .shome > #rows > .pkt-ad-band { width: 320px; max-width: calc(100% - 32px); } }
.gsheet .sheet-ad { padding: 0 22px 22px; }

/* Hover preview */
#peek { position: fixed; z-index: 40; border-radius: 18px; overflow: hidden; background: #18214a; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.6); animation: pkt-pop .16s ease-out; }
@keyframes pkt-pop { from { transform: scale(.9); opacity: 0; } }
#peek .media, .gsheet .media { position: relative; aspect-ratio: 16 / 9; background: #0d1430; }
#peek video, #peek img, .gsheet .media video, .gsheet .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#peek .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 9px; }
#peek h3 { font: 700 1.0625rem var(--display); margin: 0; }
#peek p { font-size: .8125rem; color: var(--soft); }
#peek .round { width: 38px; height: 38px; }
#peek .play { min-height: 40px; padding: 0 16px; box-shadow: 0 3px 0 #c98f00; }

/* The game card */
dialog.gsheet { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 26px; background: #18214a; color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.6); overflow: auto; }
dialog.gsheet::backdrop { background: rgba(5,8,20,.72); }
.gsheet .media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #18214a 0, transparent 40%); pointer-events: none; }
.gsheet .x { position: absolute; z-index: 2; right: 12px; top: 12px; }
.gsheet .head { position: relative; z-index: 1; margin-top: -64px; padding: 0 22px; display: flex; flex-direction: column; gap: 12px; }
.gsheet h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.1; margin: 0; text-shadow: 0 3px 12px rgba(0,0,0,.5); }
.gsheet .text { padding: 16px 22px 0; display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.gsheet .text p { color: var(--soft); }
.gsheet dl { margin: 0; font-size: .875rem; display: grid; gap: 6px; }
.gsheet dt { color: var(--faint); display: inline; } .gsheet dd { display: inline; margin: 0; font-weight: 600; }
.gsheet h3 { padding: 22px 22px 0; margin: 0; font: 700 1.125rem var(--display); }
.gsheet .ggrid { padding: 12px 22px 22px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gsheet .said { font-size: .875rem; color: var(--gold); min-height: 1.3em; }
@media (max-width: 560px) { .gsheet .text { grid-template-columns: 1fr; } .gsheet .ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px 18px; } }

html.pkt-calm .gcard, html.pkt-calm .face .pic, html.pkt-calm .dot i { transition: none; }
@media (prefers-reduced-motion: reduce) { .gcard, .face .pic, .dot i, #peek { transition: none !important; animation: none !important; } .dot[aria-current="true"].run i::after { animation: none !important; } }
.who .brand.big .brand-mark { width: 64px; height: 64px; border-radius: 16px; }
