/* ==========================================================================
   Pages: home, listings, game page, profile, auth, static pages
   ========================================================================== */

.home { padding-top: 20px; }
.block { margin: 34px 0; }

/* Smaller secondary home grid: Recently played / rows remain the larger cards. */
.more-games-block { margin-top: 28px; }
.more-games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px 12px; }
.more-games-grid .card-title { font-size: 13.5px; }
.more-games-grid .card-meta { font-size: 12px; }
.listing { padding-top: 24px; }
.listing.narrow { max-width: 820px; }

/* ----- page header ---------------------------------------------------------------------- */
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.page-head p { margin-top: 4px; color: var(--text-2); max-width: 720px; }
.page-head .count { margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.profile-head { gap: 20px; }

/* ----- featured carousel ---------------------------------------------------------------- */
.featured { position: relative; margin-bottom: 8px; }
.featured-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--surface); outline-offset: 3px;
}
.featured-track::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 21 / 9; min-height: 260px; max-height: 470px; overflow: hidden; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.slide-video {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%;
  opacity: 0; transition: opacity .2s ease; background: #000;
}
.slide.is-video-playing .slide-video { opacity: 1; }
.slide-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(8 9 11 / .88) 0%, rgb(8 9 11 / .55) 38%, rgb(8 9 11 / 0) 68%), linear-gradient(0deg, rgb(8 9 11 / .55), rgb(8 9 11 / 0) 45%); }
.slide-copy { position: absolute; left: clamp(20px, 3.4vw, 44px); bottom: clamp(20px, 3.4vw, 40px); max-width: min(520px, 78%); display: grid; gap: 10px; justify-items: start; }
.slide-tags { display: flex; gap: 8px; align-items: center; }
.slide-copy h2 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 850; line-height: 1.08; letter-spacing: -.02em; text-shadow: 0 2px 14px rgb(0 0 0 / .5); }
.slide-copy p { color: #dfe2e8; font-size: clamp(14px, 1.3vw, 16.5px); text-shadow: 0 1px 8px rgb(0 0 0 / .6); }
.slide-copy .btn { margin-top: 4px; }
.featured-nav { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: rgb(12 13 15 / .7); backdrop-filter: blur(6px); }
.featured-nav .icon-btn { width: 32px; height: 32px; color: #fff; }
.dots { display: flex; gap: 6px; padding: 0 4px; }
.dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .35); transition: background .15s, width .15s; }
.dot.is-active { width: 22px; border-radius: 4px; background: var(--accent); }

/* ----- category cards ------------------------------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat-grid-lg { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cat-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0; background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--tint, var(--accent)); border-radius: var(--r); transition: background .12s, border-color .12s;
}
.cat-card:hover { background: var(--surface-2); border-color: var(--border-2); border-left-color: var(--tint, var(--accent)); }
.cat-card.is-empty .cat-icon { filter: grayscale(1); }
.cat-card.is-empty { border-left-color: var(--border-2); }
.cat-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; color: var(--tint, var(--accent)); background: color-mix(in srgb, var(--tint, var(--accent)) 16%, transparent); }
.cat-icon-lg { width: 56px; height: 56px; border-radius: 14px; }
.cat-icon-lg .icon { width: 28px; height: 28px; }
.cat-text { display: grid; min-width: 0; }
.cat-text strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-text small { color: var(--text-3); font-size: 12.5px; }

/* ----- game page ------------------------------------------------------------------------ */
.game-page { padding-top: 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--text-3); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text-2); }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.game-main { min-width: 0; }

