/* Layout for the web player. Sizes are in rem where 1rem equals 1dp of the TV app (960x540 dp at 1080p), so the page
   looks like the TV app at any 16:9 window size. Colours and radii come from shared/tokens.css (generated). */
html { font-size: calc(min(100vh, 56.25vw) / 540); background: var(--gb-background); }
@media (max-aspect-ratio: 1/1), (max-width: 720px) { html { font-size: calc(100vw / 480); } }
body { margin: 0; min-height: 100vh; background: var(--gb-background); color: var(--gb-foreground); font: 16rem/1.4 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
.page { padding: 32rem 64rem 26rem; max-width: 960rem; margin: 0 auto; box-sizing: border-box; }
.topline { display: flex; align-items: center; gap: 16rem; }
.btn.back { min-height: 44rem; min-width: 44rem; width: 44rem; padding: 0; }
.brand { color: var(--gb-brand); font-weight: 700; font-size: 15rem; }
.muted { color: var(--gb-muted); }
.masthead { display: flex; align-items: center; gap: 12rem; }
.masthead .title { flex: 1; }
.masthead h1 { margin: 6rem 0 2rem; font-size: 36rem; }
.avatar { width: 42rem; height: 42rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 16rem; background: linear-gradient(135deg, var(--gb-accent), #1AB7A6); margin-right: 2rem; }
h2 { font-size: 23rem; margin: 16rem 0 8rem; }

/* every focusable thing shows one white ring, like the TV app */
.btn, .card, .tile, .chip { outline: none; cursor: pointer; }
.btn:focus-visible, .card:focus-visible, .tile:focus-visible, .chip:focus-visible,
.btn:focus, .card:focus, .tile:focus, .chip:focus { box-shadow: 0 0 0 var(--gb-focus-ring-width) var(--gb-focus-ring); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52rem; padding: 0 20rem; border: 0; border-radius: var(--gb-radius-button); background: var(--gb-button); color: #fff; font: 700 18rem/1 inherit; font-family: inherit; }
.btn:focus, .btn:hover { background: var(--gb-button-focus); }
.btn[disabled] { opacity: .38; pointer-events: none; }
.btn.icon { width: 58rem; padding: 0; font-size: 25rem; }
.icon-svg { display: block; width: 22rem; height: 22rem; flex: 0 0 auto; }
.btn.back .icon-svg { width: 20rem; height: 20rem; margin: 0; }
.btn.wide { min-width: 120rem; }

.tiles { display: flex; gap: 12rem; overflow-x: auto; padding: 6rem; margin: 0 -6rem; scrollbar-width: none; }
.tile { flex: 0 0 auto; width: 240rem; box-sizing: border-box; padding: 7rem 7rem 5rem; border-radius: var(--gb-radius-card); background: var(--gb-card); display: block; }
.tile:focus { background: var(--gb-card-focus); }
.tile .name { margin-top: 6rem; font-size: 17rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10rem; padding: 14rem 6rem 8rem; margin: 0 -6rem; }
.card { display: flex; align-items: center; gap: 14rem; height: 126rem; box-sizing: border-box; padding: 10rem 14rem 10rem 12rem; border-radius: var(--gb-radius-card); background: var(--gb-card); min-width: 0; }
.card:focus { background: var(--gb-card-focus); }
.card .info { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4rem; }
.card .t { font-size: 18rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .l { font-size: 13rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 5rem; min-width: 0; }
.card-filter { max-width: 100%; padding: 2rem 9rem; overflow: hidden; border: 0; border-radius: 999rem; background: var(--gb-button); color: #fff; font-family: inherit; font-size: 12rem; font-weight: 600; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.card-filter:hover, .card-filter:focus-visible { background: var(--gb-button-focus); outline: 2rem solid var(--gb-focus-ring); outline-offset: 1rem; }
.card-stats { color: var(--gb-muted); }
.cover { position: relative; overflow: hidden; border-radius: 12rem; background: var(--gb-cover-0); aspect-ratio: 16/9; display: grid; place-items: center; text-align: center; font-weight: 700; flex: 0 0 auto; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover span { padding: 0 8rem; font-size: 18rem; text-shadow: 0 1rem 4rem rgba(0,0,0,.5); }
.tile .cover { width: 220rem; }
.card .cover { width: 176rem; }
.pager { display: flex; align-items: center; gap: 18rem; margin: 6rem 0; }
.pager .label { min-width: 150rem; text-align: center; font-size: 17rem; }
.hint { font-size: 14rem; margin-top: 8rem; }

.loading-state { display: flex; align-items: center; justify-content: center; gap: 14rem; color: var(--gb-foreground); font-size: 17rem; }
.loading-spinner { width: 42rem; height: 42rem; flex: 0 0 auto; border: 4rem solid var(--gb-border); border-top-color: var(--gb-brand); border-radius: 50%; animation: gamebay-spin .85s linear infinite; }
.loading-label { color: var(--gb-muted); }
.loading-screen { position: fixed; inset: 0; z-index: 100; flex-direction: column; background: radial-gradient(ellipse at 50% 42%, var(--gb-page-glow-a), transparent 58%), var(--gb-background); }
.loading-inline { position: fixed; inset: 64px 0 44px; z-index: 30; min-height: 0; padding: 24rem; flex-direction: column; background: radial-gradient(ellipse at 50% 42%, var(--gb-page-glow-a), transparent 58%), var(--gb-background); }
.loading-overlay { position: absolute; inset: 0; z-index: 2; flex-direction: column; background: var(--gb-background); }
.loading-state[hidden] { display: none; }
.page-transition { inset: 64px 0 44px; z-index: 30; }
@keyframes gamebay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation: none; } }

.hero { display: flex; gap: 28rem; align-items: center; padding: 16rem 0 12rem; }
.hero .cover { width: 360rem; border-radius: var(--gb-radius-card); }
.hero h1 { font-size: 38rem; margin: 0 0 6rem; }
.hero .facts { font-size: 17rem; }
.hero .desc { font-size: 20rem; margin: 14rem 0 12rem; }
.actions { display: flex; gap: 16rem; padding: 12rem 0; flex-wrap: wrap; }
.note { font-size: 15rem; margin-top: 10rem; max-width: 720rem; }
.brandline { color: var(--gb-brand); }

.filter-row { padding-bottom: 10rem; }
.filter-row .row-title { margin: 0 0 6rem; font-size: 17rem; color: var(--gb-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10rem; padding: 4rem; margin: -4rem; }
.chip { min-height: 52rem; min-width: 96rem; padding: 0 16rem; border: 0; border-radius: var(--gb-radius-button); background: var(--gb-button); color: #fff; font: 17rem/1 inherit; font-family: inherit; }
.chip:focus, .chip:hover { background: var(--gb-button-focus); }
.chip.on { color: #fff; box-shadow: inset 0 0 0 2rem var(--gb-brand); }  /* white text: the teal label failed contrast on the purple chip */
.screen-title { margin: 0; font-size: 30rem; }
.actions-row { display: flex; gap: 14rem; padding-top: 6rem; }
.empty { padding: 40rem 0 10rem; font-size: 24rem; font-weight: 700; }

/* player */
body.player { background: #000; overflow: hidden; overscroll-behavior: none; }
.bar { display: flex; align-items: center; gap: 12rem; padding: 8rem 16rem; background: var(--gb-background); }
.bar .name { flex: 1; font-weight: 700; font-size: 17rem; }
.stage { position: relative; display: grid; place-items: center; width: 100vw; height: calc(100vh - 118rem); background: #000; }
.stage iframe { border: 0; background: #000; aspect-ratio: 16/9; width: min(100vw, calc((100vh - 118rem) * 16 / 9)); height: auto; max-height: 100%; }
.stage:fullscreen { height: 100vh; }
.stage:fullscreen iframe { width: min(100vw, calc(100vh * 16 / 9)); }
.keys { padding: 6rem 16rem 10rem; font-size: 14rem; background: var(--gb-background); }

@media (max-aspect-ratio: 1/1), (max-width: 720px) {
  .page { padding: 20rem 16rem; } .grid { grid-template-columns: 1fr; } .hero { flex-direction: column; align-items: flex-start; }
  .hero .cover { width: 100%; } .card { height: auto; } .card .cover { width: 120rem; }
  .page-transition, .loading-inline { inset: 60px 0 40px; }
  /* fingers need at least 44 CSS px, whatever the page is scaled to */
  .btn, .chip { min-height: max(44px, 52rem); } .card-filter { min-height: 44px; padding-inline: 12px; }
  .btn.back { min-height: 44px; } .btn.icon { min-width: 44px; width: max(44px, 58rem); }
}

/* Library shell: fixed menu, quiet arcade atmosphere, remote-friendly left drawer. */
body.library-shell { isolation: isolate; background: radial-gradient(ellipse at 80% 4%, var(--gb-page-glow-a), transparent 48%), radial-gradient(ellipse at 0% 65%, var(--gb-page-glow-b), transparent 52%), var(--gb-background); background-attachment: fixed; }
.library-shell::before { content: ''; position: fixed; inset: 0; pointer-events: none; background-image: radial-gradient(circle, #b7c5f038 1px, transparent 1px); background-size: 83px 83px; opacity: .38; z-index: -1; }
.library-shell .page { padding-top: 82px; padding-left: 110rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.brand-slot { width: 24rem; height: 24rem; }
.library-shell .filter-toggle { position: fixed; left: 12rem; top: 50%; transform: translateY(-50%); z-index: 21; width: auto; min-width: 84rem; min-height: 44rem; padding: 0 10rem; gap: 7rem; font-size: 14rem; background: var(--gb-filter-background); border: 1px solid var(--gb-filter-border); }
.library-shell .filter-toggle .icon-svg { width: 22rem; height: 22rem; }
.library-shell .filter-toggle .filter-label { white-space: nowrap; }
.library-shell .filter-toggle[data-active="true"] { color: var(--gb-brand); }
.library-shell .filter-toggle .active-dot { position: absolute; width: 6rem; height: 6rem; top: 8rem; right: 8rem; border-radius: 50%; background: var(--gb-brand); }
.library-shell .card, .library-shell .tile { border: 1px solid var(--gb-card-border); background: var(--gb-card-background); }
.library-shell .card:hover, .library-shell .tile:hover, .library-shell .card:focus, .library-shell .tile:focus { background: var(--gb-card-hover); }
.active-filter { margin-bottom: 12rem; font-size: 15rem; }
.filter-scrim { position: fixed; inset: 64px 0 0; z-index: 19; border: 0; background: var(--gb-filter-scrim); }
.filter-panel { position: fixed; z-index: 30; inset: 64px auto 0 0; width: min(390rem, 92vw); box-sizing: border-box; background: var(--gb-filter-panel); border-right: 1px solid var(--gb-filter-panel-border); overflow-y: auto; box-shadow: 20px 0 90px #0006; }
.filter-body { padding: 26rem 22rem; }
.filter-body .topline { margin-bottom: 22rem; }
.filter-body .screen-title { font-size: 25rem; }
.filter-body .actions-row { flex-direction: column; }
.filter-body .actions-row .btn { min-width: 0 !important; width: 100%; }
.filter-body .chip { min-width: 76rem; min-height: 42rem; font-size: 15rem; }
.library-shell :is(a, button) { scroll-margin-top: max(90rem, 80px); }
@media (max-aspect-ratio: 1/1), (max-width: 720px) {
  .library-shell .page { padding-top: 76px; padding-left: 92rem; }
  .site-header { padding: 0 14px; }
  .brand-slot { width: 0; }
  .library-shell .filter-toggle { min-width: 76rem; min-height: 44px; left: 3rem; }
  .filter-body { padding: 22rem 16rem; }
  .filter-body .chip { min-height: 44px; }
}

.favorites-shell { min-height: 100vh; background: radial-gradient(ellipse at 80% 4%, var(--gb-page-glow-a), transparent 48%), radial-gradient(ellipse at 0% 65%, var(--gb-page-glow-b), transparent 52%), var(--gb-background); }
.favorites-shell #app { max-width: 1120px; margin: 0 auto; padding: 64px 32px 24px; }
.favorites-shell .page { padding-top: 16px; }
.favorites-shell .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.player #app { padding-top: 64px; }
.has-site-shell:not(.player) #app { padding-top: 64px; }
.game-detail.page { max-width: 1180px; padding: 26px clamp(16px, 4vw, 48px) 28px; }
.detail-library-link { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 8px; color: var(--gb-muted); font-size: 15px; font-weight: 600; text-decoration: none; }
.detail-library-link:hover { color: var(--gb-brand); }
.detail-library-link:focus-visible { outline: 2px solid var(--gb-focus-ring); outline-offset: 3px; border-radius: 4px; }
.detail-title { margin: 0 0 10px; color: var(--gb-foreground); font-size: clamp(28px, 3.6vw, 38px); font-weight: 750; letter-spacing: -.025em; line-height: 1.2; }
.game-bar { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 1180px; min-height: clamp(56px, 6vh, 68px); margin: 0 auto; padding: 6px clamp(16px, 4vw, 48px); box-sizing: border-box; background: var(--gb-background); border-bottom: 1px solid var(--gb-header-border); }
.game-bar .btn.back { flex: 0 0 auto; }
.game-bar .btn.back { box-sizing: border-box; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; }
.game-bar .btn.back .icon-svg { width: 20px; height: 20px; }
.game-page-title { flex: 1; min-width: 0; margin: 0; padding-left: 14px; overflow: hidden; border-left: 1px solid var(--gb-header-border); color: var(--gb-foreground); font-size: clamp(18px, 2.4vh, 22px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.game-fullscreen { flex: 0 0 auto; min-height: 44px; padding-inline: 16px; font-size: 15px; }
.game-info { min-width: 0; }
.game-info .brandline { margin-top: 8rem; }
.game-traits, .game-stats { margin-top: 8px; font-size: 14px; }
.game-enter { min-width: 180px; }
.game-actions { align-items: center; }
.game-favorite { min-width: 140px; }
.game-favorite.active { background: var(--gb-accent); }
.game-rating { display: inline-flex; align-items: center; gap: 3px; min-height: 44px; padding: 0 10px; border-radius: var(--gb-radius-button); background: var(--gb-card); }
.game-rating-label { margin-right: 5px; color: var(--gb-muted); font-size: 14px; white-space: nowrap; }
.game-rating-star { width: 28px; height: 36px; padding: 0; border: 0; background: transparent; color: var(--gb-muted); font: inherit; font-size: 22px; cursor: pointer; }
.game-rating-star:hover, .game-rating-star:focus-visible, .game-rating-star.selected { color: #f5b942; }
.game-rating-star:focus-visible { outline: 2px solid var(--gb-focus-ring); border-radius: 4px; }
.game-launch-state { position: absolute; inset: 0; z-index: 2; flex-direction: column; background: var(--gb-background); }
.game-preload-stage { position: fixed; top: 64px; left: -100vw; width: 100vw; height: calc(100vh - 108px); opacity: 0; pointer-events: none; }
.player { display: flex; height: 100vh; min-height: 0; flex-direction: column; overflow: hidden; }
.player #app { display: flex; flex: 1 1 auto; flex-direction: column; width: 100%; height: calc(100vh - 44px); min-height: 0; padding-top: 64px; box-sizing: border-box; }
.player .game-bar { flex: 0 0 auto; }
.player .stage { display: flex; flex: 1 1 auto; align-items: stretch; justify-content: stretch; width: 100%; height: auto; min-height: 0; background: #000; }
.player .stage iframe { display: block; flex: 1 1 auto; width: 100%; height: 100%; min-width: 0; min-height: 0; max-height: none; aspect-ratio: auto; }
.player .stage:fullscreen { width: 100vw; height: 100vh; }
.player .stage:fullscreen iframe { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }
.player .site-footer { flex: 0 0 44px; box-sizing: border-box; height: 44px; min-height: 44px; margin-top: 0; padding: 0 16px; background: var(--gb-background); font-size: 12px; }
@supports (height: 100dvh) {
  .player { height: 100dvh; }
  .player #app { height: calc(100dvh - 44px); }
}
@media (max-width: 720px) {
  .favorites-shell #app { padding: 60px 16px 20px; }
  .favorites-shell .grid { grid-template-columns: 1fr; }
  .game-detail.page { padding: 18px 14px 24px; }
  .detail-title { margin-bottom: 6px; }
  .game-bar { gap: 8px; padding-inline: 14px; }
  .game-page-title { padding-left: 10px; }
  .game-rating { gap: 0; padding-inline: 6px; }
  .game-rating-label { font-size: 12px; margin-right: 2px; }
  .game-rating-star { width: 24px; font-size: 19px; }
  .player #app { padding-top: 60px; height: 100vh; }
  .player .site-footer { display: none; }
  @supports (height: 100dvh) {
    .player #app { height: 100dvh; }
  }
}

body.mobile-game-fullscreen { overflow: hidden; }
body.mobile-game-fullscreen .site-header,
body.mobile-game-fullscreen .game-bar,
body.mobile-game-fullscreen .site-footer { visibility: hidden; }
body.mobile-game-fullscreen .stage { position: fixed; inset: 0; z-index: 60; width: 100vw; height: 100vh; }
body.mobile-game-fullscreen .stage iframe { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }
body.mobile-game-fullscreen .game-fullscreen { position: fixed; z-index: 70; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); min-height: 44px; padding-inline: 12px; opacity: .86; }
@supports (height: 100dvh) {
  body.mobile-game-fullscreen .stage { height: 100dvh; }
}

/* Rankings on the game page (gb.score phase 2) */
.game-rankings { display: flex; flex-wrap: wrap; gap: 24px; margin: 8px 0 4px; }
.game-rankings[hidden] { display: none; }
.game-rankings-title { flex: 0 0 100%; margin: 18px 0 0; font-size: 22px; }
.ranking-loading, .ranking-message { flex: 1 1 100%; justify-content: flex-start; margin: 0; }
.ranking-retry { min-height: 40px; padding-inline: 16px; font-size: 14px; }
.ranking { flex: 1 1 300px; max-width: 480px; }
.ranking h2 { margin: 0 0 8px; font-size: 20px; }
.ranking-list { list-style: none; margin: 0; padding: 0; }
.ranking-list li { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 8px; padding: 6px 10px; border-radius: 8px; }
.ranking-list li:nth-child(odd) { background: color-mix(in srgb, var(--gb-foreground) 6%, transparent); }
.ranking-list li.me { outline: 2px solid var(--gb-accent); }
.ranking-list .rank { font-variant-numeric: tabular-nums; opacity: .7; }
.ranking-list .value { font-variant-numeric: tabular-nums; font-weight: 600; }
.ranking .place { margin: 8px 0 0; }

/* The left gutter is only needed while the filter button is there. */
.library-shell:not(:has(.filter-toggle)) .page { padding-left: 64rem; }
@media (max-aspect-ratio: 1/1), (max-width: 720px) { .library-shell:not(:has(.filter-toggle)) .page { padding-left: 16rem; } }

/* Notice for a game that needs a keyboard or gamepad when the visitor is on a phone. */
.touch-note { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--gb-card-hover, rgba(255,255,255,.08)); color: var(--gb-foreground); font-size: 15px; line-height: 1.5; }
.game-report { background: transparent; border: 1px solid var(--gb-border); color: var(--gb-foreground); }

/* 我的反馈 (js/feedback.js) */
.feedback-page h1 { font-size: 28px; }
.ticket-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticket-row { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; text-align: left; padding: 14px 16px; border-radius: 14px; font: inherit; color: inherit;
  border: 1px solid var(--gb-border); background: var(--gb-card); cursor: pointer; }
.ticket-main { display: flex; align-items: center; gap: 8px; }
.ticket-meta { grid-column: 1; font-size: 14px; }
.ticket-row .ticket-status { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.ticket-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5a6e; display: inline-block; }
.ticket-status { padding: 3px 10px; border-radius: 999px; font-size: 13px; background: var(--gb-card-focus); }
.ticket-open { background: #2f5fd0; color: #fff; } .ticket-in_progress { background: #8a5cd6; color: #fff; }
.ticket-replied { background: #1f8a5b; color: #fff; } .ticket-closed { background: transparent; border: 1px solid var(--gb-border); }
.ticket-thread { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticket-message { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--gb-border); background: var(--gb-card); max-width: 720px; }
.ticket-message.from-staff { border-color: var(--gb-brand); } .ticket-message.from-system { background: transparent; font-size: 14px; }
.ticket-who { font-size: 13px; margin-bottom: 4px; } .ticket-body { white-space: pre-wrap; line-height: 1.6; word-break: break-word; }
.ticket-actions { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; } .ticket-error { color: #ff8a9a; }
.feedback-page .report-field { max-width: 720px; background: var(--gb-card); color: var(--gb-foreground); border: 1px solid var(--gb-border); border-radius: 10px; padding: 10px 12px; font: inherit; }

/* Developer page (js/developer.js) */
.developer-page h1 { margin: 0 0 4px; font-size: 30px; } .developer-page h2 { margin: 24px 0 10px; font-size: 20px; }
.dev-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dev-avatar { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; font-weight: 700; background: var(--gb-button); color: #fff; }
.dev-info { flex: 1; min-width: 180px; } .dev-line { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.dev-site { color: var(--gb-brand); word-break: break-all; } .dev-actions { display: flex; gap: 10px; }
.dev-follow.active { background: transparent; border: 1px solid var(--gb-border); color: var(--gb-foreground); }
.dev-bio { margin: 16px 0 0; line-height: 1.7; white-space: pre-wrap; max-width: 720px; } .dev-members { margin: 8px 0 0; }
.dev-link { color: inherit; text-decoration: underline; text-decoration-color: var(--gb-border); text-underline-offset: 3px; }

/* Player page (js/user.js) */
.user-avatar { font-size: 36px; background: var(--gb-card-focus); }
.user-section { margin: 24px 0 0; } .user-section h2 { margin: 0 0 10px; font-size: 20px; }
.user-ranks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; line-height: 1.6; }
.user-private-note { display: block; margin: 0 0 8px; font-size: 14px; }
.user-link { color: inherit; text-decoration: underline; text-decoration-color: var(--gb-border); text-underline-offset: 3px; }
.ticket-tabs { display: flex; gap: 10px; margin: 12px 0 0; flex-wrap: wrap; }
.ticket-tabs .tab { background: transparent; border: 1px solid var(--gb-border); color: var(--gb-foreground); }
.ticket-tabs .tab.active { background: var(--gb-button); border-color: transparent; color: #fff; }
.ticket-context { margin: 8px 0 0; font-size: 14px; color: var(--gb-muted); } .ticket-context ul { margin: 6px 0 0; padding-left: 20px; word-break: break-all; }

/* GameBay web refresh: deep-sea surfaces, crisp blue actions and restrained pixel-grid texture. */
body.library-shell {
  background:
    radial-gradient(ellipse at 78% 0%, color-mix(in srgb, var(--gb-brand) 15%, transparent), transparent 42%),
    radial-gradient(ellipse at 2% 72%, color-mix(in srgb, var(--gb-accent) 9%, transparent), transparent 46%),
    var(--gb-background);
}
.library-shell::before {
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--gb-brand) 4%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--gb-brand) 4%, transparent) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: .32;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
.library-shell .page { max-width: 1480rem; padding-top: 34px; }
.library-content > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28rem 0 10rem;
  font-size: 25rem;
  letter-spacing: -.025em;
}
.library-content > h2::before { content: ''; width: 4px; height: 1.05em; border-radius: 4px; background: linear-gradient(var(--gb-brand), var(--gb-accent)); }
.tiles { gap: 16rem; padding-block: 8rem; }
.tile {
  width: 260rem;
  padding: 8rem;
  border: 1px solid var(--gb-card-border);
  border-radius: 20rem;
  box-shadow: 0 10px 28px #02081735;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.tile:hover, .tile:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gb-brand) 68%, var(--gb-card-border)); box-shadow: 0 16px 34px #02081750; }
.tile .cover { width: 100%; border-radius: 14rem; }
.tile .name { margin: 10rem 4rem 5rem; text-align: left; font-size: 18rem; }
.grid { gap: 14rem; padding-top: 12rem; }
.library-shell .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .library-shell .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) { .library-shell .grid { grid-template-columns: 1fr; } }
.library-shell .card {
  height: auto;
  min-height: 236rem;
  align-items: stretch;
  flex-direction: column;
  gap: 10rem;
  padding: 10rem;
  border-radius: 20rem;
  box-shadow: 0 10px 26px #02081728;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.library-shell .card:hover, .library-shell .card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--gb-brand) 72%, var(--gb-card-border));
  box-shadow: 0 16px 32px #02081748;
}
.library-shell .card .cover { width: 100%; aspect-ratio: 16 / 9; border-radius: 14rem; background: linear-gradient(135deg, #19365e, #11616a); }
.library-shell .card .info { gap: 6rem; }
.cover span { color: #fff; text-shadow: 0 1px 4px #000a; }
.card .t { font-size: 20rem; letter-spacing: -.02em; }
.library-shell .card .t { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card .l { font-size: 13rem; }
@media (max-width: 1100px) {
  .library-shell .card { min-height: 154rem; flex-direction: row; gap: 16rem; }
  .library-shell .card .cover { width: 138rem; }
}
.card-filter { background: var(--gb-card-filter-background); color: var(--gb-card-filter-foreground); }
.card-filter:hover, .card-filter:focus-visible { background: var(--gb-button); color: #fff; }
.library-shell .filter-toggle { border-radius: 14px; box-shadow: 0 8px 24px #02081735; backdrop-filter: blur(14px); }
.library-shell .filter-toggle[data-active="true"] { color: var(--gb-accent); border-color: var(--gb-accent); }
.filter-panel { border-radius: 0 22px 22px 0; box-shadow: 16px 0 52px #02081766; }
.btn { box-shadow: 0 6px 18px color-mix(in srgb, var(--gb-button) 22%, transparent); }
.btn.back { box-shadow: none; }
.loading-spinner { border-top-color: var(--gb-brand); }
.game-detail .hero .cover { box-shadow: 0 20px 48px #02081755; }
.game-detail .game-actions .game-enter { min-height: 54px; background: linear-gradient(115deg, var(--gb-button), color-mix(in srgb, var(--gb-button) 74%, var(--gb-brand))); }
.game-detail .game-actions .game-favorite.active { background: color-mix(in srgb, var(--gb-accent) 22%, var(--gb-card)); color: var(--gb-accent); }
.game-detail .game-rating { border: 1px solid var(--gb-border); }
.player .game-bar { border-bottom: 1px solid var(--gb-header-border); }
@media (prefers-reduced-motion: reduce) { .tile, .library-shell .card { transition: none; } .tile:hover, .library-shell .card:hover { transform: none; } }
@media (max-aspect-ratio: 1/1), (max-width: 720px) {
  .library-shell .page { padding-top: 26px; }
  .library-content > h2 { font-size: 22rem; }
  .tile { width: 226rem; }
  .library-shell .card { min-height: 142rem; height: auto; }
  .card .cover { width: 138rem; }
}
