/* Brovy Playroom — shared visual system for the existing portal, November 2026. */
.playroom-site {
  --ink: #061d20;
  --ink-top: #09262a;
  --ink-raised: #102f33;
  --field: #183a3e;
  --line: #24474a;
  --text: #f7f6ed;
  --muted: #afc7c6;
  --r-card: 18px;
  --cw: 270px;
  --ch: 164px;
  color: var(--text);
  cursor: auto;
  line-height: 1.55;
}
.playroom-site a, .playroom-site button, .playroom-site summary, .playroom-site label { cursor: pointer; }
.playroom-site main { padding: 0 40px; margin: 80px auto 0; max-width: 1536px; min-height: calc(100vh - 80px); overflow: clip; }
.playroom-site .top { height: 80px; padding: 0 36px; background: #072226; border-bottom: 1px solid #ffffff0a; gap: 24px; }
.playroom-site .logo { margin: 0; gap: 10px; height: 44px; }
.playroom-site .logo-mark { width: 38px; height: 44px; }
.playroom-site .logo-t { font-size: 23px; letter-spacing: -.9px; }
.playroom-nav { display: flex; align-items: center; gap: 12px; margin-inline-start: 16px; white-space: nowrap; }
.playroom-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 24px; font-weight: 800; font-size: 15px; min-height: 44px; }
.playroom-nav .ic { color: var(--teal); width: 23px; height: 23px; }
.playroom-nav a:hover { background: #ffffff0b; }
.playroom-nav a[aria-current=page] { background: #6c4c24; color: #fff7dd; }
.playroom-site .search { position: relative; left: auto; right: auto; top: auto; transform: none; margin-inline-start: auto; width: clamp(200px, 25vw, 340px); flex: 1 1 240px; max-width: 380px; }
.playroom-site #search-input { background: #183a3e; border: 1px solid #49696b; height: 44px; font-size: 14px; font-weight: 600; }
.playroom-site .search-go { top: 12px; }
.playroom-site .top-r { position: static; margin: 0; gap: 10px; flex: none; }
.playroom-site .top-r #random-top, .playroom-site .top-r #pass-chip, .playroom-site .top-r > a.round { display: none; }
.playroom-site .join { max-width: 110px; min-height: 44px; border-color: #49696b; font-size: 12px; }
.playroom-site .round { background: #17383b; width: 44px; height: 44px; }
.playroom-site .menu { display: block; margin: 0; order: 5; flex: 0 0 24px; width: 24px; height: 24px; font-size: 24px; }
.playroom-site .rail { top: 80px; transform: translateX(-100%); width: 260px; background: #09262a; transition: transform .2s ease; }
.playroom-site.rail-open .rail { transform: translateX(0); width: 260px; }
.playroom-site .rail-l { display: block; }
.playroom-site .rail-a { font-size: 14px; min-height: 44px; }
.playroom-site .scrim { top: 80px; }
.playroom-site .scrim:not([hidden]) { display: block; }
.playroom-skip { position: fixed; inset-block-start: -60px; inset-inline-start: 16px; z-index: 100; background: var(--sun); color: #112526; padding: 10px 20px; border-radius: 8px; }
.playroom-skip:focus { inset-block-start: 8px; }
.playroom-site :focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; }

/* Hero art is a compressed, individually generated image; all copy is real text. */
.playroom-site.playroom-home main { padding: 0; }
.playroom-hero { position: relative; min-height: 444px; display: flex; align-items: center; isolation: isolate; }
.playroom-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -1; }
.playroom-hero-copy { padding: 36px 0 36px 10%; width: 60%; }
.playroom-eyebrow { color: var(--sun); font: 800 12px/1.5 var(--body); letter-spacing: 1.3px; text-transform: uppercase; }
.playroom-hero .playroom-eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.playroom-hero .playroom-eyebrow::before { content: ''; width: 38px; height: 2px; background: var(--sun); }
.playroom-hero h1 { font: 800 clamp(36px,5.1vw,76px)/1.08 var(--head); letter-spacing: -2.5px; color: #fffbee; }
.playroom-hero .playroom-cta { font-size: 20px; min-height: 64px; padding: 16px 30px; }
.playroom-lead { font-size: clamp(16px,1.5vw,22px); margin: 16px 0 25px; max-width: 540px; line-height: 1.5; }
.playroom-cta { display: inline-flex; justify-content: center; align-items: center; gap: 20px; min-height: 56px; padding: 13px 27px; border-radius: 30px; background: var(--ember); color: #201007; font: 800 17px/1.4 var(--body); transition: background .15s, transform .15s; }
.playroom-cta .ic { width: 26px; height: 26px; }
.playroom-cta:hover { background: #ff8c62; transform: translateY(-2px); }
.playroom-moods { display: flex; justify-content: center; flex-wrap: wrap; gap: 50px; padding: 12px 24px 26px; }
.playroom-moods a { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; min-height: 56px; }
.playroom-mood-icon { display: grid; place-items: center; width: 60px; height: 48px; border-radius: 20px; background: #174b4c; color: var(--teal); transition: transform .18s; }
.playroom-mood-icon .ic { width: 30px; height: 30px; }
.playroom-moods a:nth-child(2) .playroom-mood-icon { background: #3b3824; color: var(--sun); }
.playroom-moods a:nth-child(3) .playroom-mood-icon { background: #53362b; color: var(--ember); }
.playroom-moods a:hover .playroom-mood-icon { transform: translateY(-3px); }
.playroom-content { padding: 0 48px; }
.playroom-site .sec { margin: 30px 0; }
.playroom-site .sec-head { padding: 0; margin-bottom: 15px; }
.playroom-site .sec-h { height: auto; margin: 0; padding: 0; color: var(--text); font: 800 26px/1.3 var(--head); letter-spacing: -.9px; white-space: normal; }
.playroom-site .strip { margin: 0; padding: 6px 0 14px; gap: 16px; }
.playroom-site .strip-b { display: none !important; }
.playroom-site .tile { transition: transform .18s; }
.playroom-site .tile:hover { transform: translateY(-4px); }
.playroom-site .card { padding: 0; border: 0; background: #123236; overflow: hidden; }
.playroom-site .card img { border-radius: 18px; box-shadow: none; }
.playroom-site .card::after { display: none; }
.playroom-site .card-t { left: 10px; right: 10px; bottom: 9px; width: fit-content; max-width: calc(100% - 20px); padding: 5px 9px; background: #062124eb; border-radius: 7px; font-size: 15px; line-height: 1.4; max-height: none; }
.playroom-site .fav { width: 36px; height: 36px; background: #08282aed; border: 1px solid #ffffff30; opacity: 1; }
.playroom-site .badge { display: none; }
.playroom-site .view-all { font-size: 13px; }
.playroom-featured { display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: visible; }
.playroom-featured > .tile { width: auto; height: auto; aspect-ratio: 1.5; }
.playroom-featured > .tile .card { bottom: 26px; }
.playroom-original-label { position: absolute; bottom: 0; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--sun); font: 800 11px/20px var(--body); text-transform: uppercase; letter-spacing: .5px; }
.playroom-original-label .ic { width: 16px; height: 16px; }
.playroom-resume { display: flex; align-items: center; gap: 22px; padding: 10px 18px 10px 10px; border: 1px solid #315052; border-radius: 24px; background: #113236; margin-top: 0; }
.playroom-resume-pic { width: 220px; flex: 0 0 220px; }
.playroom-resume-pic img { width: 100%; height: 84px; object-fit: cover; border-radius: 16px; }
.playroom-resume h2 { font: 800 26px/1.4 var(--head); }
.playroom-resume-history { font-size: 13px; color: var(--muted); text-decoration: underline; }
.playroom-resume .playroom-cta { margin-inline-start: auto; min-height: 48px; font-size: 15px; white-space: nowrap; }
.playroom-discover { margin: 48px 0; }
.playroom-site .category-nav { padding: 0; margin: 0; }
.playroom-site .category-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; padding: 6px 0; }
.playroom-site .category-card { width: 100%; height: 132px; border-radius: 18px; background: #113236; border: 1px solid #24474a; }
.playroom-site .category-art { object-fit: contain; object-position: right center; opacity: .95; width: 70%; height: 100%; }
.playroom-site .category-copy { position: absolute; z-index: 1; left: 18px; bottom: 18px; padding: 0; }
.playroom-site .category-copy strong { font-size: 18px; color: #f8f8ed; }
.playroom-site .category-copy small { color: #bdd1cd; font-size: 12px; }
.playroom-site .category-shortcuts { margin: 14px 0 0; flex-wrap: wrap; gap: 8px; }
.playroom-site .category-shortcuts a { min-height: 44px; background: #103034; border: 1px solid #24474a; border-radius: 24px; }
.playroom-challenge { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 38px; padding: 24px; border-radius: 24px; background: #102f33; margin: 40px 0; }
.playroom-challenge-art img { width: 100%; aspect-ratio: 2; object-fit: cover; border-radius: 18px; }
.playroom-challenge h2 { font: 800 30px/1.3 var(--head); margin: 8px 0; }
.playroom-challenge p:not(.playroom-eyebrow) { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.playroom-challenge .playroom-cta { min-height: 48px; font-size: 15px; }
.playroom-outro { text-align: center; padding: 48px 18px 36px; border-top: 1px solid var(--line); margin-top: 40px; }
.playroom-outro h2 { font: 800 28px/1.3 var(--head); }
.playroom-outro p { max-width: 650px; margin: 14px auto 20px; color: var(--muted); }
.playroom-site .foot { padding: 28px 20px; margin: 20px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; }

/* Browse, search, brain hubs, personal pages and the game player share the room. */
.playroom-site .gp { padding: 38px 0; }
.playroom-site .gp-h { font-size: clamp(28px,3.2vw,44px); line-height: 1.2; letter-spacing: -1.5px; color: #fffbee; margin-bottom: 14px; }
.playroom-site .gp-sub { color: var(--muted); font-size: 16px; line-height: 1.7; margin-bottom: 24px; max-width: 740px; }
.playroom-collection-head.has-art { position: relative; display: flex; align-items: center; min-height: 210px; border-bottom: 1px solid var(--line); margin-bottom: 28px; padding-bottom: 20px; }
.playroom-collection-head.has-art > div { width: 72%; position: relative; z-index: 1; }
.playroom-site .playroom-collection-head > .category-art { width: 28%; height: 200px; inset-inline-end: 0; top: 0; }
.playroom-collection-head .gp-sub { max-width: 700px; }
.playroom-site .grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-top: 24px; }
.playroom-site .grid .tile { aspect-ratio: 1.65; }
.playroom-site .tags { gap: 9px; }
.playroom-site .tags a { padding: 10px 16px; min-height: 44px; background: #123337; border: 1px solid #315052; color: var(--text); }
.playroom-site .tags a:hover { border-color: var(--teal); }
.playroom-site .pager { gap: 8px; margin-block: 32px; }
.playroom-site .pg.on { background: var(--ember); color: #201007; }
.playroom-site .genre-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.playroom-site .genre-tile { border-radius: 18px; background: #123337; border: 1px solid #24474a; min-height: 105px; }
.playroom-site .more { margin-top: 44px; }
.playroom-site .gp-copy { padding: 24px 0; max-width: 800px; color: var(--muted); }
.playroom-site .gm { padding: 24px 0; grid-template-columns: minmax(0,1fr) 260px; gap: 28px; }
.playroom-site .player { border-radius: 22px 22px 0 0; background: #03171a; border: 1px solid #294b4d; overflow: hidden; }
.playroom-site .bar { border-radius: 0 0 22px 22px; background: #123337; min-height: 82px; padding: 14px 20px; }
.playroom-site .btn-play { background: var(--ember); color: #201007; border-radius: 30px; min-height: 56px; padding-inline: 32px; }
.playroom-site .bar-b .act { width: 44px; height: 44px; border-radius: 14px; background: #234448; }
.playroom-site .info { margin-top: 30px; padding: 26px; border-radius: 20px; background: #102f33; }
.playroom-site .info p, .playroom-site .info li { line-height: 1.8; color: #c4d5d2; }
.playroom-site .side-h { font: 800 18px/1.5 var(--head); margin-bottom: 12px; }
.playroom-site .side-grid { gap: 12px; }
.playroom-site .gm .side-grid { grid-template-columns: 1fr; }
.playroom-site .gm .side-grid .tile { height: auto; aspect-ratio: 1.8; }
.playroom-site .side-grid .tile { min-height: 86px; }
.playroom-site .crumbs { line-height: 1.7; margin-bottom: 18px; color: var(--muted); }
.playroom-site .pass-hero, .playroom-site .score-t, .playroom-site .modal-in { background: #123337; border: 1px solid #315052; border-radius: 24px; }
.playroom-site .empty { padding: 44px 24px; background: #102f33; border-radius: 24px; }
.playroom-site .btn-fill { background: var(--ember); color: #201007; border-radius: 26px; min-height: 48px; }
.playroom-site .btn-line { border-color: #446568; border-radius: 26px; min-height: 48px; display: inline-flex; align-items: center; gap: 12px; }
.playroom-site .toast { border: 1px solid #557c7c; background: #173b3d; color: #fffbee; border-radius: 16px; }

/* Locale direction: mirror the composition, retain natural artwork lettering. */
[dir=rtl] .playroom-site main { padding-inline: 40px; }
[dir=rtl] .playroom-site.playroom-home main { padding: 0; }
[dir=rtl] .playroom-site .rail { right: 0; left: auto; transform: translateX(100%); }
[dir=rtl] .playroom-site.rail-open .rail { transform: translateX(0); }
[dir=rtl] .playroom-hero { justify-content: flex-end; }
[dir=rtl] .playroom-hero-copy { padding: 44px 5%; text-align: right; direction: rtl; }
[dir=rtl] .playroom-hero h1 { font-size: clamp(36px,4vw,60px); letter-spacing: 0; }
[dir=rtl] .playroom-eyebrow { letter-spacing: 0; }
[dir=rtl] .playroom-site .search { inset: auto; transform: none; }

@media (min-width: 1600px) { .playroom-site .top { padding-inline: max(36px,calc((100vw - 1464px)/2)); } }
@media (max-width: 1200px) {
  .playroom-site .top { padding-inline: 24px; gap: 16px; }
  .playroom-nav { margin-inline-start: 0; gap: 2px; }
  .playroom-nav a { padding-inline: 12px; font-size: 13px; }
  .playroom-site .logo-t { font-size: 20px; }
  .playroom-site .join { max-width: 90px; }
  .playroom-moods { gap: 28px; }
  .playroom-moods a { font-size: 16px; }
  .playroom-hero { min-height: 405px; }
  .playroom-content { padding-inline: 32px; }
  .playroom-site .gm { grid-template-columns: minmax(0,1fr) 210px; gap: 20px; }
  .playroom-site .gm .side-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .playroom-site .top { height: 76px; gap: 14px; }
  .playroom-site main { margin-top: 76px; padding-inline: 24px; }
  .playroom-site .rail, .playroom-site .scrim { top: 76px; }
  .playroom-site .join { display: none; }
  .playroom-site .search { max-width: 260px; min-width: 130px; }
  .playroom-site .logo-t { font-size: 18px; }
  .playroom-nav a { padding-inline: 9px; font-size: 12px; }
  .playroom-nav .ic { display: none; }
  .playroom-hero { min-height: 370px; }
  .playroom-hero-copy { padding-inline-start: 5%; width: 59%; }
  .playroom-hero h1 { font-size: 44px; letter-spacing: -1.7px; }
  .playroom-hero .playroom-cta { font-size: 16px; min-height: 50px; padding: 13px 22px; }
  .playroom-lead { font-size: 16px; max-width: 330px; }
  .playroom-cta { font-size: 15px; padding-inline: 22px; min-height: 50px; }
  .playroom-moods { gap: 20px; }
  .playroom-moods a { gap: 8px; font-size: 14px; }
  .playroom-mood-icon { width: 48px; height: 42px; }
  .playroom-site .grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .playroom-site .category-grid, .playroom-site .genre-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .playroom-resume-pic { width: 170px; flex-basis: 170px; }
  .playroom-resume h2 { font-size: 22px; }
  .playroom-site .gm { grid-template-columns: minmax(0,1fr); }
  .playroom-site .gm .gm-side .side-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .playroom-site .top { padding-inline: 16px; gap: 12px; height: 70px; }
  .playroom-site .logo-t { font-size: 18px; }
  .playroom-site .logo-mark { width: 30px; height: 36px; }
  .playroom-site .top-r { margin-inline-start: auto; }
  .playroom-site .top-r .only-phone { display: flex; }
  .playroom-site .search { display: none; position: absolute; top: 70px; inset-inline: 12px; width: auto; max-width: none; margin: 0; background: var(--ink); }
  .playroom-site .search.open { display: block; }
  .playroom-site .search-drop { max-height: 65svh; }
  .playroom-site .playroom-nav { display: none; }
  .playroom-site .join { display: inline-flex; align-items: center; }
  .playroom-site main { margin-top: 70px; padding-inline: 18px; }
  .playroom-site .rail, .playroom-site .scrim { top: 70px; }
  .playroom-hero { min-height: 570px; align-items: flex-start; background: #042227; }
  .playroom-art { height: 300px; top: auto; bottom: 0; object-fit: cover; object-position: 80% center; }
  .playroom-hero-copy { width: 100%; padding: 30px 24px 18px; }
  .playroom-hero .playroom-eyebrow { font-size: 10px; margin-bottom: 13px; }
  .playroom-hero h1 { font-size: clamp(36px,7.8vw,52px); line-height: 1.08; letter-spacing: -1.8px; }
  .playroom-hero .playroom-cta { font-size: 15px; min-height: 48px; padding: 12px 22px; }
  .playroom-lead { font-size: 16px; max-width: 100%; margin: 14px 0 20px; }
  .playroom-cta { min-height: 48px; padding: 12px 22px; font-size: 15px; }
  .playroom-moods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; padding: 20px 24px 24px; }
  .playroom-moods a { font-size: 14px; gap: 10px; }
  .playroom-mood-icon { width: 46px; height: 42px; flex: none; }
  .playroom-mood-icon .ic { width: 25px; height: 25px; }
  .playroom-content { padding-inline: 18px; }
  .playroom-site .sec { margin: 28px 0; }
  .playroom-site .sec-h { font-size: 22px; letter-spacing: -.7px; }
  .playroom-site .view-all { font-size: 11px; }
  .playroom-site .strip { gap: 12px; padding-bottom: 12px; }
  .playroom-featured { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .playroom-featured > .tile { aspect-ratio: 1.1; }
  .playroom-site .card-t { font-size: 12px; left: 6px; right: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 4px 6px; }
  .playroom-site .fav { width: 32px; height: 32px; }
  .playroom-resume { gap: 12px; border-radius: 18px; padding: 10px; flex-wrap: wrap; }
  .playroom-resume-pic { flex-basis: 100px; width: 100px; }
  .playroom-resume-pic img { height: 78px; border-radius: 10px; }
  .playroom-resume > div { flex: 1; min-width: 0; }
  .playroom-resume h2 { font-size: 19px; overflow-wrap: anywhere; }
  .playroom-resume .playroom-eyebrow { font-size: 9px; }
  .playroom-resume .playroom-cta { width: 100%; min-height: 44px; }
  .playroom-site .category-grid, .playroom-site .genre-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .playroom-site .category-card { height: 120px; }
  .playroom-site .category-copy { left: 12px; bottom: 13px; }
  .playroom-site .category-copy strong { font-size: 15px; }
  .playroom-site .category-copy small { font-size: 10px; }
  .playroom-challenge { grid-template-columns: 1fr; gap: 18px; padding: 16px; margin: 30px 0; }
  .playroom-challenge h2 { font-size: 25px; }
  .playroom-challenge-art img { aspect-ratio: 1.8; }
  .playroom-discover { margin: 34px 0; }
  .playroom-site .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .playroom-site .grid .tile { aspect-ratio: 1.25; }
  .playroom-site .gp { padding-top: 24px; }
  .playroom-site .gp-h { font-size: 30px; }
  .playroom-site .gp-sub { font-size: 14px; }
  .playroom-collection-head.has-art { min-height: 180px; }
  .playroom-collection-head.has-art > div { width: 74%; }
  .playroom-site .playroom-collection-head > .category-art { width: 30%; height: 130px; }
  .playroom-collection-head .gp-h { font-size: 28px; }
  .playroom-site .bar { padding: 12px; flex-wrap: wrap; gap: 10px; }
  .playroom-site .bar-b { margin-inline-start: auto; }
  .playroom-site .bar-b .act { width: 40px; height: 40px; }
  .playroom-site .info { padding: 18px; }
  .playroom-site .gm .gm-side .side-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .playroom-site .foot { padding-inline: 0; }
  .playroom-home .foot { padding-inline: 18px; }
  [dir=rtl] .playroom-hero-copy { padding: 30px 24px; }
  [dir=rtl] .playroom-hero h1 { font-size: 40px; }
  [dir=rtl] .playroom-site main { padding-inline: 18px; }
}
@media (max-width: 420px) {
  .playroom-site .join { display: none; }
  .playroom-site .top { gap: 10px; }
  .playroom-site .top-r { gap: 6px; }
  .playroom-site .round { width: 38px; height: 38px; }
  .playroom-site .logo-t { font-size: 17px; }
  .playroom-hero { min-height: 560px; }
  .playroom-hero-copy { padding-inline: 20px; }
  .playroom-hero h1 { font-size: 36px; }
  .playroom-site .sec-h { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .playroom-site *, .playroom-site *::before, .playroom-site *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- home: one tile grid ---------- */
/* Fixed square cells, so every tile size stays square; dense flow fills the gaps big tiles leave. */
.tg-wrap { --tg: 94px; --tg-gap: 12px; padding: 20px 24px 0; }
.tg-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tilegrid { display: grid; grid-template-columns: repeat(auto-fill, var(--tg)); grid-auto-rows: var(--tg); grid-auto-flow: dense; gap: var(--tg-gap); justify-content: center; margin: 0; padding: 0; list-style: none; }
.tilegrid .tile, .tilegrid .tile.big { width: auto; height: auto; }
.tilegrid .tg-2 { grid-column: span 2; grid-row: span 2; }
.tilegrid .tg-3 { grid-column: span 3; grid-row: span 3; }
.tilegrid .card-t { opacity: 0; transition: opacity .15s; font-size: 12px; line-height: 15px; padding: 20px 8px 7px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tilegrid .tg-2 .card-t { font-size: 14px; line-height: 18px; padding: 26px 10px 9px; }
.tilegrid .tile.big .card-t { font-size: 18px; line-height: 23px; padding: 34px 14px 12px; }
.tilegrid .tile:hover .card-t, .tilegrid .card:focus-visible .card-t { opacity: 1; }
.tilegrid .card:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.tilegrid .tg-1 .fav { width: 26px; height: 26px; padding: 6px; top: 5px; right: 5px; }
.tilegrid .tg-1 .badge { display: none; }
@media (hover: none) {
  .tilegrid .tg-1 .card-t { display: none; }
  .tilegrid .tg-1 .fav { display: none; }
  .tilegrid .tg-2 .card-t, .tilegrid .tile.big .card-t { opacity: 1; }
}
.tg-cats { margin-top: var(--tg-gap); }
.tg-cats li { grid-column: span 3; }
.tg-cat { display: flex; align-items: center; gap: 12px; height: 100%; overflow: hidden; padding-inline-end: 14px; border-radius: var(--r-card); background: var(--ink-raised); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: background .15s, transform .15s; }
.tg-cat:hover { background: var(--line); transform: scale(1.03); }
.tg-cat:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.tg-cat img { flex: none; height: 100%; width: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.tg-cat span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tg-cat strong { font: 700 16px/1.2 var(--head); }
.tg-cat small { font-size: 12px; color: var(--muted); }
.tg-wrap .playroom-outro { margin-top: 40px; }
/* Phones: four columns that always fill the width. */
@media (max-width: 480px) {
  .tg-wrap { --tg-gap: 8px; --tg: calc((min(100vw, 480px) - 24px - 3 * var(--tg-gap)) / 4); padding: 12px 12px 0; }
  .tg-cats li { grid-column: span 4; }
}
/* In the grid the heart waits for hover, unless the game is already hearted. */
.playroom-site .tilegrid .fav { opacity: 0; }
.playroom-site .tilegrid .tile:hover .fav, .playroom-site .tilegrid .fav:focus-visible, .playroom-site .tilegrid .fav[aria-pressed="true"] { opacity: 1; }
@media (hover: none) { .playroom-site .tilegrid .tg-2 .fav, .playroom-site .tilegrid .tile.big .fav { opacity: 1; } }

/* ---------- home grid: the Playroom hero as the first tile ---------- */
.tg-hero { position: relative; grid-column: span 7; grid-row: span 3; overflow: hidden; border-radius: var(--r-card); background: var(--ink); box-shadow: var(--shadow); list-style: none; }
.tg-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.tg-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(11, 21, 24, .94) 0, rgba(11, 21, 24, .72) 38%, rgba(11, 21, 24, 0) 62%); pointer-events: none; }
/* The copy always sits on the dark left of the picture, in Arabic too, so it never covers Brovy. */
.tg-hero-copy { position: absolute; z-index: 2; left: 0; top: 0; bottom: 0; width: 52%; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 24px 28px; }
.tg-hero-copy .playroom-eyebrow { margin: 0; }
.tg-hero-copy h1 { margin: 0; font: 800 32px/1.08 var(--head); letter-spacing: -.5px; color: var(--text); }
.tg-hero-lead { margin: 0; font-size: 15px; line-height: 1.4; color: var(--muted); }
.tg-hero-copy .playroom-cta { margin-top: 4px; }
[dir=rtl] .tg-hero-copy { align-items: flex-start; text-align: right; }
@media (max-width: 1100px) { .tg-hero { grid-column: span 6; } }
/* Phones: Brovy and the Playroom sign on top, the words and the button underneath. */
@media (max-width: 700px) {
  /* Three rows instead of four, so the first games show sooner; the phone picture is already framed on Brovy. */
  .tg-hero { grid-column: 1 / -1; grid-row: span 3; }
  .tg-hero::before { background: linear-gradient(0deg, rgba(11, 21, 24, .95) 0, rgba(11, 21, 24, .7) 30%, rgba(11, 21, 24, 0) 52%); }
  .tg-hero-art { object-position: 50% 20%; }
  .tg-hero-copy { top: auto; width: 100%; justify-content: flex-end; padding: 14px 16px 16px; gap: 8px; }
  .tg-hero-copy h1 { font-size: 22px; }
  .tg-hero-copy .playroom-eyebrow, .tg-hero-lead { display: none; }
  .tg-hero-copy .playroom-cta { min-height: 44px; padding: 10px 18px; font-size: 15px; }
}

/* ---------- home grid: pictures that make you want to play ---------- */
/* A shimmer holds each tile until its picture arrives, then the picture fades in. */
.tilegrid .card { padding: 0; overflow: hidden; border-radius: var(--r-card); background: linear-gradient(110deg, #17282e 30%, #22393f 50%, #17282e 70%) 0 0 / 200% 100%; animation: tg-shimmer 1.4s linear infinite; transition: box-shadow .18s, transform .15s; }
.tilegrid .card:has(img.in) { animation: none; background: var(--ink-raised); }
@keyframes tg-shimmer { to { background-position: -200% 0; } }
.tilegrid .card img { border-radius: 0; box-shadow: none; filter: saturate(1.12) contrast(1.04); transition: opacity .35s, transform .35s, filter .2s; }
.tg-js .tilegrid .card img { opacity: 0; transform: scale(1.04); }
.tg-js .tilegrid .card img.in { opacity: 1; transform: none; }
/* ---------- home grid: hover ---------- */
/* The whole tile (picture, title and heart) pops out over its neighbours with a small spring. Small
   tiles grow most and big ones least, so every size ends up about as much bigger on screen. A short
   delay on the way in keeps tiles from flickering as the pointer sweeps across the grid. */
.tilegrid .tile { --zoom: 1.16; transition: transform .28s cubic-bezier(.34, 1.56, .64, 1); }
.tilegrid .tg-2 { --zoom: 1.09; }
.tilegrid .tile.big { --zoom: 1.05; }
@media (hover: hover) {
  .tilegrid .tile:hover, .tilegrid .tile:focus-within { z-index: 5; transform: scale(var(--zoom)); transition-delay: 50ms; }
  .tilegrid .tile:hover .card, .tilegrid .tile:focus-within .card { box-shadow: 0 0 0 3px var(--sun), 0 18px 40px rgba(0, 0, 0, .65), 0 0 28px rgba(255, 200, 61, .25); }
  .tg-js .tilegrid .tile:hover .card img.in, .tilegrid .tile:hover .card img { transform: scale(1.04); filter: saturate(1.25) contrast(1.06) brightness(1.07); }
  /* The title rises into place instead of just appearing. */
  .tilegrid .card-t { transform: translateY(8px); transition: opacity .2s, transform .25s ease-out; }
  .tilegrid .tile:hover .card-t, .tilegrid .tile:focus-within .card-t { transform: none; }
}
/* On touch screens a tap presses the tile in a little, so it feels like a button. */
.tilegrid .tile:active { transform: scale(.96); transition-duration: .08s; }
@media (prefers-reduced-motion: reduce) {
  .tilegrid .card { animation: none; }
  .tilegrid .card img, .tg-js .tilegrid .card img { transition: none; transform: none; }
  .tg-js .tilegrid .tile:hover .card img.in, .tilegrid .tile:hover .card img { transform: none; }
  .tilegrid .tile, .tilegrid .tile:hover, .tilegrid .tile:focus-within, .tilegrid .tile:active { transform: none; transition: none; }
  .tilegrid .card-t { transform: none; transition: none; }
}

/* Home article: a readable guide inside the centered outro. */
.home-article .guide { text-align: start; max-width: 780px; margin: 18px auto 22px; }
.home-article .guide h2 { font: 800 20px/1.3 var(--head); margin: 22px 0 8px; }
.home-article .guide p { margin-inline: 0; max-width: none; }
.home-article .faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.home-article .faq summary { cursor: pointer; font-weight: 700; }
.home-article .faq p { margin-top: 6px; }
/* While the browser picks this visitor's games, the tiles keep their shimmer instead of showing the first list. */
.tg-wait > .tile .card img { opacity: 0 !important; }
/* "Jump back in" is a full-width row of the grid, so it lines up with the tiles and keeps the grid's gap. */
#home-grid > #jump { grid-column: 1 / -1; box-sizing: border-box; height: 100%; min-width: 0; padding: 6px 14px 6px 6px; border-radius: var(--r-card); list-style: none; overflow: hidden; }
#home-grid > #jump .playroom-resume-pic { width: 140px; flex-basis: 140px; height: 100%; }
#home-grid > #jump .playroom-resume-pic img { height: 100%; border-radius: 12px; }
#home-grid > #jump > div { min-width: 0; }
#home-grid > #jump h2 { font-size: 22px; line-height: 1.25; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#home-grid > #jump .playroom-cta { flex: none; }
@media (max-width: 700px) {
  #home-grid > #jump { grid-row: span 2; flex-wrap: wrap; align-content: center; padding: 8px; gap: 8px 12px; }
  #home-grid > #jump .playroom-resume-pic { width: 96px; flex-basis: 96px; height: 72px; }
  #home-grid > #jump > div { flex: 1; }
  #home-grid > #jump h2 { font-size: 17px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  #home-grid > #jump .playroom-cta { width: 100%; min-height: 44px; }
}
#home-grid > #jump > div .playroom-eyebrow { line-height: 1.2; }
#home-grid > #jump .playroom-resume-history { line-height: 1.2; }

/* ---------- play page: "Try a similar game" ---------- */
.similar { margin: 14px 0 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--ink-top); }
.similar-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.similar-head h2 { margin: 0; font: 700 16px/1.3 var(--head); color: var(--text); }
.similar-no { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--field); border-radius: 999px; background: transparent; color: var(--muted); font: 700 13px/1 var(--body); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.similar-no svg { width: 16px; height: 16px; transform: rotate(180deg); }
.similar-no:hover { border-color: var(--ember); color: var(--text); }
.similar-no[aria-pressed="true"] { background: var(--field); color: var(--text); }
.similar-no[aria-pressed="true"] svg { display: none; }
.similar-no:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.similar-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.similar-a { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 6px; border-radius: 12px; background: var(--ink-raised); color: var(--text); text-decoration: none; transition: background .15s, transform .15s; }
.similar-a:hover { background: var(--line); transform: translateY(-2px); }
.similar-a:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.similar-a img { flex: none; width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: var(--wash); }
.similar-a span { min-width: 0; font: 700 14px/1.25 var(--body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) {
  .similar-list { grid-template-columns: 1fr; gap: 8px; }
  .similar-a { min-height: 56px; }
  .similar-a img { width: 48px; height: 48px; }
}

/* ---------- home grid: plain game names inside the picture ---------- */
/* Keep the tile sizes and hover treatment; only the lettering appears over the image. */
.tilegrid .card { overflow: hidden; }
.tilegrid .card img { border-radius: var(--r-card); }
.tg-js .tilegrid .tile:hover .card img.in, .tilegrid .tile:hover .card img { transform: none; }
.tilegrid .card-t, .tilegrid .tg-2 .card-t, .tilegrid .tile.big .card-t {
  position: absolute; left: 8px; right: 8px; top: auto; bottom: 8px; z-index: 2;
  display: block; width: auto; max-width: none; max-height: none; padding: 0; border-radius: 0;
  background: none; color: #fff; font: 700 13px/1.35 var(--body); letter-spacing: 0; text-align: start;
  white-space: nowrap; overflow-wrap: normal; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset;
  box-shadow: none; text-shadow: 0 1px 3px #000, 0 0 5px rgba(0, 0, 0, .8);
  opacity: 0; transform: none; scale: none; pointer-events: none; transition: opacity .16s;
}
.tilegrid .card-t::before { content: none; display: none; }
.tilegrid .tile:hover .card-t, .tilegrid .tile:focus-within .card-t { opacity: 1; transform: none; scale: none; transition-delay: 70ms; }
/* Phones and touch devices show names without requiring hover. */
@media (hover: none), (pointer: coarse), (max-width: 700px) {
  .tilegrid .card-t, .tilegrid .tg-2 .card-t, .tilegrid .tile.big .card-t { display: block; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .tilegrid .card-t { transition: none; transform: none; } }

/* ---------- home grid: category filters ---------- */
.tg-chips {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px;
  margin: 0 auto 18px; padding: 12px; border: 1px solid #24474a;
  border-radius: 20px; background: #0b272b; overflow: visible;
  -webkit-mask: none; mask: none;
}
.tg-chip {
  min-width: 0; min-height: 46px; padding: 10px 12px; display: flex;
  align-items: center; justify-content: center; gap: 9px; border-radius: 12px;
  background: #123237; border: 1px solid transparent; color: #dceae5;
  font: 700 13px/1.4 var(--body); text-decoration: none;
  transition: background .16s, color .16s, border-color .16s;
}
.tg-chip:first-child { margin-inline-start: 0; font-weight: 800; }
.tg-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-chip svg { flex: none; width: 20px; height: 20px; color: #78d7ca; transition: color .16s; }
.tg-chip:hover { background: #1b4043; border-color: #487372; color: #fff; }
.tg-chip[aria-current="true"] { background: var(--sun); border-color: var(--sun); color: #2a1a00; font-weight: 800; }
.tg-chip[aria-current="true"] svg { color: #2a1a00; }
.tg-chip:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
@media (max-width: 1100px) and (min-width: 761px) {
  .tg-chips { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* Two swipeable rows keep categories within reach on phones, with a visible scroll affordance. */
@media (max-width: 760px) {
  .tg-chips {
    grid-template-columns: none; grid-template-rows: repeat(2, 44px); grid-auto-flow: column;
    grid-auto-columns: max-content; gap: 8px; padding: 10px; margin-bottom: 14px;
    border-radius: 16px; overflow-x: auto; overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity; scroll-padding-inline: 10px;
    scrollbar-width: thin; scrollbar-color: #507c7c transparent;
  }
  .tg-chip { min-width: 112px; min-height: 44px; padding: 9px 13px; scroll-snap-align: start; }
  .tg-chips::-webkit-scrollbar { display: block; height: 3px; }
  .tg-chips::-webkit-scrollbar-thumb { background: #507c7c; border-radius: 3px; }
}
@media (prefers-reduced-motion: reduce) { .tg-chip, .tg-chip svg { transition: none; } }
.tg-filtered > .tg-hero, .tg-filtered > #jump { display: none; }
.tg-more { display: flex; justify-content: center; margin: 22px 0 6px; }
.tg-more[hidden] { display: none; }

/* Brovy's magic refresh is part of the discovery bar, never floating over game cards. */
.tg-discovery-bar { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 12px; align-items: stretch; margin-bottom: 18px; }
.tg-discovery-bar .tg-chips { min-width: 0; margin: 0; }
.brovy-magic { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 118px; padding: 4px 6px 8px; border: 1px solid #786030; border-radius: 20px; background: #173332; color: #ffe8a5; font: 800 12px/1.3 var(--body); cursor: pointer; transition: background .18s, border-color .18s; }
.brovy-magic-character { display: block; width: 88px; height: 88px; object-fit: contain; transform-origin: 50% 80%; pointer-events: none; }
.brovy-magic:hover { background: #233e36; border-color: var(--sun); }
.brovy-magic:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.brovy-magic:disabled { cursor: progress; }
.brovy-magic.is-casting { border-color: var(--sun); }
.brovy-magic.is-casting .brovy-magic-character { animation: brovy-cast .7s ease-in-out; }
@keyframes brovy-cast {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  24% { transform: translateY(-7px) rotate(-14deg) scale(1.06); }
  48% { transform: translateY(-10px) rotate(16deg) scale(1.1); }
  72% { transform: translateY(-3px) rotate(-6deg) scale(1.03); }
}
@media (max-width: 760px) {
  .tg-discovery-bar { grid-template-columns: minmax(0, 1fr) 78px; gap: 8px; margin-bottom: 14px; }
  .brovy-magic { min-height: 118px; border-radius: 16px; padding: 4px 2px 8px; font-size: 10px; }
  .brovy-magic-character { width: 74px; height: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .brovy-magic { transition: none; }
  .brovy-magic.is-casting .brovy-magic-character { animation: none; }
}

/* ---------- play page: loading and asking ---------- */
.cover-p { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 460px; }
.cover-load { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.cover-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--sun); animation: cover-spin .8s linear infinite; }
@keyframes cover-spin { to { transform: rotate(360deg); } }
.cover-ask-h { font: 800 18px/1.3 var(--head); color: #fff; }
.cover-ask-p { font-size: 14px; line-height: 1.45; color: #d6e2e0; }
.cover-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.cover-go, .cover-alt { min-height: 44px; padding: 0 20px; border-radius: 999px; font: 800 15px/1 var(--body); cursor: pointer; }
.cover-go { background: var(--ember); color: var(--ember-ink); border: 0; }
.cover-go:hover { filter: brightness(1.08); }
.cover-alt { background: rgba(4, 12, 14, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.cover-alt:hover { border-color: var(--sun); color: var(--sun); }
.cover-go:focus-visible, .cover-alt:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.cover-ask .cover-thumb { display: none; }
@media (prefers-reduced-motion: reduce) { .cover-spin { animation-duration: 2s; } }

/* ---------- game grids on the other pages (categories, moods, new, hot, all games, search, hearts) ---------- */
/* As on the home page, the name stays off the picture and shows as a sun-coloured tag under the card on hover. */
.playroom-site .grid .card-t {
  position: absolute; left: 50%; right: auto; top: calc(100% + 9px); bottom: auto; z-index: 6;
  display: block; width: max-content; max-width: min(260px, 130%); max-height: none; padding: 6px 12px; border-radius: 999px;
  background: var(--sun); color: var(--sun-ink); font: 800 13px/1.25 var(--body); letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45); opacity: 0; transform: translate(-50%, -4px); pointer-events: none;
  transition: opacity .16s, transform .22s ease-out;
}
.playroom-site .grid .card-t::before { content: ""; position: absolute; left: 50%; top: -5px; width: 10px; height: 10px; margin-left: -5px; background: var(--sun); transform: rotate(45deg); border-radius: 2px; }
.playroom-site .grid .tile:hover, .playroom-site .grid .tile:focus-within { z-index: 5; }
.playroom-site .grid .tile:hover .card-t, .playroom-site .grid .tile:focus-within .card-t { opacity: 1; transform: translate(-50%, 0); transition-delay: 70ms; }
@media (hover: none) { .playroom-site .grid .card-t { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .playroom-site .grid .card-t { transition: none; transform: translate(-50%, 0); } }
/* The card has to let the tag out; its picture already has round corners of its own. */
.playroom-site .grid .card { overflow: visible; border-radius: 18px; }

/* ---------- names are shown whole, never cut with "…" ---------- */
/* Other pages: the yellow tag under the card wraps long names onto more lines, in a slightly smaller font. */
.playroom-site .grid .card-t {
  width: max-content; max-width: 210px; padding: 6px 12px; border-radius: 14px;
  white-space: normal; overflow: visible; text-overflow: clip; text-align: center; text-wrap: balance;
  font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere;
  display: block; -webkit-line-clamp: unset; -webkit-box-orient: unset; max-height: none;
}
/* Home grid: the name inside the picture wraps too, with the font sized to the tile, so small tiles fit
   the whole name. A soft shade behind the bottom of the picture keeps the extra lines readable. */
.tilegrid .card-t, .tilegrid .tg-2 .card-t, .tilegrid .tile.big .card-t {
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; text-wrap: balance;
}
.tilegrid .tg-1 .card-t { left: 6px; right: 6px; bottom: 6px; font-size: 10.5px; line-height: 1.25; }
.tilegrid .tg-2 .card-t { font-size: 13px; line-height: 1.3; }
.tilegrid .tile.big .card-t { left: 12px; right: 12px; bottom: 12px; font-size: 16px; line-height: 1.3; }
.tilegrid .card::before { content: ""; position: absolute; inset: 40% 0 0; z-index: 1; border-radius: 0 0 var(--r-card) var(--r-card); background: linear-gradient(transparent, rgba(4, 12, 14, .75)); opacity: 0; transition: opacity .16s; pointer-events: none; }
.tilegrid .tile:hover .card::before, .tilegrid .tile:focus-within .card::before { opacity: 1; }
@media (hover: none), (pointer: coarse), (max-width: 700px) { .tilegrid .card::before { opacity: 1; } }

/* =====================================================================================================
   Home page review (canvas "BrovyGames Home Review"): games first on every device.
   ===================================================================================================== */

/* 1. One category row on every screen, swiped sideways when it doesn't fit, so no name is ever cut.
      Brovy Magic leads the row as a highlighted pill instead of a tall card beside it. */
.tg-discovery-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; min-width: 0; }
.tg-discovery-bar .tg-chips { flex: 1; min-width: 0; display: flex; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 2px 0; border-radius: 0; background: none; border: 0; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; scroll-snap-type: none; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
[dir=rtl] .tg-discovery-bar .tg-chips { -webkit-mask: linear-gradient(270deg, #000 calc(100% - 28px), transparent); mask: linear-gradient(270deg, #000 calc(100% - 28px), transparent); }
.tg-discovery-bar .tg-chips::-webkit-scrollbar { display: none; }
.tg-discovery-bar .tg-chip { flex: none; min-width: 0; min-height: 40px; padding: 0 14px; border-radius: 999px; }
.tg-discovery-bar .tg-chip span { overflow: visible; text-overflow: clip; }
.tg-discovery-bar .tg-chip svg { width: 18px; height: 18px; }
.tg-discovery-bar .brovy-magic { order: -1; flex: none; flex-direction: row; gap: 6px; min-height: 40px; height: 40px; padding: 0 14px 0 6px; border: 1.5px solid var(--sun); border-radius: 999px; background: #1d2a1f; color: var(--sun); font: 800 14px/1 var(--body); }
.tg-discovery-bar .brovy-magic-character { width: 30px; height: 30px; }
.tg-discovery-bar .brovy-magic:hover { background: #2a3a25; }

/* 2. Phones and tablets: the tile size comes from the page width, so the grid fills the page edge to edge
      and lines up with the category row. Desktop keeps its fixed 94 px tiles. */
@supports (width: 1cqw) {
  .tg-wrap { container-type: inline-size; }
  @media (max-width: 480px) { .tg-wrap { --tg: calc((100cqw - 3 * var(--tg-gap)) / 4); } }
  @media (min-width: 481px) and (max-width: 700px) { .tg-wrap { --tg-gap: 10px; --tg: calc((100cqw - 5 * var(--tg-gap)) / 6); } }
  @media (min-width: 701px) and (max-width: 1100px) { .tg-wrap { --tg-gap: 10px; --tg: calc((100cqw - 6 * var(--tg-gap)) / 7); padding: 16px 16px 0; } }
}

/* 3. The hero: a short banner on phones (two rows), full width and two rows on tablets. */
@media (max-width: 700px) {
  .tg-hero { grid-row: span 2; }
  .tg-hero::before { background: linear-gradient(90deg, rgba(11, 21, 24, .92) 0, rgba(11, 21, 24, .55) 50%, rgba(11, 21, 24, 0) 75%); }
  .tg-hero-art { object-position: 62% 28%; }
  .tg-hero-copy { top: 0; width: 64%; justify-content: center; padding: 10px 14px; gap: 8px; }
  .tg-hero-copy h1 { font-size: 20px; }
  .tg-hero-copy .playroom-cta { min-height: 40px; padding: 8px 16px; font-size: 14px; }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .tg-hero { grid-column: 1 / -1; grid-row: span 2; }
  .tg-hero-copy { width: 50%; padding: 16px 24px; }
  .tg-hero-copy h1 { font-size: 28px; }
}

/* 4. Phones: a two-line cookie bar with the buttons beside the text, about half its old height. */
.cookie-short { display: none; }
@media (max-width: 640px) {
  .cookie-bar { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; }
  .cookie-bar .cookie-long { display: none; }
  .cookie-bar .cookie-short { display: inline; }
  .cookie-bar p { font-size: 12.5px; line-height: 1.35; }
  .cookie-b { flex-direction: row; gap: 6px; }
  .cookie-b .btn-s { min-height: 40px; padding: 0 12px; font-size: 13px; }
  .cookie-b .btn-s[data-c="1"] { background: var(--sun); color: var(--sun-ink); box-shadow: none; }
}
/* Phones: the banner shows the whole scene with Brovy on the right; the words sit on the dark left. */
@media (max-width: 700px) {
  .tg-hero-art { object-position: 80% 50%; }
  .tg-hero-copy { width: 50%; padding: 10px 12px; }
  .tg-hero-copy .playroom-cta { white-space: nowrap; min-height: 40px; padding: 0 14px; font-size: 13.5px; gap: 6px; }
  .tg-hero-copy .playroom-cta svg { width: 16px; height: 16px; }
}

/* =====================================================================================================
   Home page review, part 2: the categories and the article at the bottom.
   ===================================================================================================== */

/* Categories get a visible heading, and a grid of their own that always fills the row evenly. */
.tg-cats-h { margin: 34px 0 12px; font: 800 22px/1.25 var(--head); color: var(--text); }
.tilegrid.tg-cats { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-auto-rows: 94px; justify-content: stretch; margin-top: 0; }
.tilegrid.tg-cats li { grid-column: auto; grid-row: auto; }
@media (min-width: 701px) and (max-width: 1100px) { .tilegrid.tg-cats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: 84px; } }
/* Phones: three small cards a row, the picture above its name and count, instead of 15 full-width rows. */
@media (max-width: 700px) {
  .tg-cats-h { margin: 26px 0 10px; font-size: 19px; }
  .tilegrid.tg-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; gap: 8px; }
  .tilegrid.tg-cats li { grid-column: auto; }
  .tg-cat { flex-direction: column; align-items: stretch; gap: 0; height: auto; padding: 0 0 8px; text-align: center; }
  .tg-cat img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .tg-cat span { align-items: center; padding: 6px 4px 0; gap: 1px; }
  .tg-cat strong { font-size: 13.5px; }
  .tg-cat small { font-size: 11px; }
  .tg-cat:hover { transform: none; }
}

/* The article: comfortable line length on wide screens (about 70 characters). */
.home-article .guide { max-width: 60ch; }
/* Phones: folded to its first part with a soft fade, until "Read more" opens it. */
.home-article .guide.is-folded { max-height: 520px; overflow: hidden; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
.article-more { display: flex; margin: 4px auto 18px; }

/* ---------- Brovy Magic, following the visitor ---------- */
/* A small round Brovy in the bottom corner (the far side in Arabic); on wide screens it carries its name too.
   It fades and lifts in, and never covers more than one tile's corner. */
.magic-float { position: fixed; z-index: 70; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 6px; border: 2px solid var(--sun); border-radius: 999px; background: #1d2a1f; color: var(--sun); font: 800 14px/1 var(--body); box-shadow: 0 10px 26px rgba(0, 0, 0, .55); cursor: pointer; opacity: 0; transform: translateY(12px) scale(.9); transition: opacity .2s, transform .25s cubic-bezier(.34, 1.56, .64, 1), bottom .2s; }
[dir=rtl] .magic-float { right: auto; left: 16px; }
.magic-float.on { opacity: 1; transform: none; }
.magic-float[hidden] { display: none; }
.magic-float img { width: 44px; height: 44px; object-fit: contain; pointer-events: none; }
.magic-float-label { padding-inline-end: 10px; }
.magic-float:hover { background: #2a3a25; }
.magic-float:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.magic-float.is-casting img { animation: brovy-cast .7s ease-in-out; }
@media (max-width: 700px) {
  .magic-float { width: 56px; padding: 0; justify-content: center; }
  .magic-float-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .magic-float { transition: opacity .2s; transform: none; } .magic-float.is-casting img { animation: none; } }

/* A single short spell on activation; the mascot stays still between taps. */
.brovy-magic, .magic-float { position: relative; isolation: isolate; }
.magic-float { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.brovy-magic::after, .magic-float::after {
  content: '✦'; position: absolute; inset-inline-start: 22px; top: 1px;
  color: #fff2bd; font-size: 17px; line-height: 1; pointer-events: none;
  opacity: 0; text-shadow: 14px 9px 0 var(--sun), -10px 16px 0 #fff2bd;
}
.brovy-magic.is-casting::after, .magic-float.is-casting::after { animation: magic-sparkle .7s ease-out; }
.magic-float:disabled { cursor: progress; }
.magic-hint {
  position: absolute; bottom: calc(100% + 12px); inset-inline-end: 0;
  width: max-content; max-width: min(240px, calc(100vw - 40px));
  padding: 11px 14px; border: 1px solid #786030; border-radius: 12px;
  background: #173332; color: #fff2bd; box-shadow: 0 6px 20px #0005;
  font: 600 13px/1.5 var(--body); text-align: start; pointer-events: none;
}
.magic-hint[hidden] { display: none; }
.tg-discovery-bar .brovy-magic { min-height: 44px; height: 44px; }
.tg-discovery-bar .brovy-magic-character { width: 36px; height: 36px; }
@keyframes magic-sparkle {
  0% { opacity: 0; transform: translateY(5px) scale(.5); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-14px) scale(1.2) rotate(18deg); }
}
@media (prefers-reduced-motion: reduce) {
  .brovy-magic.is-casting::after, .magic-float.is-casting::after { animation: none; }
  .magic-float { transition: none; }
}

/* ---------- "Play next" cards: names styled like the home page cards ---------- */
/* Plain white lettering on the picture over a soft shade, wrapping instead of being cut, no box behind it.
   On a computer the name shows on hover or keyboard focus; on phones and touch screens it is always there. */
.playroom-site .side-grid .card { overflow: hidden; }
.playroom-site .side-grid .card-t {
  position: absolute; left: 12px; right: 12px; top: auto; bottom: 10px; z-index: 2;
  display: block; width: auto; max-width: none; max-height: none; padding: 0; border-radius: 0;
  background: none; box-shadow: none; color: #fff; font: 700 15px/1.3 var(--body); letter-spacing: 0; text-align: start;
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; text-wrap: balance;
  text-shadow: 0 1px 3px #000, 0 0 5px rgba(0, 0, 0, .8);
  opacity: 0; transition: opacity .16s; pointer-events: none;
}
.playroom-site .side-grid .card::before { content: ""; position: absolute; inset: 35% 0 0; z-index: 1; background: linear-gradient(transparent, rgba(4, 12, 14, .78)); opacity: 0; transition: opacity .16s; pointer-events: none; }
.playroom-site .side-grid .tile:hover .card-t, .playroom-site .side-grid .tile:focus-within .card-t,
.playroom-site .side-grid .tile:hover .card::before, .playroom-site .side-grid .tile:focus-within .card::before { opacity: 1; }
@media (hover: none), (pointer: coarse), (max-width: 700px) {
  .playroom-site .side-grid .card-t, .playroom-site .side-grid .card::before { opacity: 1; }
}
/* Several "Play next" cards side by side (tablets, phones) are small, so their names are too. */
@media (max-width: 1100px) { .playroom-site .gm .gm-side .side-grid .card-t { left: 8px; right: 8px; bottom: 7px; font-size: 12.5px; line-height: 1.25; } }
@media (prefers-reduced-motion: reduce) { .playroom-site .side-grid .card-t, .playroom-site .side-grid .card::before { transition: none; } }

/* ---------- game grids on the other pages: names styled like the home page cards ---------- */
/* Replaces the yellow tag under the card (all games, categories, moods, new, hot, search, hearts): plain white
   lettering on the picture over a soft shade, wrapping instead of being cut; on hover on a computer, always on touch. */
.playroom-site .grid .card { overflow: hidden; }
.playroom-site .grid .card-t {
  position: absolute; left: 12px; right: 12px; top: auto; bottom: 10px; z-index: 2;
  display: block; width: auto; max-width: none; max-height: none; padding: 0; border-radius: 0;
  background: none; box-shadow: none; color: #fff; font: 700 15px/1.3 var(--body); letter-spacing: 0; text-align: start;
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; text-wrap: balance;
  text-shadow: 0 1px 3px #000, 0 0 5px rgba(0, 0, 0, .8);
  opacity: 0; transform: none; transition: opacity .16s; pointer-events: none;
}
.playroom-site .grid .card-t::before { content: none; display: none; }
.playroom-site .grid .card::before { content: ""; position: absolute; inset: 35% 0 0; z-index: 1; background: linear-gradient(transparent, rgba(4, 12, 14, .78)); opacity: 0; transition: opacity .16s; pointer-events: none; }
.playroom-site .grid .tile:hover .card-t, .playroom-site .grid .tile:focus-within .card-t,
.playroom-site .grid .tile:hover .card::before, .playroom-site .grid .tile:focus-within .card::before { opacity: 1; transform: none; }
@media (hover: none), (pointer: coarse), (max-width: 700px) {
  .playroom-site .grid .card-t, .playroom-site .grid .card::before { opacity: 1; }
}
@media (max-width: 700px) { .playroom-site .grid .card-t { left: 8px; right: 8px; bottom: 7px; font-size: 13px; line-height: 1.25; } }
@media (prefers-reduced-motion: reduce) { .playroom-site .grid .card-t, .playroom-site .grid .card::before { transition: none; } }

/* ---------- category pages: the article under the games ---------- */
.cat-article .guide { text-align: start; max-width: 60ch; margin: 30px auto 10px; }
.cat-article .guide h2 { font: 800 20px/1.3 var(--head); margin: 24px 0 8px; }
.cat-article .guide p { margin-inline: 0; max-width: none; }
.cat-article .guide ul { padding-inline-start: 1.2em; }
.cat-article .faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.cat-article .faq summary { cursor: pointer; font-weight: 700; }
.cat-article .faq p { margin-top: 6px; }
.cat-article .guide.is-folded { max-height: 520px; overflow: hidden; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
