/* poki.db: a dense catalog browser. Colours and type come from the dashboard's base.css tokens. */
[hidden] { display: none !important; }
html { scroll-padding-top: 70px; }
body { margin: 0; }
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: max(10px, env(safe-area-inset-top, 0px)) max(16px, calc((100% - 1568px) / 2)) 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.logo { font: 800 20px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo b { color: var(--accent); font-weight: 800; }
#nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 auto; }
#nav a { font: 500 14px/1 var(--body); color: var(--ink-2); text-decoration: none; padding: 9px 9px; border-radius: 8px; white-space: nowrap; }
#nav a:hover { background: var(--chip); }
#nav a[aria-current] { background: var(--ink); color: var(--bg); }
#nav small { font: 500 11px var(--mono); opacity: 0.8; }
#find input, .f input, .f select { font: inherit; font-size: 14px; padding: 8px 11px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); min-width: 0; }
#find input { width: 150px; max-width: 100%; }
.cab { font: 600 13px/1 var(--body); color: var(--surface); background: var(--cobalt); text-decoration: none; padding: 10px 14px; border-radius: 999px; white-space: nowrap; }
.cab:hover { filter: brightness(1.1); }
.acts .cab { padding: 13px 18px; }
.wrap { max-width: 1600px; margin: 0 auto; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 14px; }
.foot { color: var(--muted); font-size: 12.5px; padding-bottom: 50px; gap: 4px; }
.foot p { max-width: 90ch; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tile-value { font-size: 24px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 14px; align-items: start; }
.panel.wide { grid-column: 1 / -1; }
.panel.head { flex-direction: row; gap: 18px; align-items: flex-start; }
.panel.head h1 { font-size: clamp(22px, 3.6vw, 30px); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel.head > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.big { width: 96px; height: 96px; border-radius: 20px; background: var(--chip); flex: none; object-fit: cover; }
.by { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipl { font: 500 12px/1.4 var(--body); padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.chipl:hover { background: var(--track); color: var(--ink); }
.more { align-self: flex-start; font-size: 13.5px; }
table.db { font-size: 13.5px; }
table.db th { position: relative; white-space: nowrap; vertical-align: bottom; }
table.db th button { all: unset; cursor: pointer; color: inherit; font: inherit; }
table.db th button:hover, table.db th.sorted { color: var(--ink); }
table.db th.num, table.db td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.db td { padding: 6px 12px 6px 0; vertical-align: middle; }
table.db td:last-child, table.db th:last-child { padding-right: 0; }
table.db tbody tr:hover { background: var(--inset); }
table.db td small, .tile small { color: var(--muted); font-weight: 400; }
td.none { text-align: left !important; color: var(--muted); padding: 18px 0; }
.gm { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; text-decoration: none; color: var(--ink); min-width: 170px; max-width: 320px; text-align: left; }
.gm img { width: 36px; height: 36px; border-radius: 9px; background: var(--chip); object-fit: cover; }
.gm b { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm:hover b { text-decoration: underline; }
div.gm > a { display: block; line-height: 0; }
.gm a.gm-title { color: var(--ink); text-decoration: none; display: block; min-width: 0; }
.gm a.gm-title:hover b { text-decoration: underline; }
.gm .dev-link, .by .dev-link { color: inherit; text-decoration: none; }
.gm .dev-link:hover, .gm .dev-link:focus-visible, .by .dev-link:hover, .tile .dev-link:hover { text-decoration: underline; color: var(--ink); }
.gm i { font: 500 10.5px/1 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 5px; border-radius: 4px; vertical-align: 1px; }
.gm i.hit { background: var(--good-soft); color: var(--good); }
.gm i.me { background: var(--warn-soft); color: var(--warn); }
.gm i.tst { background: var(--chip); color: var(--cobalt); }
.tile-sub a { color: inherit; }
.up { color: var(--good); font-weight: 500; }
.na { color: var(--muted); }
.bar { display: inline-block; width: 54px; height: 6px; border-radius: 3px; background: var(--track); position: relative; vertical-align: middle; margin-left: 8px; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--s1); }
.bar.good i { background: var(--s3); } .bar.bad i { background: var(--s2); }
.lk { white-space: nowrap; }
/* the favorite star: the box of an icon button (.xbtn), so it lines up with them; always at the right of a row or a header */
.star { all: unset; box-sizing: border-box; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 17px; line-height: 1; color: var(--muted); vertical-align: middle; }
.star.on { color: var(--warn); }
.star:hover { background: var(--line); color: var(--ink); } .star.on:hover { color: var(--warn); }
.star:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 1px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.f.grow { flex: 1 1 220px; }
.f input[type="number"] { width: 130px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text { font: 11px var(--body); fill: var(--muted); }
svg.chart text.lab { fill: var(--ink); font-weight: 500; }
svg.chart text.q { font-size: 10.5px; fill: var(--muted); opacity: 0.85; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; } svg.chart .grid.dash { stroke-dasharray: 4 4; stroke: var(--axis); }
svg.chart .axis { stroke: var(--axis); stroke-width: 1; }
svg.chart .b1 { fill: var(--s1); } svg.chart .b3 { fill: var(--s3); }
svg.chart .dot { fill: var(--s1); fill-opacity: 0.55; stroke: var(--surface); stroke-width: 2; }
svg.chart a:hover .dot { fill-opacity: 0.95; }
svg.chart .line { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; }
svg.chart .pt { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }
.sw.b1 { background: var(--s1); } .sw.b3 { background: var(--s3); }
.row .bar { width: auto; height: 12px; margin: 0; display: block; border-radius: 4px; }
.row .bar i { border-radius: 4px; }
.sub h4 small { color: var(--muted); font-weight: 400; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
@media (max-width: 700px) { .panel.head { flex-direction: column; } #find { flex: 1 1 100%; } #find input { width: 100%; } }

/* the cabinet section: the dashboard layout under the portal's sticky header */
.cab[aria-current] { background: var(--ink); color: var(--bg); }
.cabv { max-width: none; margin: 0; }
.cabv .side { top: 58px; max-height: calc(100vh - 58px); padding: 4px 12px 22px 0; }
.cabv .main { padding: 0 0 40px 12px; }
.cabv .tiles { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.cabv .tile-value { font-size: 28px; }
.panel.note { max-width: 640px; margin: 8vh auto 0; gap: 14px; }
.note .open { border: 0; cursor: pointer; }
.navb .st .spin { width: 9px; height: 9px; }
.stages { display: flex; flex-wrap: wrap; gap: 8px; }
.stages .ghost span { color: var(--muted); text-transform: none; letter-spacing: 0; margin-left: 4px; }
.stage { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 2px solid var(--ink); margin-top: 10px; scroll-margin-top: 70px; }
.stage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.stage-head h2 { font: 800 22px/1.15 var(--display); }
@media (max-width: 860px) { .cabv .side { padding: 0 0 4px; max-height: none; } .cabv .main { padding: 0 0 40px; } }
/* Poki's own order */
.dn { color: var(--crit); font-weight: 500; }
.shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 18px; }
.shelf h4 { margin: 0 0 6px; font: 700 14px var(--body); } .shelf h4 small { color: var(--muted); font-weight: 400; }
.shelf ol { margin: 0; padding-left: 1.6em; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.shelf a { color: var(--ink); text-decoration: none; } .shelf a:hover { text-decoration: underline; }
.panel h3 { margin-top: 4px; }

.game-cell.owned { border-left: 3px solid var(--accent, #635bff); padding-left: 10px; }
.owned-link { display: inline-flex; margin: 5px 0 0 44px; padding: 2px 7px; border-radius: 5px; background: #e8e5ff; color: #403493; font-size: 11px; font-weight: 700; text-decoration: none; }
.owned-link:hover, .owned-link:focus-visible { background: #d7d1ff; text-decoration: underline; }
.game-link.owned > a:first-child { font-weight: 700; color: #403493; }
.game-link .owned-link { margin: 0 0 0 5px; }
.collection-errors { overflow-wrap: anywhere; }
.collection-errors li { margin: 6px 0; }

.tile .dev-link { color: inherit; text-decoration: none; }
.tag { display: inline-block; font: 500 10.5px/1 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 6px; border-radius: 4px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.tag.tst { color: var(--cobalt); }
.tag.ok { background: var(--good-soft); color: var(--good-ink); } /* RELEASED: green like the header pill; --good-ink keeps 4.5:1 on the soft green */

/* screenshots from the public Poki page */
.shot-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.shot-strip figure { margin: 0; flex: 0 0 auto; width: min(320px, 78vw); display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; }
.shot-strip a { display: block; border-radius: 10px; overflow: hidden; background: rgba(127, 127, 127, 0.12); }
.shot-strip img { display: block; width: 100%; height: 180px; object-fit: cover; }
.shot-strip figcaption { font-size: 13px; line-height: 1.35; opacity: 0.8; }
