:root { color-scheme: light; font-family: "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif; color: #252729; background: #f7f8fb; --green: #bc202b; --line: #e4e6ec; --catalog-cover-height: 210.203px; }
* { box-sizing: border-box; letter-spacing: 0; }
html { scroll-padding-bottom: 90px; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #19a17d; outline-offset: 3px; }
svg { width: 20px; height: 20px; stroke-width: 1.8; flex-shrink: 0; }
[hidden] { display: none !important; }
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 44px; height: 88px; padding: 0 36px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: 23px; font-weight: 800; }
.brand > svg { width: 44px; height: 44px; color: var(--green); }
.brand small { display: block; font-size: 9px; color: #84918e; font-weight: 500; margin-top: 5px; }
#search-form { display: flex; align-items: center; gap: 12px; max-width: 540px; flex: 1; padding: 0 14px; height: 44px; background: #f1f4f2; border: 1px solid var(--line); border-radius: 6px; }
#search-form > svg { color: #70857a; }
#search { width: 100%; min-width: 0; border: 0; background: none; outline: none; font-size: 13px; }
#search-form button, #random-game, #collection-clear, #refresh-rooms { width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; background: none; border: 0; color: var(--green); }
.header-link { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.site-layout { max-width: 1600px; margin: auto; display: grid; grid-template-columns: 205px minmax(0, 1fr); }
.site-sidebar { position: sticky; top: 88px; align-self: start; height: calc(100dvh - 88px); display: flex; flex-direction: column; padding: 26px 16px; background: #fff; border-right: 1px solid var(--line); }
.site-sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.site-sidebar nav a { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 10px 14px; border-radius: 4px; color: #66736d; font-size: 13px; }
.site-sidebar nav a:hover { background: #f2f5f3; }
.site-sidebar nav a.is-active { color: #126a54; background: #e8f4ed; font-weight: 700; }
#favorites-count { margin-left: auto; font-size: 11px; }
.nav-heading { color: #a0aaa4; font-size: 10px; padding: 21px 14px 7px; }
.site-sidebar footer { margin-top: auto; padding: 14px; font-size: 14px; font-weight: 700; line-height: 1.8; color: #56665c; }
.site-sidebar footer span { color: #a3ada6; font-size: 9px; font-weight: 400; }
main { min-width: 0; padding: 32px 34px 0; }
.catalog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.catalog-heading p { margin: 0 0 9px; font-size: 10px; font-weight: 700; color: var(--green); }
h1 { font-size: 30px; margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
#random-game { width: 42px; height: 42px; border: 1px solid #d2ddd5; border-radius: 6px; background: #fff; margin-left: 14px; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.platforms button { padding: 9px 16px; border: 1px solid #dce4dd; background: #fff; border-radius: 4px; color: #66766b; font-size: 12px; min-height: 36px; }
.platforms button.is-active { background: #273c32; border-color: #273c32; color: #fff; }
.catalog-tools { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 12px; }
.catalog-tools p { color: #829086; font-size: 12px; margin: 0; }
.catalog-tools > div { display: flex; gap: 8px; align-items: center; }
.catalog-tools select { border: 0; color: #65776a; font-size: 12px; background: none; max-width: 125px; }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 20px; }
.game-card { min-width: 0; }
.cartridge { display: block; position: relative; width: 100%; aspect-ratio: 1 / 1.09; border-radius: 6px 6px 4px 4px; border: 1px solid #77847c; padding: 22px 12px 20px; background: #515d56; box-shadow: inset 0 2px 0 #a1afa7, inset 0 -4px 0 #35443b, 0 3px 7px #243b3220; overflow: hidden; transition: transform .16s, box-shadow .16s; }
.cartridge:hover { transform: translateY(-4px); box-shadow: inset 0 2px 0 #a1afa7, inset 0 -4px 0 #35443b, 0 8px 14px #243b3224; }
.cartridge[data-platform="sfc"] { background: #a5a9ac; border-color: #747c84; box-shadow: inset 0 2px 0 #d9dedb, inset 0 -4px 0 #747d7c; }
.cartridge[data-platform="gba"] { background: #323845; border-color: #586b86; }
.cartridge[data-platform="gbc"] { background: #2c807a; border-color: #70b7a7; }
.cartridge[data-platform="arcade"] { background: #973e40; border-color: #c97976; }
.cartridge-ridges { position: absolute; left: 8px; right: 8px; top: 7px; height: 7px; background: repeating-linear-gradient(0deg, #1c302366 0 1px, #d5e0d533 1px 2px); border-radius: 1px; }
.cartridge-label { display: flex; flex-direction: column; height: 100%; border-radius: 3px; border: 2px solid #2e3b33; background: #e9eee9; overflow: hidden; box-shadow: 0 1px 2px #0003; }
.cartridge-label img { display: block; width: 100%; height: calc(100% - 21px); min-height: 0; object-fit: cover; background: #edf1ee; }
.cover-placeholder { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #95a99c; background: #eaf0ec; min-height: 0; font-size: 11px; }
.cover-placeholder svg { width: 32px; height: 32px; }
.detail-media .cover-placeholder { aspect-ratio: 1; width: 100%; border-radius: 4px; }
.cartridge-brand { display: flex; align-items: center; justify-content: center; height: 21px; flex-shrink: 0; font-size: 8px; font-weight: 600; color: #3d5448; white-space: nowrap; overflow: hidden; }
.cartridge-notch { position: absolute; bottom: 3px; width: 38%; left: 31%; height: 7px; border-radius: 2px; background: #283a2f; box-shadow: inset 0 1px 2px #101b15; }
.game-info { display: flex; align-items: start; justify-content: space-between; gap: 6px; margin-top: 12px; }
.game-name { text-align: left; border: 0; padding: 3px 0 0; background: none; color: #293c30; font-weight: 700; font-size: 13px; line-height: 1.55; min-width: 0; overflow-wrap: anywhere; }
.favorite-toggle { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; background: none; border: 0; color: #91a096; }
.favorite-toggle svg { width: 16px; height: 16px; }
.is-favorite { color: #cf4853 !important; }
.is-favorite svg { fill: #f7d7dc; }
.game-meta { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #8e9b93; font-size: 10px; margin-top: 5px; flex-wrap: wrap; }
.game-meta span:first-child { color: #507160; }
.pagination { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 32px 0; color: #99a49c; font-size: 11px; }
#load-more, #retry { min-height: 40px; padding: 9px 24px; border: 1px solid #bfcfc3; border-radius: 4px; color: var(--green); background: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.empty-state { padding: 60px 18px; text-align: center; color: #84938a; }
.empty-state > svg { width: 46px; height: 46px; color: #84a691; }
.empty-state h2 { font-size: 19px; color: #4d6454; }
.empty-state p { font-size: 13px; line-height: 1.7; }
.cartridge-skeleton { aspect-ratio: 1/1.3; border-radius: 6px; background: #e1e8e3; animation: breathe 1s infinite alternate; }
@keyframes breathe { to { opacity: .5; } }
.page-footer { display: flex; flex-wrap: wrap; gap: 14px; padding: 24px 0; margin-top: 36px; border-top: 1px solid var(--line); color: #89998e; font-size: 11px; }
.page-footer span:first-child { color: #496552; font-weight: 700; }
.page-footer a { margin-left: auto; color: var(--green); }
dialog { border: 1px solid #c7d5cc; padding: 0; width: min(760px, calc(100% - 28px)); max-height: calc(100dvh - 32px); border-radius: 8px; background: #fff; color: #273e30; overflow: auto; }
dialog::backdrop { background: #11251ed1; backdrop-filter: blur(5px); }
.dialog-close { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f0f4f1; color: #597361; z-index: 1; }
.detail-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; padding: 34px; }
.detail-media img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 4px; background: #edf2ee; }
.detail-content { min-width: 0; }
#detail-type { color: var(--green); font-size: 12px; margin: 0 0 10px; }
#detail-title { font-size: 24px; margin: 0 0 14px; line-height: 1.4; overflow-wrap: anywhere; }
#detail-version { color: #a26544; font-size: 11px; }
#detail-description { font-size: 12px; color: #7d8c82; white-space: pre-line; line-height: 1.85; max-height: 220px; overflow-y: auto; overflow-wrap: anywhere; }
.detail-actions { display: flex; gap: 9px; margin: 22px 0 14px; }
.primary-action, #join-form button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 20px; background: var(--green); color: #fff; border: 0; border-radius: 4px; font-size: 13px; font-weight: 600; }
.primary-action { flex: 1; }
.detail-actions button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 4px; border: 1px solid #d4dfd7; background: #fff; color: #789280; }
.host-action { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; border: 1px solid #c5d8cb; color: var(--green); border-radius: 4px; font-size: 13px; }
#public-label { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #8a9c8f; margin-top: 12px; line-height: 1.6; }
#public-label input { accent-color: var(--green); }
#detail-note { font-size: 11px; line-height: 1.6; color: #899a8e; }
.site-notice { position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 24px); background: #254e3e; color: #fff; padding: 12px 18px; border-radius: 6px; font-size: 12px; line-height: 1.6; box-shadow: 0 3px 15px #0003; }
#join-form { padding: 24px 0; border-bottom: 1px solid var(--line); }
#join-form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
#join-form > div { display: flex; gap: 12px; max-width: 500px; }
#join-code { width: 100%; min-width: 0; border: 1px solid #c9d8ce; border-radius: 4px; padding: 10px 13px; font-size: 14px; text-transform: uppercase; background: #fff; }
#join-form button { flex-shrink: 0; }
.room-heading { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 12px; }
.room-heading h2 { font-size: 18px; margin: 0; }
.room-row { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.room-row > svg { color: var(--green); width: 36px; height: 36px; }
.room-row > div { flex: 1; min-width: 0; }
.room-row h3 { font-size: 14px; margin: 0 0 6px; overflow-wrap: anywhere; }
.room-row p { font-size: 11px; color: #8a9b8f; margin: 0; }
.room-ready { color: #4a9970; font-size: 11px; white-space: nowrap; }
.room-row a { display: flex; gap: 7px; align-items: center; color: var(--green); font-size: 12px; }
#room-status { font-size: 13px; color: #94a295; padding: 18px 0; }
.text-link { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--green); }
@media (min-width: 1400px) { .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .site-header { gap: 26px; padding: 0 24px; } .site-layout { grid-template-columns: 182px minmax(0,1fr); } main { padding: 28px 24px 0; } .game-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } .brand { font-size: 19px; } .header-link span { display: none; } }
@media (max-width: 760px) {
  .site-header { height: 123px; padding: 14px 16px; gap: 12px; flex-wrap: wrap; }
  .brand { font-size: 20px; flex: 1; } .brand > svg { width: 32px; height: 32px; } .brand small { font-size: 8px; margin-top: 3px; }
  #search-form { flex: 0 0 100%; max-width: none; order: 2; height: 40px; } .header-link svg { width: 23px; height: 23px; }
  .site-layout { display: block; } .site-sidebar { position: sticky; z-index: 9; top: 123px; height: auto; padding: 0 10px; border: 0; border-bottom: 1px solid var(--line); }
  .site-sidebar nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 0; }
  .site-sidebar nav a { flex-shrink: 0; gap: 6px; padding: 12px 10px; border-radius: 0; min-height: 45px; font-size: 11px; }
  .site-sidebar nav a svg { width: 15px; height: 15px; } .site-sidebar .nav-heading, .site-sidebar footer, .local-play { display: none !important; }
  main { padding: 24px 16px 0; } h1 { font-size: 24px; } .catalog-heading { margin-bottom: 20px; }
  .platforms { gap: 6px; padding-bottom: 16px; } .platforms button { padding: 8px 12px; font-size: 11px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px 14px; } .cartridge { padding: 20px 10px 18px; }
  .catalog-tools p { font-size: 11px; } .game-name { font-size: 12px; } .game-meta { font-size: 9px; }
  .page-footer { font-size: 10px; } .page-footer a { margin-left: 0; }
  .detail-body { grid-template-columns: 1fr; padding: 28px 22px; gap: 20px; } .detail-media img { max-width: 200px; margin: auto; }
  #detail-title { font-size: 22px; } #detail-description { max-height: 160px; } #join-form button { font-size: 12px; padding: 10px 13px; }
  .room-row { gap: 12px; } .room-row > svg { width: 26px; } .room-ready { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Poster, console shelf, then the cartridge collection. */
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.site-header { height: 76px; padding: 0 max(24px, calc((100% - 1240px) / 2)); gap: 20px; position: relative; }
.brand { color: var(--green); }
.header-actions { display: flex; gap: 24px; align-items: center; margin-left: auto; }
.header-actions a { display: flex; align-items: center; gap: 6px; min-height: 44px; }
.home-poster { position: relative; height: 360px; overflow: hidden; background: #d5e7df; }
.poster-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.poster-content { position: relative; z-index: 1; width: min(620px, calc(100% - 32px)); margin: auto; padding-top: 16px; text-align: center; color: #342427; }
.poster-content h1 { font-size: 44px; line-height: 1.15; margin: 6px 0 12px; color: #a71925; }
.poster-content p { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
#search-form { margin: 16px auto 0; width: 100%; max-width: 500px; background: #fff; border: 1px solid #c8b8af; height: 50px; box-shadow: 0 3px 0 #00000013; }
#search-form input { min-width: 0; width: 100%; }
.site-layout { display: block; max-width: 1240px; margin: auto; }
main { padding: 28px 24px 0; }
.platforms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; padding-bottom: 26px; border-bottom: 1px solid var(--line); overflow: visible; }
.platforms button { border: 0; border-bottom: 3px solid transparent; background: transparent; border-radius: 0; padding: 8px 4px; display: grid; place-items: center; gap: 10px; color: #34383a; }
.platforms button:nth-child(1) { background: #f9e9e9; } .platforms button:nth-child(2) { background: #e5efeb; }
.platforms button:nth-child(3) { background: #edf0fa; } .platforms button:nth-child(4) { background: #f1eafb; } .platforms button:nth-child(5) { background: #f9efda; }
.platforms button.is-active { border-bottom-color: var(--green); color: var(--green); }
.platforms img { height: 64px; width: 94px; object-fit: contain; }
.platforms span { font-size: 13px; font-weight: 700; white-space: nowrap; }
.catalog-heading { margin: 28px 0 18px; }
.catalog-heading h2 { margin: 0; font-size: 26px; color: #b21f2a; }
.catalog-heading p { color: #858383; font-size: 12px; }
.catalog-tools { gap: 12px; }
.collection-tabs { display: flex; align-items: center; gap: 18px; }
.collection-tabs a, .collection-tabs button { border: 0; background: none; padding: 8px 0; color: #5f6366; font-size: 14px; }
.collection-tabs .is-active { color: var(--green); border-bottom: 2px solid var(--green); }
#result-count { font-size: 12px; color: #838489; margin: 12px 0 20px; }
.game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 24px; }
.cartridge { background-color: #30383c; box-shadow: inset 0 2px 0 #ffffff29, 0 4px 0 #151c20; border-color: #252b2e; }
.game-name { font-size: 14px; }
.bottom-nav { position: fixed; z-index: 15; bottom: 0; inset-inline: 0; display: flex; justify-content: center; border-top: 1px solid var(--line); background: #fff; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { display: grid; justify-items: center; gap: 4px; width: min(180px, 25%); padding: 6px; font-size: 11px; color: #666b6e; }
.bottom-nav a.is-active { color: var(--green); font-weight: 700; }
.bottom-nav svg { width: 22px; height: 22px; }
.room-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.room-row { border: 1px solid var(--line); border-radius: 6px; padding: 16px; flex-wrap: wrap; }
.room-cover { width: 72px; height: 82px; position: relative; flex-shrink: 0; }
.room-cover img { width: 100%; height: 100%; object-fit: cover; border: 5px solid #35383c; border-radius: 4px; }
.room-row h3 { overflow-wrap: anywhere; }
.room-row p { overflow-wrap: anywhere; } .room-row a { margin-left: auto; }
#room-entry { max-width: 400px; width: calc(100% - 32px); padding: 32px 24px 24px; }
#room-entry h2 { font-size: 22px; margin-right: 30px; overflow-wrap: anywhere; }
#room-entry-form { display: grid; gap: 10px; }
#room-password, #nickname { width: 100%; min-width: 0; border: 1px solid #c7c9cc; border-radius: 4px; height: 44px; padding: 10px; }
#room-entry-error { color: var(--green); min-height: 20px; margin: 0; font-size: 13px; }
#personal-center { max-width: 680px; margin: auto; }
.profile-heading { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 26px; }
.profile-heading img { width: 78px; height: 78px; object-fit: contain; background: #ede9f7; border-radius: 8px; }
.profile-heading h2 { margin: 6px 0; font-size: 24px; overflow-wrap: anywhere; }
.profile-heading p { color: #767b80; margin: 0; font-size: 13px; }
#profile-form { padding: 24px 0; } #profile-form > div { display: flex; gap: 10px; margin-top: 10px; }
#profile-form button { width: 48px; border: 0; background: var(--green); color: #fff; border-radius: 4px; flex-shrink: 0; }
.profile-stats { display: flex; padding: 20px 0; border-block: 1px solid var(--line); }
.profile-stats a { flex: 1; display: grid; text-align: center; gap: 8px; font-size: 13px; }
.profile-stats strong { font-size: 26px; color: var(--green); }
.profile-links { display: grid; margin: 20px 0; }
.profile-links a, .profile-links button { display: flex; width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 20px 0; align-items: center; gap: 12px; background: transparent; font-size: 14px; }
.profile-links svg:last-child { margin-left: auto; color: #989da0; }
.profile-note { color: #878b90; font-size: 12px; line-height: 1.8; }
.site-notice { bottom: 90px; }
@media (max-width: 1000px) { .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .site-header { height: 70px; padding: 10px 16px; flex-wrap: nowrap; gap: 12px; }
  .brand { font-size: 19px; } .brand small { font-size: 8px; } .header-actions { gap: 16px; } .header-actions svg { width: 20px; } .header-link span { display: none; }
  .home-poster { height: 340px; } .poster-image { object-position: center bottom; }
  .poster-content { padding-top: 22px; } .poster-content h1 { font-size: 32px; } .poster-content p { font-size: 12px; }
  #search-form { height: 46px; margin-top: 16px; max-width: 400px; }
  main { padding: 20px 16px 0; }
  .platforms { gap: 7px; padding-bottom: 20px; } .platforms button { padding: 8px 1px; gap: 8px; }
  .platforms img { width: 100%; height: 52px; } .platforms span { font-size: 10px; }
  .catalog-heading { margin: 22px 0 12px; } .catalog-heading h2 { font-size: 23px; }
  .catalog-heading p { font-size: 10px; } .catalog-tools { flex-wrap: wrap; gap: 8px; }
  .collection-tabs { gap: 16px; } .collection-tabs a, .collection-tabs button { font-size: 12px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .game-name { font-size: 13px; } .game-meta { font-size: 10px; }
  .room-list { grid-template-columns: 1fr; } .room-row { gap: 12px; } .room-ready { display: inline; }
  .profile-heading { margin-top: 10px; } .page-footer { padding-bottom: 20px; }
}

/* Pixel plates and measured transparent cartridge windows. */
.asset-icon { display: inline-block; width: 28px; height: 28px; flex-shrink: 0; object-fit: contain; image-rendering: pixelated; vertical-align: middle; pointer-events: none; }
.site-header { background: #1c222c; color: #f7f5ef; border-bottom: 2px solid #e7b746; }
.site-header .brand { color: #ffdb83; }
.brand > .asset-icon { width: 44px; height: 44px; }
.brand small { color: #adb7c9; }
.bottom-nav { background: #1c222c; border-top: 2px solid #e7b746; }
.bottom-nav a { color: #b9c3d2; }
.bottom-nav a.is-active { color: #ffe19c; }
.bottom-nav .asset-icon { width: 30px; height: 30px; }
.bottom-nav svg { height: 30px; }
.platforms button:nth-child(n) { background: transparent; }
.platforms img { width: 104px; height: 74px; object-fit: contain; image-rendering: pixelated; }
.platforms button.is-active { color: #9e2027; border-bottom-color: #c73539; }
.cartridge-display { position: relative; display: block; width: 100%; aspect-ratio: var(--cartridge-ratio); padding: 0; border: 0; border-radius: 0; background: none; overflow: hidden; box-shadow: none; }
.cartridge.cartridge-display[data-platform] { background: none; border: 0; box-shadow: none; }
.cartridge.cartridge-display:hover { transform: translateY(-3px); box-shadow: none; }
.game-cover-window { position: absolute; left: var(--cover-left); top: var(--cover-top); width: var(--cover-width); height: var(--cover-height); overflow: hidden; display: block; background: #11151c; }
.cartridge-display .game-cover { display: block; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; object-fit: contain; margin: 0; border: 0; border-radius: 0; background: #11151c; }
.cartridge-display .cartridge-frame { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; margin: 0; border: 0; border-radius: 0; background: none; object-fit: contain; pointer-events: none; z-index: 2; }
.game-card .cartridge-display { height: var(--catalog-cover-height); aspect-ratio: auto; }
.game-card .cartridge-frame { object-fit: fill; }
.cartridge-brand { position: absolute; right: 8%; top: 7%; height: 18px; padding: 0 5px; z-index: 3; background: #151b27ed; color: #fff3c5; font-size: 9px; border-radius: 2px; }
.game-info { min-height: 45px; margin-top: 5px; padding: 7px 8px; gap: 5px; background: #1c222c; border: 1px solid #586070; border-radius: 3px; }
.game-info .game-name { color: #f6f3ed; }
.game-info .favorite-toggle { color: #c6cedc; }
.game-info .favorite-toggle.is-favorite { color: #ffda7a; }
.cartridge-display .cover-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; color: #bac2d0; background: #11151c; border: 0; border-radius: 0; font-size: 10px; }
.detail-media.cartridge-display { width: min(260px, 100%); margin-inline: auto; align-self: start; }
.room-cover.cartridge-display { width: 78px; height: auto; }
.cartridge-skeleton { height: var(--catalog-cover-height); aspect-ratio: auto; border-radius: 3px; }
html { touch-action: manipulation; }
h1, h2, h3 { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.catalog-tools { margin-top: 18px; align-items: center; gap: 12px; }
.collection-tabs { display: grid; grid-template-columns: repeat(4, minmax(58px, 1fr)); gap: 12px; width: min(420px, 100%); }
.collection-tabs :is(a,button) { display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 70px; padding: 7px 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: 14px; color: #4a515c; }
.collection-tabs :is(a,button).is-active { border-color: #bfc8d4; background: #fff; color: #b6202c; }
.collection-tabs img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.catalog-actions { display: flex; align-items: center; justify-content: end; gap: 6px; margin-left: auto; }
#version-filter { height: 44px; font-size: 13px; }
.game-info { position: relative; display: grid; grid-template-columns: minmax(0,1fr); padding-inline: 33px; }
.game-info .game-name { text-align: center; width: 100%; }
.game-info .favorite-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.bottom-nav a { font-size: 13px; min-height: 57px; }
.room-heading { position: relative; display: grid; grid-template-columns: 70px minmax(0,1fr) 88px; align-items: center; gap: 8px; margin: 4px 0 20px; }
.room-heading h2 { margin: 0; font-size: 22px; }
.room-heading > div { display: flex; align-items: center; }
.room-heading a, #refresh-rooms { display: grid; place-items: center; width: 44px; height: 44px; }
.room-count { color: #5b6470; font-size: 13px; }
.room-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%),1fr)); gap: 16px; }
.room-row { position: relative; display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 10px 14px; padding: 16px; background: #fff; border: 1px solid #dce1e8; border-radius: 6px; }
.room-row .room-cover { grid-row: 1 / 3; align-self: center; }
.room-row > div:nth-child(2) { min-width: 0; align-self: end; }
.room-row h3 { font-size: 15px; margin: 0 0 6px; overflow-wrap: anywhere; }
.room-row p { font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.room-row > a { justify-self: center; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 16px; min-height: 38px; font-size: 14px; border: 1px solid #bbc5d2; border-radius: 4px; background: #f8f9fb; }
.room-ready { position: absolute; left: 18px; top: 17px; z-index: 3; font-size: 10px; background: #1c222c; color: #fff; padding: 2px 4px; border-radius: 2px; }
#room-status { text-align: center; font-size: 14px; color: #677280; }
#room-list:empty + #room-status { padding: 80px 0; border-bottom: 1px solid var(--line); }
#load-sentinel { width: 100%; height: 1px; }
@media (max-width: 600px) {
  .catalog-tools { flex-direction: column; align-items: stretch; gap: 10px; }
  .collection-tabs { gap: 6px; width: 100%; }
  .collection-tabs :is(a,button) { font-size: 14px; }
  .catalog-actions { margin-left: 0; }
  .room-row { grid-template-columns: 64px minmax(0,1fr); padding: 12px; }
  .room-heading { grid-template-columns: 54px minmax(0,1fr) 88px; }
}
@media (max-width: 600px) {
  .platforms img { width: 100%; height: 52px; }
  .brand > .asset-icon { width: 34px; height: 34px; }
  .room-cover.cartridge-display { width: 64px; }
  .detail-media.cartridge-display { width: min(205px, 100%); }
}
