@font-face {
  font-family: Manrope;
  src: url("./assets/manrope.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0e0e18;
  --sidebar: #11111e;
  --surface: #171725;
  --surface-raised: #1e1d30;
  --line: #2d2c42;
  --ink: #f7f5ff;
  --muted: #b9b5ce;
  --purple: #c8abff;
  --focus: #d9c4ff;
  --gutter: clamp(22px, 3.15vw, 54px);
  --radius: 18px;
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
img { display: block; max-width: 100%; }
svg { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
:where(section, [id]) { scroll-margin-top: 104px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 30; background: #fff; color: #161122; padding: 12px; border-radius: 8px; }

.layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100dvh; }
.workspace { min-width: 0; background: radial-gradient(ellipse at 55% 0%, #1e173555, transparent 520px), var(--bg); }
.sidebar {
  position: sticky; top: 0; height: 100dvh; z-index: 9; overflow: auto;
  display: flex; flex-direction: column; padding: 25px 15px 18px;
  background: var(--sidebar); border-right: 1px solid #28273c;
}
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 38px; gap: 8px; }
.brand, .mobile-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.125rem; letter-spacing: -.035em; white-space: nowrap; }
.brand img { flex: none; border-radius: 11px; box-shadow: 0 5px 18px #8146ed32; }
.brand-accent { color: #bb97ff; margin-left: 3px; }
.nav-group + .nav-group { margin-top: 30px; }
.nav-group p { margin: 0 10px 10px; color: #a7a3bb; font-size: .71rem; font-weight: 800; letter-spacing: .11em; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; min-height: 46px;
  margin-bottom: 4px; padding: 7px 10px 7px 13px; border: 1px solid transparent; border-radius: 10px;
  color: var(--muted); font-size: .91rem; font-weight: 670; transition: background .19s, color .19s;
}
.nav-item:hover { color: var(--ink); background: #1d1b2e; }
.nav-item[aria-current] { background: #282040; color: #e6d8ff; border-color: #4a386b; font-weight: 780; }
.nav-item[aria-current]::before { content: ""; position: absolute; left: 0; width: 3px; height: 19px; background: #aa7cff; border-radius: 0 3px 3px 0; }
.nav-item[aria-current] svg { color: #c9a6ff; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.sidebar-note { display: flex; align-items: center; gap: 9px; padding: 11px 8px; border: 1px solid var(--line); border-radius: 12px; background: #171726; }
.note-icon, .guide-icon, .continue-icon {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px;
  border-radius: 10px; background: #312448; color: #d0afff;
}
.sidebar-note strong, .sidebar-note span:not(.note-icon) { display: block; font-size: .77rem; }
.sidebar-note span:not(.note-icon) { color: var(--muted); margin-top: 2px; }
.topbar .mobile-menu, .mobile-brand, .sidebar-heading .drawer-close, .mobile-dock, .menu-backdrop { display: none; }

.topbar {
  position: sticky; top: 0; z-index: 8; height: 72px;
  display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter);
  background: #12121f; border-bottom: 1px solid #2b293e;
}
.breadcrumb { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: .86rem; white-space: nowrap; }
.breadcrumb strong { color: #eee9fa; font-weight: 750; }
.search {
  display: flex; align-items: center; gap: 8px; width: clamp(180px, 28vw, 396px); min-width: 0; min-height: 44px;
  margin-left: auto; padding: 0 5px 0 12px; border: 1px solid #36344b; border-radius: 11px;
  background: #1b1a2b; color: #bcb5ce;
}
.search:focus-within { border-color: #b58bff; box-shadow: 0 0 0 2px #9861f53b; }
.search input { width: 100%; min-width: 0; padding: 6px 0; border: 0; background: transparent; color: var(--ink); font-size: .91rem; outline: none; }
.search input::placeholder { color: #bcb5ce; opacity: 1; }
.search kbd { order: 3; margin-right: 3px; padding: 0 5px; border: 1px solid #454159; border-radius: 4px; color: #c7bdd7; font: inherit; font-size: .72rem; line-height: 1.6; }
.search-submit { order: 2; display: inline-grid; place-items: center; flex: none; width: 35px; height: 34px; padding: 0; background: #29233d; border: 1px solid #3c3255; border-radius: 7px; color: #ded0fc; }
.search-submit:hover { background: #3a2b58; color: #fff; }
.icon, .avatar { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; }
.icon { border: 1px solid var(--line); border-radius: 11px; background: #1e1c30; color: #ece5ff; transition: background .18s, border-color .18s, color .18s; }
.icon:hover { border-color: #8a68b5; background: #322745; color: #fff; }
.avatar { border-radius: 50%; border: 1px solid #8e64c9; background: radial-gradient(circle at 33% 18%, #9369ce, #452465 90%); color: #fff; }
.avatar-lg { width: 47px; height: 47px; }
.favorite[aria-pressed="true"] { background: #392c52; border-color: #b489f6; color: #e0c5ff; }
.favorite[aria-pressed="true"] svg { fill: currentColor; }

main, footer { max-width: 1660px; margin-inline: auto; }
main { min-height: 72vh; padding: 30px var(--gutter) 52px; }
main:focus, .results:focus { outline: none; }
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.page-intro h1 {
  font-size: clamp(1.95rem, 3.1vw, 2.72rem); line-height: 1.1; font-weight: 800; letter-spacing: -.058em;
}
.page-intro p { margin-top: 8px; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.button {
  display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 8px; min-height: 44px;
  border: 1px solid transparent; border-radius: 11px; padding: 9px 15px; font-size: .875rem;
  font-weight: 800; white-space: nowrap; transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.button:active, .icon:active, .search-submit:active { transform: scale(.97); }
.button.quiet { background: #211e32; border-color: #39334f; color: #f1e8ff; }
.button.quiet:hover { background: #312544; border-color: #7758a7; }
.button.primary { background: #7542d6; border-color: #a57af4; color: #fff; box-shadow: 0 5px 18px #351d7180; }
.button.primary:hover { background: #8955eb; border-color: #cfafff; }
.full { width: 100%; }
.text-link { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; color: var(--purple); font-size: .875rem; font-weight: 800; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(248px, 286px); gap: 21px; align-items: start; }
.column, .rail { min-width: 0; }
.rail { display: grid; gap: 16px; }
.hero { position: relative; display: flex; align-items: center; min-height: clamp(330px, 28vw, 445px); overflow: hidden; isolation: isolate; border: 1px solid #4f4269; border-radius: 22px; background: #1e1733; }
.hero-picture { position: absolute; inset: 0; z-index: -2; }
.hero-image { width: 100%; height: 100%; object-fit: cover; object-position: 54% 36%; }
.hero::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, #110d21fa 0%, #130f25ef 21%, #18122dbb 41%, #17112835 66%, #15102000), linear-gradient(0deg, #130f23ac, transparent 50%); }
.hero-content { width: fit-content; max-width: min(100%, 520px); padding: 30px clamp(23px, 3.2vw, 53px); }
.hero-tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid #9d81c48a; border-radius: 6px; background: #2b2046cf; color: #efdcff; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.hero h2 { margin-top: 16px; font-size: clamp(2.65rem, 5.4vw, 5.15rem); line-height: .99; letter-spacing: -.074em; font-weight: 800; text-wrap: balance; text-shadow: 0 2px 18px #1209177a; }
.hero p { max-width: 340px; margin-top: 13px; color: #f0e8f9; font-size: .98rem; line-height: 1.55; }
.hero-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.hero-genres span { padding: 4px 8px; background: #1b1529c9; border: 1px solid #ab92ce6b; border-radius: 6px; color: #efe3ff; font-size: .75rem; font-weight: 720; }
.hero-actions { display: flex; align-items: center; gap: 9px; margin-top: 17px; }
.hero-actions .button { padding-inline: 18px; min-height: 46px; }
.hero-favorite { background: #261b3cdd; border-color: #9f82c1; width: 46px; height: 46px; }

.section { margin-top: 27px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.section h2, .panel h2 { display: flex; align-items: center; gap: 9px; line-height: 1.24; font-size: 1.24rem; font-weight: 800; letter-spacing: -.035em; }
.section h2 svg, .panel h2 svg { color: #bb93ff; }
.card-grid, .catalog-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.catalog-grid { gap: 18px; }
.game-card { position: relative; min-width: 0; border: 1px solid #333149; border-radius: 14px; background: #1a1929; transition: transform .2s, border-color .2s, box-shadow .2s; }
.game-card:focus-within { border-color: #a37ac9; }
.game-card-link { display: block; height: 100%; border-radius: inherit; }
.game-art { position: relative; display: block; overflow: hidden; aspect-ratio: 1.53; border-radius: 13px 13px 0 0; background: #2c2540; }
.game-art::after { position: absolute; inset: 0; content: ""; background: linear-gradient(0deg,#140e2096 0%,transparent 46%); pointer-events: none; }
.game-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .32s ease; }
.card-new { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 4px 7px; border: 1px solid #d5c4ed76; background: #171122e8; border-radius: 6px; color: #f0e5ff; font-size: .71rem; font-weight: 800; }
.card-hover { position: absolute; z-index: 1; bottom: 9px; left: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #eee6ff64; border-radius: 7px; background: #251b3be8; color: #fff; font-size: .75rem; font-weight: 800; opacity: 0; transform: translateY(3px); transition: opacity .2s, transform .2s; }
.game-card .favorite { position: absolute; z-index: 2; top: 7px; right: 7px; width: 40px; height: 40px; background: #100e1be5; border-color: #faf2ff65; }
.game-card .favorite:hover, .game-card .favorite[aria-pressed="true"] { background: #442e60; border-color: #c7a5f1; }
.game-caption { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 68px; padding: 9px 10px 11px; }
.game-caption h3 { font-size: .94rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.game-caption div > span { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); font-size: .77rem; }
.game-caption div > span svg { color: var(--card-accent); }
.card-play { display: inline-grid; place-items: center; flex: none; width: 31px; height: 31px; border: 1px solid #4b3c62; border-radius: 8px; color: #e1c8ff; background: #2e2342; }
@media (hover:hover) {
  .game-card:hover { transform: translateY(-4px); border-color: #956bbd; box-shadow: 0 12px 24px #090612a0; }
  .game-card:hover img { transform: scale(1.045); }
  .game-card:hover .card-hover { opacity: 1; transform: translateY(0); }
}
.game-card-link:focus-visible .card-hover { opacity: 1; transform: translateY(0); }

.panel { min-width: 0; padding: 17px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 15px; }
.panel h2 { font-size: 1.08rem; }
.profile-panel { background: radial-gradient(ellipse at 86% 0%,#33204cb3,transparent 75%),var(--surface); border-color: #483659; }
.local { padding: 4px 7px; border: 1px solid #705587; border-radius: 6px; background: #35254b; color: #edddff; font-size: .72rem; font-weight: 800; }
.level-head { display: flex; align-items: center; gap: 8px; }
.level-head > div:nth-child(2) { min-width: 0; }
.level-head strong, .level-head span { display: block; }
.level-head strong { font-size: .96rem; font-weight: 800; overflow-wrap: anywhere; }
.level-head span { color: #d2bfeb; font-size: .78rem; }
.level-badge { flex: none; margin-left: auto; min-width: 43px; text-align: center; }
.level-badge strong { color: #e2caff; font-size: 1.45rem; line-height: 1.1; }
.level-badge span { color: #cfb4ef; font-size: .65rem; font-weight: 800; letter-spacing: .075em; }
.meter-label { display: flex; justify-content: space-between; gap: 4px; margin: 16px 0 7px; color: var(--muted); font-size: .81rem; }
.meter-label strong { color: #e3cfff; }
.panel progress { display: block; width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 10px; appearance: none; background: #3b2f4d; }
.panel progress::-webkit-progress-bar { background: #3b2f4d; }
.panel progress::-webkit-progress-value { background: linear-gradient(90deg,#8c57f0,#c89cff); }
.panel progress::-moz-progress-bar { background: linear-gradient(90deg,#8c57f0,#c89cff); }
.streak { display: flex; align-items: center; gap: 6px; margin: 13px 0; color: #f2ccac; font-size: .81rem; }
.streak svg { color: #ffad7d; }
.mission-row { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: start; gap: 8px; padding: 10px 0; border-bottom: 1px solid #343146; }
.mission-row:first-child { padding-top: 1px; }
.mission-row:last-child { border-bottom: 0; }
.mission-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; color: #d1b1ff; background: #33274b; }
.mission-icon.explore { background: #1b354a; color: #a2daff; }
.mission-icon.favorite { background: #422844; color: #ffc2dc; }
.mission-row strong, .mission-row small { display: block; }
.mission-row strong { font-size: .86rem; font-weight: 800; }
.mission-row small { margin-top: 2px; color: #c7c0d7; font-size: .77rem; line-height: 1.36; }
.mission-xp, .claim { color: #e1c7ff; font-size: .76rem; font-weight: 800; text-align: right; }
.claim { min-height: 44px; max-width: 87px; padding: 5px 6px; border: 1px solid #8e62bd; border-radius: 8px; background: #3a2852; }
.claim:hover { background: #4d316e; }
.rail-link { margin-top: 3px; }
.rankings-panel p { color: var(--muted); font-size: .875rem; line-height: 1.5; }

.continue-empty, .recent { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.continue-empty:hover, .recent:hover { border-color: #8966ae; }
.continue-empty strong, .continue-empty small, .recent strong, .recent small { display: block; }
.continue-empty strong, .recent strong { font-size: .9rem; }
.continue-empty small, .recent small { margin-top: 3px; color: var(--muted); font-size: .77rem; }
.continue-empty > svg, .recent > svg { margin-left: auto; color: var(--purple); }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); gap: 9px; }
.recent img { flex: none; width: 54px; height: 43px; border-radius: 8px; object-fit: cover; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(113px,1fr)); gap: 9px; }
.category-tile { display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: .89rem; font-weight: 800; }
.category-tile svg { color: var(--category); }
.category-tile:hover { border-color: var(--category); }

.catalog-controls { display: grid; gap: 11px; margin-bottom: 15px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter, .game-meta span { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 6px 11px; border: 1px solid #37344c; border-radius: 9px; background: #1b192c; color: #e0d8ef; font-size: .87rem; }
.filter:hover, .filter[aria-current] { border-color: #805eae; background: #302148; color: #f0dfff; }
.filter[aria-current] { font-weight: 800; }
.catalog-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: #151523; }
.catalog-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.results { color: #ded5ee; font-size: .88rem; font-weight: 750; }
.clear-search { display: flex; align-items: center; gap: 5px; min-height: 33px; max-width: 100%; padding: 4px 7px; border: 1px solid #58446e; border-radius: 7px; background: #2c2141; color: #ead6ff; font-size: .84rem; overflow-wrap: anywhere; }
.clear-search:hover { background: #483061; }
.select-wrap { display: inline-flex; position: relative; align-items: center; justify-self: end; gap: 7px; margin-bottom: 14px; color: var(--muted); font-size: .86rem; }
.catalog-toolbar .select-wrap { margin-bottom: 0; }
.select-wrap select { appearance: none; min-height: 40px; padding: 6px 29px 6px 9px; border: 1px solid #453654; border-radius: 8px; background: #272039; color: var(--ink); font-size: .86rem; font-weight: 720; }
.select-wrap svg { position: absolute; right: 8px; pointer-events: none; color: #e0cbfa; }
.empty { display: grid; justify-items: center; gap: 11px; padding: 42px 16px; border: 1px dashed #45384f; border-radius: var(--radius); background: var(--surface); text-align: center; color: var(--muted); }
.empty > svg { color: var(--purple); }
.empty h2 { color: var(--ink); font-size: 1.2rem; }
.empty .button { margin-top: 3px; }
.profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.profile-stats div { padding: 11px; border-radius: 10px; background: #272039; }
.profile-stats strong, .profile-stats span { display: block; }
.profile-stats span { color: var(--muted); font-size: .82rem; margin-top: 3px; }
.table-panel { overflow: auto; }
.table-panel table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.table-panel td, .table-panel th { padding: 11px; border-bottom: 1px solid var(--line); }
.table-panel tbody a:hover { text-decoration: underline; }

.back { margin-bottom: 5px; }
.back svg { transform: rotate(180deg); }
.game-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.game-heading .page-intro { margin-bottom: 12px; }
.game-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 17px; }
.game-meta span { min-height: 32px; padding: 4px 8px; font-size: .78rem; }
.player-card { padding: 9px; background: #171624; border: 1px solid #3a334d; border-radius: 17px; }
.player-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 5px 8px; min-height: 42px; color: #e0d6ed; font-size: .87rem; }
.player-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; margin-left:auto; }
.player-tools:has(.standalone-link) { flex-wrap:wrap; }
.player-tools p svg { margin-right: 3px; color: var(--purple); }
.player-tools .button { min-height: 36px; }
.player-shell { position: relative; width: 100%; aspect-ratio: 16/10; min-height: 365px; max-height: 692px; overflow: hidden; border: 1px solid #3d3451; border-radius: 11px; background: radial-gradient(ellipse at center,#2a2042,#12101f 75%); }
.player-viewport, .player-message { position: absolute; inset: 0; }
.player-shell iframe { display: block; width: 100%; height: 100%; border: 0; }
.player-message { display: grid; align-content: center; justify-items: center; gap: 12px; padding: 14px; text-align: center; color: #e8daf9; }
.loader { width: 28px; height: 28px; border: 2px solid #7b5ba3; border-top-color: #e8ccff; border-radius: 50%; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-guide { display: flex; align-items: flex-start; gap: 12px; margin-top: 15px; }
.player-guide p { margin-top: 4px; color: var(--muted); line-height: 1.5; font-size: .92rem; }

footer { display: flex; justify-content: space-between; gap: 15px; padding: 22px var(--gutter) 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .81rem; }
footer strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: .94rem; }
footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 13px; }
footer a:hover { color: var(--purple); text-decoration: underline; }
.toast { position: fixed; bottom: 18px; right: 18px; z-index: 14; max-width: min(430px,calc(100vw - 30px)); padding: 10px 13px; border: 1px solid #8b69bd; border-radius: 10px; background: #2d2145; color: #f3e7ff; font-size: .875rem; box-shadow: 0 8px 22px #090611b0; }
:where(.game-card, .hero, .toast, .empty) { animation: reveal .24s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1210px) {
  .layout { grid-template-columns: 196px minmax(0,1fr); }
  .sidebar { padding-inline: 11px; }
  .dashboard { grid-template-columns: minmax(0,1fr) minmax(220px,240px); gap: 14px; }
  .panel { padding: 13px; }
  .card-grid { gap: 9px; }
  .dashboard .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero-content { padding-inline: 24px; }
  .hero p { max-width: 278px; }
}
@media (max-width: 1030px) {
  .dashboard { grid-template-columns: minmax(0,1fr); }
  .dashboard .card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .rail { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; }
  .breadcrumb { display: none; }
  .topbar .search { margin-left: 0; }
  .topbar .top-heart { margin-left: auto; }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .layout { display: block; }
  .topbar { gap: 8px; padding: 0 var(--gutter); }
  .topbar .search { margin-left: auto; width: min(100%,365px); }
  .topbar .top-heart, .breadcrumb, .intro-link { display: none; }
  .topbar .mobile-menu { display: inline-grid; }
  .mobile-brand { display: flex; font-size: 1rem; }
  .sidebar {
    display: none; position: fixed; inset: 0 auto 0 0; z-index: 17; width: min(322px,88vw);
    height: 100dvh; padding: 18px 15px; box-shadow: 20px 0 55px #05040aae;
  }
  .menu-open .sidebar { display: flex; }
  .menu-open { overflow: hidden; }
  .sidebar-heading .drawer-close { display: inline-grid; }
  .menu-open:not(.signed-in) .sidebar { top: 0; height: 100dvh; }
  .menu-backdrop { display: block; position: fixed; z-index: 16; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #05040ab3; }
  .mobile-dock {
    position: fixed; z-index: 7; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
    padding: 4px max(9px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left));
    border-top: 1px solid #3a304d; background: #171425; box-shadow: 0 -8px 28px #0a081665;
  }
  .mobile-dock a { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 51px; padding: 2px; border-radius: 8px; color: #cac2d8; font-size: .73rem; font-weight: 750; }
  .mobile-dock a[aria-current] { background: #33234d; color: #e6ceff; font-weight: 800; }
  .mobile-dock a[aria-current] svg { color: #cca8ff; }
  .mobile-dock a:focus-visible { outline-offset: -2px; }
  .rail { display: none; }
  main { min-height: 67vh; padding-bottom: 28px; }
  footer { padding-bottom: calc(83px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 700px) {
  .topbar, .topbar:not(:has(.account-menu)) {
    display: grid; grid-template-columns: auto minmax(0,1fr) auto; column-gap: 8px; row-gap: 7px;
    height: auto; min-height: 0; padding-block: 8px;
  }
  .topbar .search, .topbar:not(:has(.account-menu)) .search { grid-column: 1 / -1; grid-row: 2; order: unset; margin: 0; width: 100%; min-height: 44px; }
  .topbar .search kbd { display: none; }
  .topbar #account-header { grid-column: 3; grid-row: 1; justify-self: end; order: unset; }
  .account-guest .button { min-height: 40px; padding-inline: 7px; font-size: .77rem; }
  .mobile-brand > span { display: none; }
  .page-intro { margin-bottom: 20px; }
  main { padding-top: 22px; }
  .card-grid, .dashboard .card-grid, .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .game-card .favorite { width: 44px; height: 44px; }
  .game-caption { padding-inline: 8px; }
  .profile-grid { grid-template-columns: minmax(0,1fr); }
  .player-shell { min-height: 364px; }
  .player-tools .button { padding-inline: 8px; font-size: .78rem; }
  footer { display: grid; }
  footer nav { justify-content: flex-start; }
}
@media (max-width: 620px) {
  :root { --gutter: 14px; }
  .hero { align-items: flex-end; min-height: 365px; border-radius: 17px; }
  .hero-picture { bottom: 17%; }
  .hero-image { object-position: 66% 42%; }
  .hero::after { background: linear-gradient(0deg,#171126 3%,#181226 19%,#171125ed 33%,#190f2b5a 73%,#180d221e),linear-gradient(90deg,#170e285e,transparent 70%); }
  .hero-content { padding: 60px 16px 17px; }
  .hero h2 { margin-top: 9px; font-size: clamp(2.3rem,8.8vw,3.35rem); }
  .hero p { margin-top: 8px; font-size: .91rem; max-width: 315px; }
  .hero-genres { margin-top: 9px; }
  .hero-actions { margin-top: 13px; }
  .page-intro h1 { font-size: 1.96rem; }
  .page-intro p { font-size: .94rem; }
  .card-grid, .dashboard .card-grid, .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .section { margin-top: 23px; }
  .section h2 { font-size: 1.13rem; }
  .section h2 svg { width: 18px; }
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter { min-height: 44px; }
  .workspace:has(main[data-route="juego"]) .topbar { position: relative; }
  .player-card { padding: 5px; }
  .player-shell { min-height: 340px; }
  .player-tools { padding: 0 3px 5px; font-size: .8rem; }
  .player-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; margin-left:auto; }
.player-tools:has(.standalone-link) { flex-wrap:wrap; }
.player-tools p svg { display: none; }
  .table-panel td, .table-panel th { padding: 7px 5px; }
}
@media (max-width: 355px) {
  .topbar .mobile-brand img { width: 29px; height: 29px; }
  .topbar .mobile-menu { width: 39px; }
  .account-guest { gap: 4px; }
  .account-guest .button { font-size: .72rem; }
  .game-caption h3 { font-size: .82rem; }
  .game-caption div > span { font-size: .72rem; }
  .card-play { width: 25px; height: 25px; }
  .section .text-link { font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.rotate-hint { display:none; }
@media (max-width: 700px) and (orientation: portrait) { .rotate-hint { display:inline; } }