.player-stage { display: flex; justify-content: center; background: #07080a; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.player {
  position: relative; background: #000; overflow: hidden; aspect-ratio: var(--ar);
  /* fit the available width AND keep the whole game visible without scrolling: width follows the height budget × aspect ratio */
  width: min(100%, max(320px, calc((100vh - var(--header-h) - 170px) * var(--ar-num))));
  width: min(100%, max(320px, calc((100svh - var(--header-h) - 170px) * var(--ar-num))));
  overscroll-behavior: contain;
}
.player.is-playing { touch-action: none; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; transform-origin: center center; }
.player-cover { position: absolute; inset: 0; display: grid; place-items: center; }
.player-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgb(8 9 11 / .5), rgb(8 9 11 / .82)); }
.cover-ui { position: relative; display: grid; justify-items: center; gap: 14px; padding: 16px; text-align: center; }
.cover-ui h2 { font-size: clamp(20px, 3.2vw, 34px); font-weight: 850; letter-spacing: -.01em; text-shadow: 0 2px 12px rgb(0 0 0 / .6); }
.cover-ui .btn .icon { fill: currentColor; width: 22px; height: 22px; }
.cover-hint { color: #cfd3db; font-size: 13.5px; }
.cover-unavailable { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 8px; background: rgb(12 13 15 / .8); border: 1px solid var(--border-2); }

.player-overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: #050607; }
.player-loading .loading-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: blur(2px); }
.loading-box { position: relative; display: grid; gap: 12px; justify-items: center; width: min(320px, 78%); text-align: center; }
.loading-box strong { font-size: 18px; font-weight: 800; }
.loading-box span { color: var(--text-2); font-size: 13.5px; }
.bar { width: 100%; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 4%; border-radius: 3px; background: linear-gradient(90deg, var(--c-orange), var(--c-pink), var(--c-blue)); transition: width .25s ease; }
.player-error { align-content: center; justify-items: center; gap: 8px; padding: 20px; text-align: center; }
.player-error h2 { font-size: 20px; }
.player-error p { color: var(--text-2); max-width: 380px; }
.player-error .btn-row { justify-content: center; margin-top: 10px; }
.player-exit { position: absolute; z-index: 5; top: max(10px, env(safe-area-inset-top)); right: 10px; display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border: 0; border-radius: 8px; background: rgb(12 13 15 / .8); color: #fff; font-weight: 650; }

/* full-screen: native API, plus a CSS fallback for browsers (iOS Safari) that can't fullscreen a non-video element */
.player:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; }
.player:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; }
.player.is-pseudo-full { position: fixed; inset: 0; z-index: 250; width: 100vw; height: 100dvh; aspect-ratio: auto; border-radius: 0; }
/* Landscape/portrait-only games on a device held the "wrong" way: rotate the whole overlay with CSS instead of the Orientation Lock API, which needs real browser Fullscreen (avoided here for Unity - see player.js). */
.player.is-pseudo-full.force-rotate { inset: auto; top: 50%; left: 50%; width: 100dvh; height: 100vw; transform: translate(-50%, -50%) rotate(90deg); transform-origin: center center; }
@supports (height: 100dvh) { .player:fullscreen { height: 100dvh; } }

