/* Emkay's look (ovos-visage's colours): near-black, white type, the Mark II blue. */
:root {
  --bg: #05070a; --card: #10161e; --card-hi: #16202b; --line: #1f2a37;
  --fg: #ffffff; --muted: #8a96a8; --accent: #1e9bff; --accent-dim: #0f4c80;
  --accent-soft: rgba(30, 155, 255, 0.16);
  --ok: #3ddc84; --bad: #ff5c5c; --warn: #ffc93c;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); }
a { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px; background: rgba(5, 7, 10, .92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none;
  font-size: 20px; font-weight: 600; letter-spacing: .02em; margin-right: auto; }
.brand .eyes { width: 54px; height: 32px; }
.lang select { background: var(--card); color: var(--fg); border: 1px solid var(--line);
  border-radius: 18px; padding: 7px 10px; font: inherit; font-size: 14px; }
.open-emkay { background: var(--accent); color: #fff; text-decoration: none; padding: 8px 14px;
  border-radius: 18px; font-size: 14px; white-space: nowrap; }

main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; }
.tagline { color: var(--muted); font-size: 17px; line-height: 1.45; margin: 4px 0 18px; max-width: 46em; }
.search input { width: 100%; font: inherit; font-size: 17px; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 26px; padding: 13px 20px; outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.cats { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 6px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; font: inherit; font-size: 14px; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 8px 14px; cursor: pointer; }
.cats button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.cats .n { color: var(--muted); margin-left: 4px; font-size: 12px; }
.cats button[aria-pressed="true"] .n { color: #d7ecff; }

.filters { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; color: var(--muted);
  font-size: 14px; padding: 8px 2px 14px; }
.filters input { accent-color: var(--accent); }
.count { margin-left: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-align: left; color: inherit;
  font: inherit; transition: background .15s, transform .15s, border-color .15s; }
.card:hover, .card:focus-visible { background: var(--card-hi); border-color: var(--accent-dim); transform: translateY(-2px); outline: none; }
.card .head { display: flex; gap: 12px; align-items: center; }
.icon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--accent-soft);
  display: grid; place-items: center; overflow: hidden; color: var(--accent); font-weight: 700; font-size: 18px; }
.icon img { width: 30px; height: 30px; object-fit: contain; }
.card h3 { margin: 0; font-size: 16px; line-height: 1.25; }
.card .by { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card p { margin: 0; color: #c7d0dc; font-size: 14px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .say { color: var(--accent); font-size: 13px; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { font-size: 12px; border-radius: 10px; padding: 3px 8px; background: #1a2430; color: var(--muted); }
.tag.builtin { background: rgba(30, 155, 255, .18); color: #9fd2ff; }
.tag.works { background: rgba(61, 220, 132, .15); color: var(--ok); }
.tag.untested { background: #1a2430; color: var(--muted); }
.tag.broken { background: rgba(255, 92, 92, .14); color: var(--bad); }
.tag.lang-miss { color: var(--warn); }
.empty { color: var(--muted); padding: 40px 0; text-align: center; grid-column: 1 / -1; }

.detail { width: min(640px, 94vw); max-height: 88vh; background: var(--card); color: var(--fg);
  border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.detail::backdrop { background: rgba(0, 0, 0, .7); }
.detail .x { position: absolute; right: 12px; top: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #1f2a37; color: #fff; font-size: 22px; cursor: pointer; }
.detail h2 { margin: 0 40px 4px 0; font-size: 22px; }
.detail .by { color: var(--muted); font-size: 13px; }
.detail .desc { color: #d3dbe6; line-height: 1.5; }
.detail h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.detail ul.say { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.detail ul.say li { background: var(--accent-soft); border-radius: 14px; padding: 8px 12px; color: #d7ecff; }
.detail ul.say li::before { content: "“"; } .detail ul.say li::after { content: "”"; }
.detail .why { color: var(--bad); font-size: 14px; }
.detail .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
.btn { font: inherit; font-size: 15px; border: 0; border-radius: 20px; padding: 10px 18px; cursor: pointer;
  text-decoration: none; display: inline-block; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: #1f2a37; color: #fff; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.meta { color: var(--muted); font-size: 13px; }

.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 10px 16px 30px; }
@media (max-width: 520px) {
  .brand span { display: none; }
  .tagline { font-size: 15px; }
}

/* ---------------------------------------------------------------- shop window */
[hidden] { display: none !important; }
.shelf-title { font-size: 22px; margin: 26px 0 12px; letter-spacing: -.01em; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; }
.link { background: none; border: 0; color: var(--accent); font: inherit; font-size: 15px; cursor: pointer; }

/* featured: big gradient cards in a row that scrolls sideways, as an app store's "Today" */
.heroes { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 420px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.heroes::-webkit-scrollbar { display: none; }
.hero { scroll-snap-align: start; border-radius: 26px; padding: 22px; min-height: 250px; display: flex;
  flex-direction: column; gap: 8px; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transition: transform .2s; position: relative; overflow: hidden; }
.hero:hover, .hero:focus-visible { transform: scale(1.015); outline: none; }
.hero .kicker { text-transform: uppercase; font-size: 12px; letter-spacing: .1em; color: rgba(255, 255, 255, .75); font-weight: 600; }
.hero h2 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.hero p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 15px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero .say { color: #fff; opacity: .85; font-style: italic; font-size: 14px; }
.hero-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.hero .pill { background: rgba(255, 255, 255, .92); color: #0b1a2a; }
.hero .pill.done { background: rgba(255, 255, 255, .22); color: #fff; }

/* shelves: three columns of compact rows on a wide screen, one on a phone */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 22px; }
.tile { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line);
  cursor: pointer; min-width: 0; }
.tile:hover h3, .tile:focus-visible h3 { color: var(--accent); }
.tile:focus-visible { outline: none; }
.tile .title, .card .title { flex: 1; min-width: 0; }
.tile h3 { margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .by { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* the Get pill */
.pill { flex: none; background: #1f2a37; color: var(--accent); font-weight: 700; font-size: 14px;
  text-decoration: none; border-radius: 16px; padding: 6px 16px; text-transform: uppercase; letter-spacing: .03em; }
.pill:hover { background: var(--accent); color: #fff; }
.pill.done { background: transparent; color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; padding: 6px 4px; }

/* icons as app icons: a rounded tile; pictures on a light tile, initials on the category's colour */
.icon { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; color: #fff; }
.icon.big { width: 72px; height: 72px; border-radius: 18px; font-size: 32px; }
.icon.img { background: linear-gradient(160deg, #f4f7fb, #d9e2ec); }
.icon.img img { width: 66%; height: 66%; }
.icon.cat-reading { background: linear-gradient(160deg, #8e5cf7, #5a2fc2); }
.icon.cat-music { background: linear-gradient(160deg, #ff5e7e, #c2185b); }
.icon.cat-home { background: linear-gradient(160deg, #2bc0e4, #1e78c8); }
.icon.cat-learning { background: linear-gradient(160deg, #f7b733, #e3772a); }
.icon.cat-productivity { background: linear-gradient(160deg, #3ddc84, #139a5a); }
.icon.cat-information { background: linear-gradient(160deg, #1e9bff, #0f4c80); }
.icon.cat-fun { background: linear-gradient(160deg, #ff8a5c, #e2463f); }
.icon.cat-tools { background: linear-gradient(160deg, #8a96a8, #4b5768); }
.icon.cat-other { background: linear-gradient(160deg, #5b6b7c, #2c3540); }
.icon.img.cat-reading, .icon.img.cat-music, .icon.img.cat-home, .icon.img.cat-learning, .icon.img.cat-productivity,
.icon.img.cat-information, .icon.img.cat-fun, .icon.img.cat-tools, .icon.img.cat-other { background: linear-gradient(160deg, #f4f7fb, #d9e2ec); }

/* detail: an app page */
.dhead { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.dhead h2 { margin: 0 40px 2px 0; }
.dget { margin-top: 10px; }
.detail .tags { margin: 6px 0 4px; }
.card .head .pill { align-self: center; }
