/* Visual refinements for the shared website layout. */
:root {
  --glow: #a56dff;
  --edge-glow: #a87aff42;
  --lift-shadow: 0 18px 46px #05030f45;
  --soft-ease: cubic-bezier(.2,.75,.3,1);
}
:root[data-theme=light] {
  --glow: #7944d8;
  --edge-glow: #8b58dd4d;
  --lift-shadow: 0 16px 38px #5637901c;
}
html { scroll-behavior: smooth; scrollbar-color: #7956a9 var(--bg); }
body {
  background: radial-gradient(ellipse 1000px 520px at 62% -170px, #6f3ebc1c, transparent 74%),
              radial-gradient(ellipse 700px 600px at 100% 54%, #6751c00c, transparent 74%), var(--bg);
  background-attachment: fixed;
}
:root[data-theme=light] body {
  background: radial-gradient(ellipse 1000px 520px at 63% -170px, #d8baff53, transparent 75%),
              radial-gradient(ellipse 800px 600px at 100% 50%, #c4d4fa3b, transparent 76%), var(--bg);
  background-attachment: fixed;
}
::selection { background: #9c67ff66; color: #fff; }
:root[data-theme=light] ::selection { color: #24143b; }
:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 3px; }

/* Navigation, search and page position. */
.workspace { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; max-width: none; }
.workspace > :not(.site-footer) { flex-shrink: 0; min-width: 0; }
.workspace > :nth-last-child(2) { margin-bottom: 30px; }
.workspace > .site-footer { flex-shrink: 0; margin-top: auto; }
.site-footer { flex-wrap: wrap; }
.footer-links { flex-wrap: wrap; align-items: center; }
@media (max-width: 680px) {
  .workspace > :nth-last-child(2) { margin-bottom: 25px; }
}
.topbar {
  border-bottom-color: var(--edge-glow);
  box-shadow: 0 8px 30px #08041218;
}
.topbar::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: linear-gradient(90deg, #5f55e7, #b570ff 63%, #e6a1ff);
  box-shadow: 0 0 12px #9b61f3aa;
  transform: scaleX(var(--page-progress, 0));
  transform-origin: left;
  pointer-events: none;
}
.account-dropdown { position: relative; flex: none; }
.account-button { min-height: 44px; list-style: none; border-radius: 10px; cursor: pointer; }
.account-button::-webkit-details-marker { display: none; }
.account-copy { display: block; }
.account-dropdown[open] .account-button > .icon { transform: rotate(180deg); }
.account-menu {
  position: absolute;
  z-index: 80;
  inset: calc(100% + 10px) 0 auto auto;
  display: grid;
  width: min(190px, calc(100vw - 24px));
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 32px #08041240;
}
.account-dropdown:not([open]) > .account-menu { display: none; }
.account-menu > a, .account-menu > button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.account-menu > a:hover, .account-menu > button:hover,
.account-menu > a:focus-visible, .account-menu > button:focus-visible { background: var(--accent-soft); }
.account-menu .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }
.notifications-dropdown { position: relative; flex: none; }
.booting .header-right > .notifications-dropdown:has([aria-expanded='true']) { animation: none; }
.notifications-dropdown > .notification-button { min-height: 44px; }
.notification-button[aria-expanded='true'] { color: var(--accent); background: var(--accent-soft); }
.notifications-menu {
  --inbox-bg: #10101d;
  --inbox-panel: #191827;
  --inbox-text: #f6f3ff;
  --inbox-muted: #bcb6d1;
  --inbox-line: #3b3053;
  --inbox-accent: #c384ff;
  --inbox-edge: #7650b4;
  --inbox-comet: #f3e2ff;
  --inbox-comet-b: #fff;
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 140px minmax(0, 1fr);
  width: min(1360px, calc(100vw - 64px));
  height: min(820px, calc(100dvh - 80px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 20px;
  border: 1.5px solid transparent;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 76% 0%, #7438c128, transparent 46%) padding-box,
    linear-gradient(var(--inbox-bg), var(--inbox-bg)) padding-box,
    conic-gradient(from var(--spin, 0deg), var(--inbox-edge) 0 20deg, #b57cff 50deg, var(--inbox-comet) 76deg, #ff9fe0 88deg, var(--inbox-edge) 112deg 200deg, #8fa6ff 232deg, var(--inbox-comet-b) 258deg, var(--inbox-edge) 284deg) border-box;
  color: var(--inbox-text);
  box-shadow: 0 0 0 1px #a56dff50, inset 0 0 24px #9f59ff19, 0 0 28px #963eff30, 0 30px 100px #03010dcc;
  overflow: hidden;
  text-align: left;
}
.notifications-menu:not([open]) { display: none; }
.notifications-menu::backdrop { background: #05050ed1; backdrop-filter: blur(7px); }
body.notifications-open { overflow: hidden; }
.notifications-heading {
  position: relative;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 6px 32px 25px;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(circle at 56% 13%, #bd83ff 0 1px, transparent 3px), radial-gradient(circle at 62% 83%, #a45cff 0 1px, transparent 3px), radial-gradient(circle at 91% 18%, #d7baff 0 1px, transparent 2px);
}
.notifications-hero-icon { display: grid; place-items: center; flex: 0 0 90px; height: 90px; border: 1px solid #a56aff80; border-radius: 22px; background: linear-gradient(135deg, #33205160, #6f30c52e); box-shadow: inset 0 0 25px #923aff18, 0 0 25px #8f3aff15; color: var(--inbox-accent); }
.notifications-hero-icon .icon { width: 44px; height: 44px; filter: drop-shadow(0 0 8px #b467ff60); }
.notifications-heading-copy { position: relative; z-index: 1; min-width: 0; }
.notifications-heading h2 { margin: 0 0 9px; font: 650 clamp(24px, 2.5vw, 36px)/1.2 var(--font-pixel, 'Outfit', sans-serif); letter-spacing: -.5px; }
.notifications-heading h2 span { color: var(--inbox-accent); }
.notifications-heading p { margin: 0; color: var(--inbox-muted); font-size: 15px; line-height: 1.6; }
.notifications-hero-art { position: absolute; z-index: -1; right: 60px; bottom: -71px; width: 350px; height: 234px; pointer-events: none; }
/* The orbit scene is cut into layers (positions are % of the original 1536x1024 artwork) so each piece can float on its own. */
.orbit-piece { position: absolute; display: block; max-width: none; height: auto; }
.orbit-moon { left: 2.995%; top: 26.367%; width: 94.01%; }
.orbit-robot { left: 28.385%; top: 9.18%; width: 44.531%; }
.orbit-planet { left: 72.396%; top: 22.852%; width: 22.917%; }
.orbit-star-left { left: 15.885%; top: 45.117%; width: 9.635%; }
.orbit-star-right { left: 79.297%; top: 51.758%; width: 12.76%; }
.notifications-close { position: absolute; top: 0; right: 0; width: 46px; height: 46px; border: 1px solid var(--inbox-line); border-radius: 13px; color: var(--inbox-text); background: #7e49bd0b; }
.notifications-close:hover { color: var(--inbox-accent); background: #a56dff20; }
.notifications-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 0; border: 1px solid var(--inbox-line); border-radius: 18px; background: #08081230; overflow: hidden; }
.notifications-sidebar { display: flex; flex-direction: column; min-height: 0; gap: 30px; padding: 26px 12px; border-right: 1px solid var(--inbox-line); background: linear-gradient(145deg, #8e62c00d, transparent 60%); }
.notifications-filters { display: grid; gap: 8px; }
.notification-filter { position: relative; display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 54px; padding: 10px 13px; border: 1px solid transparent; border-radius: 13px; color: var(--inbox-muted); font-size: 13px; text-align: left; }
.notification-filter > .icon { flex-shrink: 0; width: 21px; height: 21px; }
.notification-filter > span { white-space: nowrap; }
.notification-filter > b { display: grid; place-items: center; flex-shrink: 0; min-width: 34px; height: 28px; margin-left: auto; border: 1px solid #a46be443; border-radius: 18px; background: #a264ef12; font-size: 13px; font-weight: 500; }
.notification-filter:hover { background: #9c61ed13; color: var(--inbox-text); }
.notification-filter.active { border-color: #aa6eff65; background: linear-gradient(110deg, #7e3cce27, #9b5de542); box-shadow: inset 0 0 18px #8e47df13, 0 0 17px #8743dd13; color: var(--inbox-text); }
.notification-filter.active::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: #e8caff; box-shadow: 0 0 12px 2px #b364ff; }
.notification-filter.active > .icon { color: var(--inbox-accent); }
.notification-filter.active > b { border-color: #c38dff; background: linear-gradient(135deg, #a14df4, #7b31d7); color: #fff; box-shadow: 0 0 13px #9942ff35; }
.notification-filter-dot, .notification-unread-dot { display: inline-block; flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: #ad56fa; box-shadow: 0 0 12px #a64cff70; }
.notification-filter-dot { width: 7px; height: 7px; margin-left: -5px; }
.notifications-promo { position: relative; min-height: 194px; margin: auto 18px 0; padding: 24px 20px; border: 1px solid #a768fa80; border-radius: 20px; background: radial-gradient(circle at 70% 8%, #e6caff 0 1px, transparent 2px), radial-gradient(circle at 14% 75%, #af6bff 0 1px, transparent 2px), linear-gradient(145deg, #2a173e65, #151027); overflow: hidden; }
.notifications-promo > .icon { position: relative; z-index: 1; width: 34px; height: 34px; color: #cd76ff; }
.notifications-promo p { position: relative; z-index: 1; margin: 13px 0 25px; color: #f2ebff; font-size: 14px; line-height: 1.6; }
.notifications-promo p span { color: #c8bbeb; font-size: 12px; }
.notifications-promo-planet { position: absolute; width: 210px; height: 125px; right: -55px; bottom: -80px; border: 1px solid #d29cff; border-radius: 50%; background: radial-gradient(ellipse at 32% 10%, #9e5afa, #452185 46%, #160d30 75%); box-shadow: 0 -4px 18px #af61ff80, inset 0 10px 18px #c184ff66; transform: rotate(-24deg); }
.notifications-inbox { display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; min-width: 0; }
.notifications-list { min-height: 0; padding: 20px 24px 20px 28px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #65418c transparent; }
.notification-group + .notification-group { margin-top: 20px; }
.notification-group-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.notification-group-heading h3 { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 21px/1.3 var(--font-pixel, 'Outfit', sans-serif); }
.notification-group-heading h3 > .icon { width: 23px; height: 23px; padding: 3px; border: 1px solid #a46be43d; border-radius: 50%; color: var(--inbox-accent); background: #9c57ea15; }
.notification-group-heading > small { color: var(--inbox-muted); font-size: 12px; }
.notification-item { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 20px; min-height: 103px; padding: 17px 26px 17px 20px; border: 1px solid var(--inbox-line); border-radius: 15px; background: linear-gradient(112deg, #a487d608, transparent), var(--inbox-panel); }
.notification-item + .notification-item { margin-top: 8px; }
.notification-item.is-unread { border-color: #8b58c544; background: linear-gradient(110deg, #a46be413, #6f46ae03), var(--inbox-panel); }
.notification-item.is-unread::before { content: ''; position: absolute; inset: 12px auto 12px 0; width: 2px; border-radius: 2px; background: #dcb1ff; box-shadow: 0 0 12px #b96fff; }
.notification-art { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid #ac69f54a; border-radius: 15px; background: radial-gradient(circle, #8f43e435, #3d24582b 65%); color: var(--inbox-accent); }
.notification-art .icon { width: 31px; height: 31px; filter: drop-shadow(0 0 7px #ad61fa55); }
.notification-achievement .notification-art { border-color: #bc885b42; background: radial-gradient(circle, #e29a3926, #4e28392b); color: #ffc76e; }
.notification-copy { min-width: 0; }
.notification-item strong { display: block; font-size: 16px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.notification-item p { margin: 4px 0 7px; color: var(--inbox-muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.notification-item small { display: block; color: var(--inbox-muted); opacity: .8; font-size: 11px; }
.notification-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.notifications-menu .button { min-height: 42px; margin: 0; padding: 9px 15px; border-radius: 11px; font-size: 12px; white-space: nowrap; }
.notifications-menu .button.primary { border: 1px solid #bd7bff; background: linear-gradient(110deg, #7f22ce, #6330a8); box-shadow: inset 0 1px #ffffff20, 0 0 15px #932dff26; color: #fff; }
.notifications-menu .button.primary:hover { background: linear-gradient(110deg, #9437e5, #7940c4); }
.notifications-menu .button.outline { border: 1px solid #8462ac70; background: #a57ad506; color: var(--inbox-text); }
.notifications-menu .button.outline:hover { border-color: var(--inbox-accent); background: #ab6bff17; }
.notification-actions .button > .icon { flex-shrink: 0; width: 18px; height: 18px; }
.notification-item > .notification-unread-dot { position: absolute; top: 12px; right: 12px; }
.notification-item:not(.is-unread) { min-height: 88px; grid-template-columns: 54px minmax(0, 1fr) auto; padding-block: 10px; }
.notification-item:not(.is-unread) .notification-art { width: 54px; height: 54px; }
.notification-item:not(.is-unread) strong { font-size: 14px; }
.notification-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; padding: 40px 24px; text-align: center; }
.notification-empty > .icon { width: 54px; height: 54px; margin-bottom: 22px; padding: 13px; border: 1px solid var(--inbox-line); border-radius: 18px; background: #9e5eea15; color: var(--inbox-accent); }
.notification-empty strong { font: 600 23px var(--font-pixel, 'Outfit', sans-serif); }
.notification-empty p { max-width: 350px; margin: 10px 0 0; color: var(--inbox-muted); font-size: 14px; line-height: 1.7; }
.notification-error { margin: 0 0 18px; padding: 18px; border: 1px solid #ed6b8640; border-radius: 12px; background: #ed6b860a; color: #f18da5; font-size: 13px; line-height: 1.7; }
.notifications-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 12px; padding-top: 12px; border-top: 1px solid var(--inbox-line); }
.notifications-footer > small { flex: 1; color: var(--inbox-muted); font-size: 11px; }
.notifications-footer > div { display: contents; }
.notifications-footer .button { order: 1; justify-content: center; width: 100%; padding-inline: 8px; font-size: 11px; }
.notifications-footer .icon-button { color: var(--inbox-muted); }
.notifications-footer .icon-button:hover { background: #ac6aff17; color: var(--inbox-accent); }
.notifications-menu .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
:root[data-theme=light] .notifications-menu { --inbox-bg: #faf7ff; --inbox-panel: #fff; --inbox-text: #281c3b; --inbox-muted: #716380; --inbox-line: #ded1ec; --inbox-accent: #8440c4; --inbox-edge: #d4b8f4; --inbox-comet: #9b3cf0; --inbox-comet-b: #5a6cff; box-shadow: 0 0 0 1px #a56dff30, 0 30px 100px #26133e55; }
@media (max-width: 1200px) {
  .notifications-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .notifications-sidebar { padding-inline: 10px; }
  .notification-filter { gap: 9px; padding-inline: 10px; font-size: 12px; }
  .notifications-promo { margin-inline: 10px; padding-inline: 16px; }
  .notifications-heading { gap: 22px; padding-left: 20px; }
  .notifications-heading-copy { max-width: 72%; }
  .notifications-heading p { max-width: 490px; font-size: 13px; }
  .notifications-hero-art { right: 35px; opacity: .65; }
  .notification-item { gap: 14px; padding-left: 14px; }
  .notification-actions { flex-direction: column; }
  .notification-actions .button { justify-content: center; }
}
@media (max-width: 1000px) {
  .notifications-menu { grid-template-rows: 130px minmax(0, 1fr); padding: 16px; }
  .notifications-hero-icon { flex-basis: 70px; height: 70px; border-radius: 18px; }
  .notifications-heading { padding-left: 12px; }
  .notifications-hero-art { opacity: .3; }
  .notifications-list { padding: 20px 16px; }
  .notification-item, .notification-item:not(.is-unread) { grid-template-columns: 54px minmax(0, 1fr); }
  .notification-art { width: 54px; height: 54px; }
  .notification-actions { grid-column: 2; flex-direction: row; justify-content: flex-start; }
  .notification-actions:empty { display: none; }
  .notification-group-heading h3 { font-size: 18px; }
  .notification-group-heading > small { font-size: 10px; }
}
@media (min-width: 761px) and (max-height: 800px) {
  .notifications-promo { display: none; }
}
@media (max-width: 760px) {
  .notifications-menu { width: calc(100vw - 24px); height: calc(100dvh - 32px); padding: 12px; border-radius: 20px; }
  .notifications-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; border-radius: 14px; }
  .notifications-heading { gap: 16px; padding: 0 46px 18px 6px; }
  .notifications-heading-copy { max-width: none; }
  .notifications-heading h2 { font-size: 26px; }
  .notifications-heading p { font-size: 12px; }
  .notifications-close { width: 36px; height: 36px; border-radius: 10px; }
  .notifications-hero-art { display: none; }
  .notifications-sidebar { display: contents; }
  .notifications-filters { grid-row: 1; grid-column: 1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px; padding: 10px; border-bottom: 1px solid var(--inbox-line); }
  .notifications-inbox { grid-row: 2; grid-column: 1; }
  .notification-filter { justify-content: center; min-height: 46px; gap: 8px; padding: 8px; }
  .notification-filter > .icon { width: 17px; height: 17px; }
  .notification-filter > b { min-width: 24px; height: 24px; margin-left: 0; font-size: 11px; }
  .notification-filter-dot, .notifications-promo { display: none; }
  .notifications-menu .button { padding: 9px 12px; font-size: 11px; }
  .notification-item { padding-block: 15px; }
  .notification-group + .notification-group { margin-top: 24px; }
  .notifications-footer { grid-row: 3; grid-column: 1; justify-content: space-between; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 10px 14px; }
  .notifications-footer > small { flex: initial; }
  .notifications-footer > div { display: flex; align-items: center; gap: 6px; }
  .notifications-footer .button { order: initial; width: auto; }
}
@media (max-width: 480px) {
  .notifications-menu { grid-template-rows: 140px minmax(0, 1fr); width: calc(100vw - 16px); height: calc(100dvh - 20px); padding: 10px; }
  .notifications-heading { gap: 12px; padding-left: 4px; }
  .notifications-hero-icon { flex-basis: 46px; height: 50px; border-radius: 14px; }
  .notifications-hero-icon .icon { width: 28px; height: 28px; }
  .notifications-heading h2 { font-size: 23px; }
  .notifications-heading h2 span { display: block; }
  .notification-filter { gap: 6px; padding-inline: 4px; font-size: 10px; }
  .notification-filter > span { white-space: normal; }
  .notification-filter > .icon { display: none; }
  .notification-filter > b { min-width: 21px; height: 21px; }
  .notifications-list { padding: 18px 10px; }
  .notification-group-heading { gap: 8px; }
  .notification-group-heading h3 { gap: 6px; font-size: 17px; }
  .notification-group-heading > small { font-size: 9px; }
  .notification-item, .notification-item:not(.is-unread) { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px 22px 14px 14px; }
  .notification-art, .notification-item:not(.is-unread) .notification-art { width: 44px; height: 48px; border-radius: 12px; }
  .notification-art .icon { width: 26px; height: 26px; }
  .notification-item strong { padding-right: 5px; font-size: 14px; }
  .notification-item p { font-size: 12px; }
  .notification-actions { grid-column: 1 / -1; gap: 8px; }
  .notification-empty { min-height: 240px; padding: 24px 16px; }
  .notification-empty strong { font-size: 21px; }
  .notification-empty p { font-size: 13px; }
  .notifications-footer { padding-inline: 10px; }
  .notifications-footer > small { max-width: 90px; font-size: 10px; }
  .notifications-footer .button { padding-inline: 8px; font-size: 10px; }
}
.main-column > .hero + .section, .mission-grid + .daily-panel { margin-block-start: 28px; }
@media (max-width: 900px) {
  .account-button > .account-copy { display: none; }
}
@media (max-width: 680px) {
  .notifications-dropdown > .notification-button { width: 33px; }
  .main-column > .hero + .section, .mission-grid + .daily-panel { margin-block-start: 20px; }
}
.sidebar {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 30%, var(--bg));
  border-right-color: var(--edge-glow);
}
.nav-link { position: relative; overflow: hidden; border: 1px solid transparent; }
.nav-link:hover:not(.active) { transform: translateX(3px); border-color: var(--border); }
.nav-link.active {
  background: linear-gradient(110deg, #7040dc, #985aef 74%, #ac72f5);
  box-shadow: 0 7px 23px #7945e849, inset 0 1px #ffffff35;
}
.nav-link.active::before {
  content: '';
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #fff;
  box-shadow: 0 0 13px #fff;
}
.nav-link .pill { box-shadow: inset 0 1px #ffffff12; }
.global-search input { border-radius: 12px; transition: border-color .24s, box-shadow .24s, background-color .24s; }
.global-search:focus-within input {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px #9c68ff1c, 0 8px 22px #140a3425;
  outline: none;
}
.global-search:focus-within > .icon { color: var(--accent); }
.icon-button:hover { transform: translateY(-2px); box-shadow: 0 5px 16px #8d57c722; }
.online-total .dot, .live-badge .dot { animation: presence-pulse 2.8s ease-in-out infinite; }

/* Hero artwork and page banners. The light follows the pointer on hover. */
.hero, .page-banner, .profile-cover { --spot-x: 75%; --spot-y: 38%; }
.hero {
  border-radius: 22px;
  border-color: #b383ef69;
  box-shadow: 0 21px 64px #14072e58, inset 0 1px #ffffff35;
}
.hero::before, .page-banner::before, .profile-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 340px at var(--spot-x) var(--spot-y), #ffffff24, transparent 75%);
  opacity: .7;
}
.hero::before { z-index: 0; }
.hero-copy { position: relative; z-index: 1; }
.hero-image { transition: transform .9s var(--soft-ease), filter .7s ease; }
.hero-pixel-art { image-rendering: pixelated; }
@media (max-width: 680px) { .hero-pixel-art { object-position: 75% center; } }
.hero:hover .hero-image { transform: scale(1.035); filter: saturate(1.09); }
.hero .eyebrow, .page-banner .eyebrow {
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #ffffff37;
  border-radius: 999px;
  background: #1b103b6b;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px #ffffff19;
}
.hero .hero-title { text-shadow: 0 3px 24px #1506287d; }
.hero .hero-title span { color: #e4baff; text-shadow: 0 0 28px #a25df07a; }
.hero-label { border-radius: 9px; box-shadow: 0 6px 18px #12062138; }
.hero-pager span:first-child { box-shadow: 0 0 12px #d1a9ff88; }
.hero-features span { transition: color .22s, transform .22s; }
.hero-features span:hover { color: var(--text); transform: translateY(-2px); }
.page-banner {
  border-radius: 20px;
  border-color: #ae79eb68;
  box-shadow: 0 16px 46px #1008293d, inset 0 1px #ffffff20;
  background: linear-gradient(115deg, #422566, #251d46 75%);
}
.page-banner::before { z-index: 1; }
.page-banner h1 { max-width: 670px; letter-spacing: -1.1px; text-wrap: balance; text-shadow: 0 3px 23px #14092672; }
.page-banner::after { opacity: .59; transition: transform .8s var(--soft-ease); }
.page-banner:hover::after { transform: scale(1.04); }
.profile-cover { overflow: hidden; box-shadow: 0 18px 45px #1c0d3730; }
.profile-cover::before { background: radial-gradient(circle 370px at var(--spot-x) var(--spot-y), #ffffff2e, transparent 75%); }

/* Buttons and selection controls. */
.button { position: relative; overflow: hidden; border-radius: 11px; transition: transform .22s var(--soft-ease), background-color .22s, border-color .22s, box-shadow .22s, color .22s; }
.button:not(:disabled):hover { transform: translateY(-2px); }
.button.primary { box-shadow: 0 7px 22px #8144ed36, inset 0 1px #ffffff48; }
.button.primary::before, .floating-chat::before {
  content: '';
  position: absolute;
  inset: -20% auto -20% -70%;
  width: 42%;
  background: linear-gradient(90deg, transparent, #ffffff55, transparent);
  transform: skewX(-24deg);
  transition: left .55s ease;
  pointer-events: none;
}
.button.primary:hover::before, .floating-chat:hover::before { left: 135%; }
.button.outline:hover { border-color: var(--accent); box-shadow: 0 6px 18px #8050d321; }
/* Keep hover movement and shadows inside the horizontal scroller. */
.categories { margin-block: 18px 9px; padding-block: 8px 20px; }
.category { flex-shrink: 0; border-radius: 11px; transition: transform .22s var(--soft-ease), border-color .22s, background-color .22s, box-shadow .22s, color .22s; }
.category:hover { transform: translateY(-2px); box-shadow: 0 7px 17px #8055cb22; }
.category.active { box-shadow: inset 0 1px #ffffff19, 0 5px 16px #854de023; }
/* Rating HUD: chamfered neon panel; --level drives the lit tiles, the signal bars and the readout. */
.rating-hud {
  --cut: 14px;
  --hud-edge: linear-gradient(135deg, #a874ff, #6b4bd8 40%, #3a2a66 70%, #39d5ff);
  --hud-fill: radial-gradient(circle at 100% 0%, #8a55ff26, transparent 55%), linear-gradient(160deg, #18132a, #0d0b16);
  --tile-fill: linear-gradient(160deg, #241a3d, #130f22);
  --tile-off: #3a3648;
  --tile-off-fill: linear-gradient(160deg, #1d1b26, #15141c);
  --cyan: #39d5ff;
  --neon: #b17cff;
  --level: 0;
  position: relative;
  isolation: isolate;
  margin-top: 18px;
  padding: 16px 14px 14px;
  background: var(--hud-edge);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.rating-hud::before {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--hud-fill);
  clip-path: inherit;
}
:root[data-theme=light] .rating-hud {
  --hud-edge: linear-gradient(135deg, #8a55f0, #c3a8f7 45%, #e2d6fb 70%, #2fb6e0);
  --hud-fill: radial-gradient(circle at 100% 0%, #8a55ff1c, transparent 55%), linear-gradient(160deg, #fbf9ff, #f1ecfc);
  --tile-fill: linear-gradient(160deg, #f4ecff, #e7dafd);
  --tile-off: #d9d4e6;
  --tile-off-fill: linear-gradient(160deg, #f6f5fa, #eeedf4);
  --cyan: #1aa6d6;
  --neon: #7741dc;
}
.rating-field { display: flex; flex-direction: column; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.rating-field legend {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 14px;
  padding: 0;
  font-family: var(--font-pixel, 'Outfit', sans-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.3px;
  color: var(--text);
}
.rating-field legend span span { color: var(--neon); text-shadow: 0 0 14px #a874ff66; }
.rating-slashes {
  width: 20px;
  height: 13px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #7c4dff 0 45%, transparent 45% 55%, var(--cyan) 55%);
  transform: skewX(-32deg);
  clip-path: polygon(0 0, 40% 0, 40% 100%, 0 100%, 0 0, 60% 0, 100% 0, 100% 100%, 60% 100%, 60% 0);
}
.rating-controls { display: flex; gap: 6px; }
.rating-option { position: relative; flex: 1; min-width: 0; cursor: pointer; transition: transform .35s var(--ease-spring, ease), filter .35s ease; }
.rating-option input { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.rating-control {
  --chamfer: 7px;
  --lit: clamp(0, var(--level) - var(--s) + 1, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 8px 0 7px;
  color: var(--faint);
  background: var(--tile-off);
  clip-path: polygon(var(--chamfer) 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)), 0 var(--chamfer));
  pointer-events: none;
  transition: color .3s ease, background .3s ease;
}
.rating-control::before {
  content: '';
  position: absolute;
  inset: 1.5px;
  z-index: 0;
  background: var(--tile-off-fill);
  clip-path: inherit;
  transition: opacity .3s ease;
}
.rating-control::after {
  content: '';
  position: absolute;
  top: 0;
  left: 26%;
  right: 26%;
  height: 2px;
  z-index: 1;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transform: scaleX(var(--lit));
  transition: transform .45s var(--ease-out-expo, ease);
}
.rating-control > * { position: relative; z-index: 1; }
.rating-control .icon { width: 31px; height: 31px; stroke-width: 1.9; transition: transform .45s var(--ease-spring, ease), filter .3s ease; }
.rating-value { font-family: var(--font-pixel, 'Outfit', sans-serif); font-size: 15px; font-weight: 700; line-height: 1; color: var(--muted); }
.rating-value::after { content: ''; display: block; width: 12px; height: 2px; margin: 4px auto 0; border-radius: 2px; background: currentColor; opacity: .45; }

/* Selected value, then the hovered one wins while the pointer is over the row. */
.rating-field:has(input[value='1']:checked) { --level: 1; }
.rating-field:has(input[value='2']:checked) { --level: 2; }
.rating-field:has(input[value='3']:checked) { --level: 3; }
.rating-field:has(input[value='4']:checked) { --level: 4; }
.rating-field:has(input[value='5']:checked) { --level: 5; }
.rating-field:has(.rating-option:nth-child(1):hover) { --level: 1; }
.rating-field:has(.rating-option:nth-child(2):hover) { --level: 2; }
.rating-field:has(.rating-option:nth-child(3):hover) { --level: 3; }
.rating-field:has(.rating-option:nth-child(4):hover) { --level: 4; }
.rating-field:has(.rating-option:nth-child(5):hover) { --level: 5; }
.rating-option:hover { transform: translateY(-3px); }
.rating-option:hover .rating-control .icon { transform: scale(1.12) rotate(-6deg); }
/* Each tile lights when its score is at or below --level (1 or 0, via clamp). */
.rating-option .rating-control {
  color: color-mix(in srgb, var(--neon) calc(var(--lit) * 100%), var(--faint));
  background: color-mix(in srgb, var(--neon) calc(var(--lit) * 100%), var(--tile-off));
}
.rating-option .rating-control::before { box-shadow: inset 0 0 18px color-mix(in srgb, var(--neon) calc(var(--lit) * 45%), transparent); }
.rating-control .icon, .rating-value { filter: drop-shadow(0 0 calc(var(--lit) * 7px) color-mix(in srgb, var(--neon) calc(var(--lit) * 90%), transparent)); }
.rating-control .rating-value { color: color-mix(in srgb, var(--text) calc(var(--lit) * 100%), var(--faint)); }
.rating-option { filter: drop-shadow(0 0 10px color-mix(in srgb, #9b5cff calc(clamp(0, var(--level) - var(--s) + 1, 1) * 55%), transparent)); }
.rating-option:has(input:checked) .rating-control { animation: rate-pop .55s var(--ease-spring, ease); }
.rating-option input:focus-visible + .rating-control { outline: none; }
.rating-option:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
@keyframes rate-pop { 0% { transform: scale(1); } 35% { transform: scale(.88); } 100% { transform: scale(1); } }

/* Readout: a chamfered pill whose notch slides under the active tile. */
.rating-readout {
  position: relative;
  display: flex;
  align-items: center;
  order: 2;
  gap: 12px;
  padding: 11px 14px;
  background: linear-gradient(90deg, var(--neon), #5b47c8 50%, var(--cyan));
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
.rating-readout::before {
  content: '';
  position: absolute;
  inset: 1.5px;
  background: var(--hud-fill);
  clip-path: inherit;
}
.rating-readout > * { position: relative; }
.rating-field::after {
  content: '';
  display: block;
  width: 12px;
  height: 7px;
  order: 1;
  margin: 8px 0 -1px calc((var(--level) - .5) * 20% - 6px);
  background: var(--neon);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: clamp(0, var(--level), 1);
  transition: margin .45s var(--ease-out-expo, ease), opacity .3s;
  position: relative;
  z-index: 1;
}
.rating-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; padding-right: 12px; border-right: 1px solid var(--border); }
.rating-bars i {
  width: 3px;
  height: calc(var(--b) * 3px + 1px);
  border-radius: 1px;
  background: linear-gradient(var(--cyan), var(--neon));
  opacity: clamp(.18, (var(--level) - var(--b) + 1) * 999, 1);
  transform-origin: bottom;
  transform: scaleY(clamp(.55, (var(--level) - var(--b) + 1) * 999, 1));
  transition: opacity .3s calc(var(--b) * 40ms), transform .45s calc(var(--b) * 40ms) var(--ease-spring, ease);
}
.rating-readout-text { position: relative; display: grid; flex: 1; min-width: 0; font-size: 13px; color: var(--text); }
.rating-readout-text > * {
  grid-area: 1 / 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .3s ease, transform .4s var(--ease-out-expo, ease), filter .3s ease;
}
.rating-readout-text > [style] {
  --off: clamp(0, max(var(--level) - var(--s), var(--s) - var(--level)), 1);
  opacity: calc(1 - var(--off));
  transform: translateY(calc(clamp(-1, var(--s) - var(--level), 1) * 10px));
  filter: blur(calc(var(--off) * 4px));
}
.rating-readout-text strong { font-family: var(--font-pixel, 'Outfit', sans-serif); font-size: 16px; font-weight: 700; color: var(--neon); }
.rating-readout-hint { color: var(--muted); opacity: calc(1 - clamp(0, var(--level), 1)); }
.rating-hud > small { display: block; margin-top: 0; font-size: 11px; color: var(--muted); text-align: center; }
.play-panel > .rating-hud { grid-column: 1 / -1; }
.rating-hud.is-saving .rating-controls { pointer-events: none; }
.rating-hud.is-saving .rating-readout { animation: readout-sync .7s ease-in-out infinite alternate; }
@keyframes readout-sync { to { filter: brightness(1.45) drop-shadow(0 0 8px #a874ff99); } }

/* Neon life: lit tiles hum, flicker like gas tubes and get scanned. Every keyframe scales with
   --lit, so unlit tiles stay still; durations differ per tile so they never pulse in sync. */
.rating-option { animation: neon-breathe calc(2.6s + var(--s) * .3s) calc(var(--s) * -.45s) ease-in-out infinite; }
@keyframes neon-breathe {
  50% { filter: drop-shadow(0 0 17px color-mix(in srgb, #a06bff calc(clamp(0, var(--level) - var(--s) + 1, 1) * 80%), transparent)); }
}
.rating-control .icon { animation: neon-hum calc(2.3s + var(--s) * .47s) calc(var(--s) * -.9s) linear infinite; }
@keyframes neon-hum {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 calc(var(--lit) * 5px) color-mix(in srgb, var(--neon) calc(var(--lit) * 80%), transparent)); }
  40% { filter: drop-shadow(0 0 calc(var(--lit) * 11px) color-mix(in srgb, var(--neon) calc(var(--lit) * 100%), transparent)) brightness(calc(1 + var(--lit) * .3)); }
  70%, 73.5%, 77% { opacity: 1; }
  71.5% { opacity: calc(1 - var(--lit) * .6); }
  75% { opacity: calc(1 - var(--lit) * .35); }
  76% { opacity: calc(1 - var(--lit) * .7); }
}
.rating-option .rating-control::before {
  background:
    linear-gradient(180deg, transparent 42%, color-mix(in srgb, var(--neon) calc(var(--lit) * 30%), transparent) 50%, transparent 58%) 0 100% / 100% 320% no-repeat,
    var(--tile-off-fill);
  animation: neon-scan 3.4s calc(var(--s) * .14s) cubic-bezier(.45, 0, .55, 1) infinite;
}
@keyframes neon-scan { 55%, 100% { background-position: 0 0, 0 0; } }
.rating-control::after {
  background: linear-gradient(90deg, var(--cyan) 30%, #e6fbff 50%, var(--cyan) 70%) 100% 0 / 300% 100%;
  animation: neon-sheen 2.4s calc(var(--s) * .12s) linear infinite;
}
@keyframes neon-sheen { 60%, 100% { background-position: 0 0; } }
.rating-field::after { animation: neon-blink 1.8s ease-in-out infinite; }
@keyframes neon-blink { 50% { filter: drop-shadow(0 0 6px var(--neon)) brightness(1.4); } }
.rating-bars i { animation: bar-signal 1.4s calc(var(--b) * .12s) ease-in-out infinite; }
@keyframes bar-signal { 50% { filter: brightness(1.6) drop-shadow(0 0 4px var(--cyan)); } }
.rating-readout-text strong { animation: text-neon 3.1s linear infinite; }
@keyframes text-neon {
  0%, 100% { text-shadow: 0 0 10px #a874ff88; }
  50% { text-shadow: 0 0 16px #a874ffcc, 0 0 2px #fff6; }
  83%, 86% { opacity: 1; }
  84% { opacity: .55; }
}

/* Standby: unlit tiles catch a slow neon wave from left to right, inviting a pick. */
.rating-option .rating-control { animation: neon-standby 3.2s calc(var(--s) * .16s) ease-in-out infinite; }
@keyframes neon-standby {
  0%, 30%, 100% { background: color-mix(in srgb, var(--neon) calc(var(--lit) * 100%), var(--tile-off)); }
  12% { background: color-mix(in srgb, var(--neon) calc((var(--lit) + (1 - var(--lit)) * .7) * 100%), var(--tile-off)); }
}
.rating-option .rating-value { animation: standby-text 3.2s calc(var(--s) * .16s) ease-in-out infinite; }
@keyframes standby-text {
  0%, 30%, 100% { color: color-mix(in srgb, var(--text) calc(var(--lit) * 100%), var(--faint)); }
  12% { color: color-mix(in srgb, var(--text) calc((var(--lit) + (1 - var(--lit)) * .65) * 100%), var(--faint)); }
}

/* Choosing a score powers the row up from the left like a neon sign being switched on. */
.rating-controls.is-charging .rating-option .rating-control { animation: neon-ignite .7s calc((var(--s) - 1) * 75ms) steps(1, end) backwards; }
.rating-controls.is-charging .rating-option:has(input:checked) .rating-control {
  animation: neon-ignite .7s calc((var(--s) - 1) * 75ms) steps(1, end) backwards, rate-pop .55s calc((var(--s) - 1) * 75ms + .25s) var(--ease-spring, ease) backwards;
}
@keyframes neon-ignite {
  0% { filter: brightness(calc(1 - var(--lit) * .75)); }
  15% { filter: brightness(calc(1 + var(--lit) * .9)); }
  25% { filter: brightness(calc(1 - var(--lit) * .55)); }
  40% { filter: brightness(calc(1 + var(--lit) * .5)); }
  55% { filter: brightness(calc(1 - var(--lit) * .2)); }
  70%, 100% { filter: none; }
}
.rating-option::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--neon);
  border-radius: 10px;
  box-shadow: 0 0 14px var(--neon), inset 0 0 10px var(--neon);
  opacity: 0;
  pointer-events: none;
}
.rating-controls.is-charging .rating-option:has(input:checked)::after { animation: neon-ring .75s calc((var(--s) - 1) * 75ms + .2s) var(--ease-out-expo, ease-out); }
@keyframes neon-ring { from { opacity: .9; transform: scale(.92); } to { opacity: 0; transform: scale(1.45, 1.3); } }
.tabs { border-radius: 12px; box-shadow: 0 5px 18px #10092113; }
.tabs button.active { box-shadow: inset 0 1px #ffffff25, 0 3px 10px #7344c425; }
.theme-choice:hover { transform: translateY(-2px); border-color: var(--accent); }
.theme-choice.active { box-shadow: 0 6px 17px #8850db1e; }
.switch { transition: background-color .22s, border-color .22s, box-shadow .22s; }
.switch[aria-checked=true] { box-shadow: 0 0 0 3px #995bf226; }
.text-link:hover .icon, .rail-footer:hover .icon { transform: translateX(3px); }

/* Game cards keep artwork prominent and make their destination clearer. */
.game-card, .popular-card .game-art, .room-card, .tournament-card { box-shadow: 0 8px 27px #09051324; }
.game-card { border-radius: 15px; }
.game-card:hover, .game-card:focus-within {
  transform: translateY(-6px);
  border-color: #aa78ec9c;
  box-shadow: var(--lift-shadow), 0 0 0 1px #965cdf26;
}
.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, #ffffff19 50%, transparent 65%);
  transform: translateX(-135%);
  transition: transform .7s ease;
  pointer-events: none;
}
.game-card:hover::after, .game-card:focus-within::after { transform: translateX(135%); }
.game-card .game-art::before {
  content: 'Explorar ↗';
  position: absolute;
  right: 11px;
  bottom: 10px;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 7px;
  background: #160d2acc;
  border: 1px solid #ffffff46;
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s, transform .22s;
}

html[lang='en'] .game-card .game-art::before { content: 'Explore ↗'; }
@media (max-width: 680px) {
  .categories { margin-block: 15px 6px; }
  .topbar .logo { width: 136px; flex-shrink: 0; }
  .topbar .logo .brand-logo { width: 100%; }
}
@media (max-width: 360px) {
  .topbar { padding-inline: 10px; gap: 7px; }
  .topbar .logo { width: 115px; }
  .header-right > .icon-button[data-action='theme'] { display: none; }
}
.game-card:hover .game-art::before, .game-card:focus-within .game-art::before { opacity: 1; transform: translateY(0); }
.game-card .game-art, .popular-card .game-art, .room-card .game-art, .tournament-card .game-art { filter: saturate(1.03); }
.game-card:hover .game-art, .popular-card:hover .game-art, .room-card:hover .game-art, .tournament-card:hover .game-art { filter: saturate(1.18) contrast(1.03); }
.favorite-button { border-radius: 9px; box-shadow: 0 5px 14px #10071e36; }
.favorite-button:hover { transform: scale(1.1); }
.favorite-button.active { background: #341b36d9; border-color: #f495b67a; }
.popular-card .game-art { border-radius: 12px; }
.popular-card:hover .game-art { transform: translateY(-4px) scale(1.02); box-shadow: 0 15px 33px #09051343; }
.section-heading h2 { letter-spacing: -.55px; }
.section-heading h2 > .icon { filter: drop-shadow(0 0 8px #f5b9605e); }
.trending-banner {
  position: relative;
  overflow: hidden;
  border-color: #9660d975;
  background: linear-gradient(110deg, #7751d22b, var(--surface) 72%);
  box-shadow: 0 9px 28px #43287d1a;
}
.trending-banner::before {
  content: '';
  position: absolute;
  width: 230px;
  height: 230px;
  left: -80px;
  top: -130px;
  background: #a77aff30;
  filter: blur(44px);
  pointer-events: none;
}
.trending-banner > * { position: relative; }

/* Dashboard panels, rankings, community and rewards. */
.panel { border-color: color-mix(in srgb, var(--border) 75%, var(--accent) 25%); box-shadow: 0 9px 31px #09051316; }
.daily-panel { background: radial-gradient(ellipse at 95% -10%, #a36fff33, transparent 67%), var(--surface); }
.daily-panel > .button { margin-top: 16px; }
.guest-card { background: radial-gradient(circle at 95% 0%, #a45bff48, transparent 51%), var(--surface); }
.guest-card .guest-icon { box-shadow: 0 8px 20px #8a4ee133; }
.tournament-mini { box-shadow: 0 14px 34px #452a7935; }
.tournament-mini .trophy-art { filter: drop-shadow(0 8px 13px #d9966255); transition: transform .35s var(--soft-ease); }
.tournament-mini:hover .trophy-art { transform: rotate(-3deg) translateY(-4px); }
.streak-tag { border: 1px solid #f5bd7236; }
.day.current > span { box-shadow: 0 0 0 3px #e9ad5321; }
.room-card:hover, .tournament-card:hover, .podium-card:hover { box-shadow: var(--lift-shadow); }
.progress-track { height: 7px; box-shadow: inset 0 1px 3px #0002; }
.progress-track > span { box-shadow: 0 0 12px #ad71f77a; }
.workspace.route-enter .progress-track > span { transform-origin: left; animation: progress-fill .85s var(--soft-ease) both; }
.podium-card.winner { box-shadow: 0 17px 39px #bd8e2730, inset 0 1px #ffe5a044; }
.podium-card.winner .crown { filter: drop-shadow(0 0 10px #ffd3768f); }
.table-wrap { box-shadow: 0 8px 28px #09051318; }
.rank-table tbody tr { transition: background-color .2s; }
.rank-table tbody tr:hover { background: var(--accent-soft); }
.post { transition: transform .25s var(--soft-ease), border-color .25s, box-shadow .25s; }
.post:hover { transform: translateY(-2px); border-color: var(--edge-glow); box-shadow: 0 15px 35px #08051325; }
.post-actions button:hover { color: var(--accent); transform: translateY(-1px); }
.mission-card { transition: transform .26s var(--soft-ease), border-color .26s, box-shadow .26s; }
.mission-card:hover { transform: translateY(-4px); border-color: var(--edge-glow); box-shadow: var(--lift-shadow); }
.mission-card > .icon { box-shadow: 0 6px 16px #8152c92b; }
.reward-item, .achievement, .stat-card { transition: transform .25s var(--soft-ease), box-shadow .25s, border-color .25s; }
.reward-item:hover, .achievement:hover, .stat-card:hover { transform: translateY(-3px); box-shadow: 0 11px 27px #6c42aa22; }
.reward-item.claimed { border-color: #4bdba376; }
.game-cover { box-shadow: 0 17px 44px #10072236; }
.game-cover .game-art { transition: transform .6s var(--soft-ease); }
.game-cover:hover .game-art { transform: scale(1.025); }
.play-panel { background: radial-gradient(circle at 100% 0%, #925dff19, transparent 53%), var(--surface); }

/* Dialogs, notifications and the small screen dock. */
dialog { border-color: var(--edge-glow); box-shadow: 0 26px 100px #07030b9c, 0 0 0 1px #ffffff0b; }
dialog::backdrop { background: #070311c9; }
.toast { border-color: var(--edge-glow); box-shadow: 0 15px 45px #10072067; backdrop-filter: blur(14px); }
.chat-drawer { border-color: var(--edge-glow); box-shadow: 0 20px 75px #09051370; }
.floating-chat { right: 20px; bottom: max(20px, var(--footer-offset, 0px)); overflow: hidden; box-shadow: 0 9px 30px #6941cb83, inset 0 1px #ffffff5c; transition: transform .25s var(--soft-ease), box-shadow .25s; }
.floating-chat:hover { transform: translateY(-4px); box-shadow: 0 15px 37px #6941cb9e; }
.mobile-bottom { box-shadow: 0 -9px 27px #0905131a; }
.mobile-bottom a.active { background: var(--accent-soft); border-radius: 10px; }

/* Auth screens share the same finish as the product. */
.auth-layout { border-color: var(--edge-glow); box-shadow: 0 28px 85px #10082740; }
.floating-chat::after { content: none; }

/* Social and report dialogs share the portal's surfaces, spacing and accents. */
dialog.social-modal, dialog.report-modal {
  width: min(620px, calc(100% - 32px));
  border-radius: 24px;
  background: radial-gradient(ellipse at 10% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 48%), var(--surface);
}
dialog.report-modal { width: min(560px, calc(100% - 32px)); }
dialog.social-modal[open], dialog.report-modal[open] { display: flex; flex-direction: column; overflow: hidden; }
.social-modal .modal-header, .report-modal .modal-header { padding: 28px 28px 22px; border-bottom: 1px solid var(--border); }
.social-modal .modal-header, .report-modal .modal-header { flex-shrink: 0; }
.social-modal .modal-header > div, .report-modal .modal-header > div { min-width: 0; }
.social-modal .modal-header h2, .report-modal .modal-header h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.6px; overflow-wrap: anywhere; }
.social-modal .modal-header p, .report-modal .modal-header p { margin-top: 8px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.social-modal .modal-header .icon-button, .report-modal .modal-header .icon-button { margin: -3px -5px 0 0; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); }
.social-modal .modal-body, .report-modal .modal-body { min-height: 0; overflow-y: auto; padding: 24px 28px 28px; }
.friends-modal .modal-body, .player-modal .modal-body { display: grid; gap: 24px; }
.friends-overview { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.friends-summary { display: flex; align-items: center; gap: 12px; }
.friends-summary > .icon { width: 42px; height: 42px; padding: 10px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--border); border-radius: 13px; }
.friends-summary strong { font-size: 14px; }
.friends-summary p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.friend-invite { padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.friend-invite h3 { margin: 0 0 18px; font-size: 16px; }
.friend-invite-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.friend-invite .form-field { margin: 0; min-width: 0; }
.friend-invite input { min-height: 46px; background: var(--surface); }
.friend-invite .button { min-height: 46px; }
.social-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.social-section-heading h3 { font-size: 17px; margin: 0; }
.social-section-heading > span { min-width: 25px; padding: 4px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); text-align: center; font-size: 11px; }
.friend-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.friend-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.friend-identity { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; border-radius: 8px; }
.friend-identity .avatar { width: 44px; height: 44px; object-fit: cover; }
.friend-copy { min-width: 0; }
.friend-copy strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.friend-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.friend-presence { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.friend-presence::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.friend-presence.is-online { color: var(--green); }
.friend-presence.is-pending { color: var(--accent); }
.friend-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.friend-actions .button { min-height: 36px; padding: 8px 11px; font-size: 11px; }
.social-empty { display: grid; justify-items: center; gap: 12px; padding: 28px 16px; color: var(--muted); text-align: center; }
.social-empty > .icon { width: 32px; height: 32px; color: var(--accent); }
.social-empty p { font-size: 13px; line-height: 1.6; }
.player-card-summary { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 20px; align-items: center; }
.player-card-summary .avatar.huge { width: 88px; height: 88px; object-fit: cover; border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--border), 0 8px 24px #08041225; }
.player-eyebrow { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; }
.player-bio { color: var(--muted); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; }
.friendship-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 9px; background: var(--accent-soft); color: var(--muted); border-radius: 8px; font-size: 11px; line-height: 1.5; }
.friendship-status .icon { width: 14px; height: 14px; flex-shrink: 0; }
.friendship-status.is-accepted { color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.friendship-status.is-pending { color: var(--accent); }
.player-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.player-stat { position: relative; padding: 15px 12px 12px; min-width: 0; border: 1px solid var(--border); border-radius: 13px; background: var(--accent-soft); }
.player-stat > .icon { position: absolute; top: 12px; right: 10px; width: 15px; height: 15px; color: var(--accent); opacity: .7; }
.player-stat small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .5px; padding-right: 15px; overflow-wrap: anywhere; }
.player-stat strong { display: block; margin-top: 10px; font: 700 27px/1.15 var(--font-pixel, 'Outfit', sans-serif); overflow-wrap: anywhere; }
.player-badge-list { display: grid; gap: 10px; }
.player-badge { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.player-badge > .icon { width: 36px; height: 36px; padding: 7px; background: var(--accent-soft); color: var(--accent); border-radius: 10px; flex-shrink: 0; }
.player-badge strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.player-badge p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 3px 0 0; overflow-wrap: anywhere; }
.player-actions { display: grid; gap: 10px; border-top: 1px solid var(--border); padding-top: 20px; }
.player-action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.player-action-row .button { flex: 1; width: auto; min-width: 0; }
.player-actions .player-report { color: var(--muted); background: transparent; border-color: transparent; }
.player-actions .player-report:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.report-modal fieldset { display: grid; gap: 22px; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.report-modal fieldset:disabled { opacity: .65; }
.report-context { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--accent-soft); }
.report-context > .icon { width: 21px; height: 21px; color: var(--accent); flex-shrink: 0; }
.report-context p { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0; }
.report-modal .form-field { margin: 0; gap: 10px; }
.report-modal .form-field label { font-weight: 600; }
.report-modal textarea { min-height: 150px; line-height: 1.7; resize: vertical; background: var(--surface-2); }
.report-modal .form-hint { line-height: 1.6; }
.report-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 0; padding-top: 20px; border-top: 1px solid var(--border); }
.report-success { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 14px 0 4px; }
.report-success-icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 2px; border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); border-radius: 23px; background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--green); }
.report-success-icon .icon { width: 34px; height: 34px; }
.report-success h3 { margin: 0; font-size: 27px; letter-spacing: -.6px; }
.report-success p { max-width: 37ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.report-success .button { min-width: 150px; margin-top: 10px; }
@media (max-width: 680px) {
  .floating-chat { bottom: max(calc(92px + env(safe-area-inset-bottom)), var(--footer-offset, 0px)); }
  .social-modal .modal-header, .report-modal .modal-header { padding: 22px 20px 18px; }
  .social-modal .modal-header h2, .report-modal .modal-header h2 { font-size: 22px; }
  .social-modal .modal-body, .report-modal .modal-body { padding: 20px; }
  .friends-modal .modal-body, .player-modal .modal-body { gap: 20px; }
  .friend-invite { padding: 16px; }
  .friend-invite-fields { grid-template-columns: minmax(0, 1fr); }
  .friend-invite-fields > .button { width: 100%; }
  .friend-card { align-items: stretch; flex-direction: column; gap: 14px; padding: 14px; }
  .friend-actions { justify-content: flex-start; padding-top: 12px; border-top: 1px solid var(--border); }
  .friend-actions .button { flex: 1; min-height: 40px; }
  .player-card-summary { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .player-card-summary .avatar.huge { width: 72px; height: 72px; }
  .player-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-stat { padding: 14px; }
  .report-modal .modal-actions .button { flex: 1; }
}
@media (max-width: 420px) {
  .report-modal .modal-actions, .player-action-row { flex-direction: column; }
  .report-modal .modal-actions .button, .player-action-row .button { width: 100%; flex: auto; }
}
.auth-showcase { isolation: isolate; }
.auth-showcase::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 32%, #b47cff2c, transparent 44%);
  pointer-events: none;
  z-index: 0;
}
.auth-showcase-copy { z-index: 1; }
.auth-showcase > img { transition: transform 1.1s var(--soft-ease); }
.auth-showcase:hover > img { transform: scale(1.035); }
.auth-showcase-benefits span { box-shadow: inset 0 1px #ffffff24; }
.auth-form-panel { background: radial-gradient(circle at 100% 0%, #9362ed0e, transparent 47%), var(--surface); }
.auth-field input:focus { box-shadow: 0 0 0 4px #9c68ff22; outline: none; border-color: var(--accent); }
.auth-google:not(:disabled):hover { box-shadow: 0 10px 28px #6843b52d; }

/* Reveal only offscreen content; if scripts or motion are unavailable, content stays visible. */
.scroll-reveal { transition: opacity .52s ease, transform .52s var(--soft-ease), border-color .25s, box-shadow .25s; }
.scroll-reveal:not(.is-visible) { opacity: 0; transform: translateY(19px); }
.scroll-reveal.is-visible.game-card:hover { transform: translateY(-6px); }
.scroll-reveal.is-visible.room-card:hover, .scroll-reveal.is-visible.tournament-card:hover,
.scroll-reveal.is-visible.mission-card:hover, .scroll-reveal.is-visible.podium-card:hover { transform: translateY(-4px); }
@keyframes presence-pulse { 50% { box-shadow: 0 0 0 5px #4bdba322, 0 0 14px #4bdba386; } }
@keyframes progress-fill { from { transform: scaleX(.08); } to { transform: scaleX(1); } }

@media (max-width: 680px) {
  .hero { border-radius: 17px; box-shadow: 0 14px 37px #14072e4d; }
  .hero .eyebrow { padding: 5px 8px; }
  .hero::before, .page-banner::before { opacity: .4; }
  .page-banner { border-radius: 17px; box-shadow: 0 12px 30px #10082930; }
  .page-banner h1 { letter-spacing: -.8px; }
  .nav-link:hover:not(.active) { transform: none; }
  .game-card .game-art::before { display: none; }
  .mobile-bottom a { min-width: 55px; transition: background-color .2s, color .2s, transform .2s; }
  .mobile-bottom a.active { color: var(--accent); }
  .trending-banner { background: linear-gradient(115deg, #7751d22d, var(--surface)); }
}
@media (max-width: 360px) {
  .categories { margin-inline: -12px; padding-inline: 12px; }
}
@media (hover: none) {
  .hero:hover .hero-image, .page-banner:hover::after, .auth-showcase:hover > img,
  .game-cover:hover .game-art, .favorite-button:hover, .floating-chat:hover,
  .post:hover, .mission-card:hover, .reward-item:hover, .achievement:hover,
  .stat-card:hover, .category:hover, .theme-choice:hover { transform: none; }
  .game-card:hover::after { transform: translateX(-135%); }
}

/* Authored descriptions and game names must fit at every catalog width. */
.hero { display: flex; align-items: center; height: auto; min-height: 335px; }
.hero-copy { width: 100%; min-width: 0; }
.hero-copy > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.hero-actions { flex-wrap: wrap; }
.hero-actions .button { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.hero-actions .button > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.hero-actions .icon { flex: none; }
@media (min-width: 1650px) { .hero { min-height: 370px; } }

/* The home fills the space beside the navigation, including ultrawide displays. */
@media (min-width: 2041px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) clamp(310px, 14vw, 420px);
    gap: clamp(28px, 1.2vw, 48px);
  }
  .dashboard-layout .hero { min-height: clamp(370px, 17vw, 560px); }
  .dashboard-layout .hero-copy {
    max-width: min(56%, 760px);
    padding: clamp(39px, 2vw, 72px);
  }
  .dashboard-layout .hero .hero-title { font-size: clamp(48px, 2vw, 72px); max-width: 600px; }
  .dashboard-layout .hero p { font-size: clamp(14px, .45vw, 18px); max-width: 480px; }
}

/* Keep the launch action ahead of the description, gallery and rankings. */
.breadcrumb { min-width: 0; }
.breadcrumb > a, .breadcrumb > .icon { flex: none; }
.breadcrumb > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-detail-layout {
  grid-template-areas: 'cover play' 'content play';
  grid-template-rows: auto 1fr;
  align-items: start;
}
.game-detail-layout > .game-cover { grid-area: cover; width: 100%; min-width: 0; }
.game-detail-layout > .game-detail-side { grid-area: play; display: block; min-width: 0; }
.game-detail-content { grid-area: content; min-width: 0; }
.game-detail-content > .game-about { margin-top: 0; }
.game-detail-content > .panel + .panel { margin-top: 24px; }
.game-about p, .play-panel h2 { overflow-wrap: anywhere; }
.cover-title { right: 20px; }
.cover-title h1 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  margin-bottom: 0;
}
@media (max-width: 860px) {
  .game-detail-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'cover' 'play' 'content'; grid-template-rows: auto; }
  .game-detail-side .play-panel { display: flex; flex-direction: column; padding: 20px; }
  .play-panel > .tag { align-self: flex-start; }
  .game-detail-side .play-panel > .button.primary { margin-top: 12px; }
  .game-detail-side .secondary-actions { width: 100%; margin-top: 0; }
  .game-detail-stats { margin: 16px 0; padding: 12px 0; }
}
@media (max-width: 680px) {
  .hero { min-height: 335px; }
  .hero-copy { max-width: 90%; }
  .hero .eyebrow { overflow-wrap: anywhere; }
  .game-detail-layout { gap: 14px; }
  .game-detail-side .play-panel { padding: 16px; }
  .play-panel > h2 { display: none; }
  .cover-title h1 { font-size: clamp(23px, 6vw, 30px); }
}
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .game-detail-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'play' 'cover' 'content'; }
}

/* Collections fill the workspace; reading and account pages stay centered. */
.missions-layout { display: grid; gap: 24px; }
.missions-layout > *, .community-layout > *, .profile-columns > * { min-width: 0; }
@media (min-width: 1650px) {
  .workspace { --page-max: 100%; padding-inline: clamp(35px, 2vw, 80px); }
  .workspace[data-page='configuracoes'],
  .workspace[data-page='ajuda'] { --page-max: 1800px; }
  .workspace[data-page='perfil'] { --page-max: 2000px; }
  .workspace[data-page='missoes'] { --page-max: 2200px; }
  .workspace[data-page='jogo'] { --page-max: 2400px; }
  .workspace > * { width: 100%; max-width: var(--page-max); align-self: center; }
  .workspace > .tabs {
    width: max-content;
    align-self: flex-start;
    margin-left: max(0px, calc((100% - var(--page-max)) / 2));
  }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
  .room-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
  .tournament-grid { grid-template-columns: repeat(auto-fill, minmax(580px, 1fr)); gap: 24px; }
  .community-layout { grid-template-columns: minmax(0, 1fr) clamp(310px, 14vw, 420px); gap: clamp(28px, 1.2vw, 48px); }
  .missions-layout { grid-template-columns: minmax(0, 1fr) clamp(320px, 20vw, 400px); align-items: start; }
  .mission-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .game-detail-layout { grid-template-columns: minmax(0, 1fr) clamp(360px, 18vw, 440px); gap: 32px; }
  .workspace .settings-workspace { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
  .post > p, .game-about p, .profile-about > p, .help-answer p { max-width: 85ch; }
}
@media (min-width: 2041px) {
  .page-top h1 { font-size: 30px; }
  .page-banner { min-height: 220px; padding: 36px 42px; }
  .page-banner h1 { font-size: 40px; }
}

/* Home rail: compact top-players list (no horizontal scroll) */
.rail-rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rail-rank-list li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border-radius: 10px; transition: background-color .2s; }
.rail-rank-list li:hover { background: var(--accent-soft); }
.rail-rank-position { flex: none; width: 16px; text-align: center; font-family: var(--font-pixel, 'Outfit', sans-serif); font-size: 12px; font-weight: 600; color: var(--muted); }
.rail-rank-list li:first-child .rail-rank-position { color: var(--yellow); }
.rail-rank-list .player-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.rail-rank-list .avatar.small { flex: none; width: 24px; height: 24px; font-size: 11px; }
.rail-rank-list .player-link-copy { min-width: 0; overflow: hidden; }
.rail-rank-list .player-link-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.rail-rank-points { flex: none; font-family: var(--font-pixel, 'Outfit', sans-serif); font-size: 12px; font-weight: 600; color: var(--accent); }