.game-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 14px 0 6px; flex-wrap: wrap; }
.game-title { font-size: 26px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.game-sub { margin-top: 3px; color: var(--text-2); font-size: 14px; }
.game-sub a:hover { color: var(--text); text-decoration: underline; }
.game-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.act { padding: 0 14px; }
.act[aria-pressed="true"] { background: color-mix(in srgb, var(--c-orange) 20%, var(--surface-2)); border-color: color-mix(in srgb, var(--c-orange) 60%, transparent); }
.fav-act[aria-pressed="true"] { background: color-mix(in srgb, var(--c-pink) 18%, var(--surface-2)); border-color: color-mix(in srgb, var(--c-pink) 55%, transparent); color: #ffd3ea; }
.fav-act[aria-pressed="true"] .icon { color: var(--c-pink); }

.panel { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.panel h2 { margin-bottom: 10px; }
.panel p { color: #d7dae1; max-width: 76ch; }
.panel p + p { margin-top: 10px; }
.controls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.controls-grid > div { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.controls-grid h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.controls-grid li { padding: 3px 0; color: var(--text); }
.info { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.info > div { padding: 12px 16px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); margin: -1px -1px 0 0; }
.info dt { color: var(--text-3); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.info dd { margin-top: 2px; font-weight: 550; }
.info a { color: var(--c-blue); }
.rows { margin-top: 10px; }

.play-next { position: sticky; top: calc(var(--header-h) + 14px); display: grid; gap: 10px; }
.play-next h2 { font-size: 16px; font-weight: 750; }
.next-item { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: center; padding: 6px; border-radius: var(--r); border: 1px solid transparent; }
.next-item:hover { background: var(--surface); border-color: var(--border); }
.next-item img { width: 128px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; background: var(--surface-2); }
.next-item strong { display: block; font-size: 14px; font-weight: 650; line-height: 1.3; }
.next-item small { color: var(--text-3); font-size: 12.5px; }

/* ----- profile / notifications ------------------------------------------------------------ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.stat strong { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--text-3); font-size: 13px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ach { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); opacity: .55; }
.ach.is-earned { opacity: 1; border-color: color-mix(in srgb, var(--c-orange) 45%, var(--border)); }
.ach-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-3); color: var(--text-3); flex: none; }
.ach.is-earned .ach-icon { background: color-mix(in srgb, var(--c-orange) 20%, transparent); color: var(--c-orange); }
.ach small, .ach em { display: block; color: var(--text-3); font-size: 12.5px; font-style: normal; }
.notif-list { display: grid; gap: 8px; }
.notif-list li { display: flex; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.notif-list li.is-unread { border-color: color-mix(in srgb, var(--c-orange) 50%, var(--border)); }
.notif-list a { font-weight: 650; } .notif-list a:hover { text-decoration: underline; }
.notif-list p { color: var(--text-2); font-size: 14px; } .notif-list small { color: var(--text-3); }
.notif-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--surface-3); color: var(--c-orange); }

/* ----- auth, static, error ---------------------------------------------------------------- */
.auth-wrap { display: grid; place-items: start center; padding: 40px 16px 24px; }
.auth-card { width: min(430px, 100%); padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.auth-card h1 { font-size: 24px; font-weight: 800; }
.auth-alt { text-align: center; color: var(--text-2); font-size: 14px; }
.auth-alt a, .auth-card .fine a, .fine a, .page-head p a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 3px; }
.auth-wrap.wide .auth-card { width: min(560px, 100%); }
.prose-page { padding-top: 32px; }
.prose { max-width: 760px; }
.prose h1 { font-size: 32px; font-weight: 850; letter-spacing: -.015em; margin-bottom: 8px; }
.prose h2 { font-size: 19px; font-weight: 750; margin: 28px 0 8px; }
.prose p, .prose li { color: #d7dae1; }
.prose p + p { margin-top: 10px; }
.prose ul { list-style: disc; padding-left: 22px; display: grid; gap: 8px; }
.prose a, .prose td a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 3px; }
.prose .table-wrap { margin: 16px 0; }
.card-form { max-width: 620px; margin-top: 20px; }
.error-page { display: grid; justify-items: center; gap: 10px; padding: 70px 16px; text-align: center; }
.error-code { font-size: 72px; font-weight: 900; line-height: 1; letter-spacing: -.04em; color: var(--surface-3); }
.error-page h1 { font-size: 26px; font-weight: 800; }
.error-page p { color: var(--text-2); max-width: 460px; }
.error-page .btn-row { justify-content: center; margin-top: 12px; }

/* installer */
.bare-main { min-height: 100vh; }
.install-logo { height: 60px; width: auto; margin: -6px 0 4px -6px; }
.checks { display: grid; gap: 6px; font-size: 14px; }
.checks li { display: flex; gap: 8px; align-items: center; }
.checks small { color: var(--text-3); margin-left: auto; }
.checks .ok .icon { color: var(--c-green); } .checks .bad .icon { color: var(--c-red); }

/* ----- responsive ------------------------------------------------------------------------- */
@media (max-width: 1099.98px) {
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .play-next { position: static; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .play-next h2, .play-next .ad-slot { grid-column: 1 / -1; }
}
@media (max-width: 899.98px) {
  .home { padding-top: 12px; }
  .cat-grid, .cat-grid-lg { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .page-head h1 { font-size: 24px; }
  /* phones: artwork on top, title + Play in a panel below (no text on top of the artwork's own text) */
  .slide { display: flex; flex-direction: column; aspect-ratio: auto; min-height: 0; max-height: none; background: var(--surface); }
  .slide > img { position: static; aspect-ratio: 16 / 9; height: auto; }
  .slide-video { inset: 0 auto auto 0; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 18%; }
  .slide-copy { position: static; z-index: 2; }
  .slide-shade { display: none; }
  .slide-copy { position: static; max-width: none; padding: 14px 16px 18px; }
  .slide-copy h2 { font-size: 22px; text-shadow: none; }
  .slide-copy p { text-shadow: none; color: var(--text-2); }
  .featured-nav { top: 10px; bottom: auto; right: 10px; }
  .game-page { padding-top: 8px; }
  .crumbs { display: none; }
  /* edge-to-edge player on phones; the height budget is the visual viewport */
  .game-page > .game-layout > .game-main > .player-stage { margin: 0 -14px; border-radius: 0; border-left: 0; border-right: 0; }
  .player { width: min(100%, max(240px, calc((100svh - var(--header-h) - 96px) * var(--ar-num)))); }
  /* portrait (e.g. 9:16) games: before Play, show the same compact 16:9 cover as landscape games. The game itself still runs portrait - it goes fullscreen (.is-pseudo-full / :fullscreen, excluded here) once it starts. */
  .player-stage.is-portrait .player:not(.is-pseudo-full):not(:fullscreen) { width: 100%; aspect-ratio: 16 / 9; }
  .game-title { font-size: 21px; }
  .game-actions { width: 100%; }
  .game-actions .act { flex: 1 1 0; padding: 0 8px; min-width: 44px; }
  .act-label { display: none; }
  .next-item { grid-template-columns: 112px 1fr; }
}
@media (max-width: 519.98px) {
  .auth-card { padding: 20px; }
  .stat strong { font-size: 24px; }
}
@media (min-width: 900px) { .drawer-only { display: none; } }

/* ----- home quick browse / card polish -------------------------------------------------- */
.quick-browse {
  margin: 8px 0 26px;
  padding: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, var(--c-orange)), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.quick-browse-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:12px; }
.quick-browse-head h2 { font-size:18px; font-weight:800; letter-spacing:-.01em; }
.eyebrow { display:block; margin-bottom:2px; color:var(--c-orange); font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.quick-browse-scroll { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(165px, 1fr); gap:10px; overflow-x:auto; scrollbar-width:thin; padding-bottom:2px; }
.quick-cat { display:flex; align-items:center; gap:10px; min-width:0; padding:10px 12px; border:1px solid var(--border); border-radius:var(--r); background:var(--surface-2); transition:transform .15s ease, border-color .15s ease, background .15s ease; }
.quick-cat:hover { transform:translateY(-2px); border-color:color-mix(in srgb,var(--tint,var(--accent)) 50%,var(--border)); background:var(--surface-3); }
.quick-cat-icon { display:grid; place-items:center; width:34px; height:34px; flex:none; border-radius:9px; color:var(--tint,var(--accent)); background:color-mix(in srgb,var(--tint,var(--accent)) 16%,transparent); }
.quick-cat strong,.quick-cat small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quick-cat strong { font-size:13px; font-weight:750; }
.quick-cat small { color:var(--text-3); font-size:11.5px; margin-top:1px; }

/* Homepage order/size: Recently played stays compact; More games and Popular stay larger. */
.page-home #recent-row .row-scroll { grid-auto-columns: 160px; gap: 12px; }
.page-home #recent-row .card-title { font-size: 13px; }
.page-home #recent-row .card-meta { font-size: 11.5px; }
.page-home #recent-row .badge { font-size: 9px; line-height: 1; padding: 2px 5px; gap: 2px; }
.page-home #recent-row .badge .icon { width: 9px; height: 9px; }
.page-home .more-games-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px var(--gap); }

@media (max-width: 899.98px) {
  .page-home #recent-row .row-scroll { grid-auto-columns: 145px; gap: 10px; }
  .page-home .more-games-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; }
}
@media (max-width: 519.98px) {
  .page-home #recent-row .row-scroll { grid-auto-columns: 132px; gap: 10px; }
}
.badge-featured { left:8px; right:auto; top:8px; display:inline-flex; align-items:center; gap:3px; padding:2px 7px; background:color-mix(in srgb,var(--c-purple) 24%,var(--surface-2)); color:#d8ccff; }
.badge-featured .icon { width:11px; height:11px; }
.card .badge-new + .badge-featured, .card .badge-upd + .badge-featured { top:31px; }

/* ----- game page stats ------------------------------------------------------------------- */
.game-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:12px 0 2px; }
.game-stat { display:flex; align-items:center; gap:9px; min-width:0; padding:10px 12px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r); }
.game-stat-icon { display:grid; place-items:center; width:30px; height:30px; flex:none; border-radius:8px; background:var(--surface-3); color:var(--c-orange); }
.game-stat strong,.game-stat small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.game-stat strong { font-size:13.5px; font-weight:800; }
.game-stat small { color:var(--text-3); font-size:11px; }
@media (max-width:899.98px) {
  .quick-browse { margin-left:0; margin-right:0; padding:13px; }
  .quick-browse-scroll { grid-auto-columns: minmax(150px, 72vw); }
  .game-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:519.98px) {
  .quick-browse-head { align-items:start; }
  .quick-browse-head h2 { font-size:17px; }
  .game-stats { gap:6px; }
  .game-stat { padding:9px 10px; }
}


/* Fixed all-tags directory */
.tags-directory .page-head { margin-bottom: 28px; }
.tag-directory { display: grid; gap: 28px; }
.tag-group h2 { margin: 0 0 10px; font-size: 1.35rem; }
.tag-directory-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.tag-directory-item { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; padding:9px 11px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--text); text-decoration:none; }
.tag-directory-item:hover { border-color:var(--muted); background:var(--surface-2, var(--surface)); }
.tag-directory-item strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tag-directory-item small { color:var(--muted); flex:0 0 auto; }
@media (max-width: 1000px) { .tag-directory-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width: 700px) { .tag-directory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 460px) { .tag-directory-grid { grid-template-columns:1fr; } }
