@font-face{font-family:Inter;src:url(assets/inter.woff2) format("woff2");font-weight:400 800;font-display:swap}
@font-face{font-family:"Space Grotesk";src:url(assets/space-grotesk.woff2) format("woff2");font-weight:400 700;font-display:swap}

:root {
  color-scheme: dark;
  --bg: #0d0f18;
  --surface: #141724;
  --field: #10121d;
  --border: #272b3d;
  --muted: #a0a6be;
  --subtle: #858da9;
  --text: #f3f3fc;
  --accent: #aa96ff;
  --accent-bg: #282143;
  --purple: #8059ee;
  --green: #56d6a8;
  --blue: #70b2ff;
  --amber: #fac478;
  --slate: #a8afd0;
  --display: "Space Grotesk", Inter, sans-serif;
}
*,*::before,*::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, system-ui, sans-serif; font-size: 14px; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { letter-spacing: -.035em; }
h2,h3 { font-family: var(--display); font-size: 19px; font-weight: 700; line-height: 1.16; }
button,input,select { font: inherit; }
button,a,input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .42; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
svg { display: block; width: 18px; height: 18px; flex: none; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.skip { position: fixed; z-index: 10; top: 10px; left: 10px; transform: translateY(-160%); background: var(--purple); padding: 14px; border-radius: 8px; }
.skip:focus { transform: none; }

.layout { min-height: 100vh; max-width: 1512px; margin-inline: auto; padding: 15px clamp(10px,1.6vw,25px) 28px; }
.navigation a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid #714ca7; border-radius: 8px; color: #f4ebff;
  background: linear-gradient(145deg,#644395,#4b3477); font-weight: 650; font-size: 12px;
}
.navigation a:hover { background: #7353a4; }
.navigation svg { width: 16px; height: 16px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  border-radius: 8px; padding: 8px 12px; min-height: 35px; white-space: nowrap; color: var(--text);
  font-size: 12px; line-height: 1.2; font-weight: 650;
}
.button svg { width: 15px; height: 15px; }
.primary { color: #fff; background: #7551dc; border-color: #9876fa; box-shadow: inset 0 1px #ffffff19; }
.primary:not(:disabled):hover { background: #865feb; }
.outline { background: #181b2a; border-color: var(--border); color: #d3d6e9; }
.outline:not(:disabled):hover { background: #24273a; border-color: #555075; color: #fff; }
.compact { min-height: 30px; padding: 6px 8px; gap: 5px; font-size: 11px; }
.compact svg { width: 13px; height: 13px; }
.icon-button { min-width: 33px; min-height: 33px; padding: 6px; }
.text-button {
  border: 0; display: inline-flex; align-items: center; gap: 6px; color: #c1afff; background: transparent;
  font-size: 12px; font-weight: 600; padding: 5px 0 5px 5px; white-space: nowrap;
}
.text-button:hover { color: #e0d6ff; }
.text-button svg { width: 14px; height: 14px; }
main { margin-top: 15px; min-width: 0; display: grid; gap: 15px; outline: 0; }
.hero {
  overflow: hidden; position: relative; min-height: 98px; display: grid;
  grid-template-columns: auto minmax(0,1fr); align-items: center; column-gap: clamp(24px,5vw,76px);
  padding: 13px clamp(118px,14vw,200px) 14px 22px;
  border-radius: 13px; border: 1px solid #342e57; background-color: #101429;
  background-image: radial-gradient(ellipse at 88% 65%,#6444ae80,transparent 45%),linear-gradient(105deg,#11142b 32%,#251c46 100%);
}
.hero-content,.hero-tools { position: relative; z-index: 1; min-width: 0; }
.hero-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px clamp(15px,4.7vw,68px); }
.hero-art {
  --portrait-right: clamp(16px,4vw,62px);
  position: absolute; inset: 0 0 0 auto; width: min(52%,500px); isolation: isolate; pointer-events: none;
}
.hero-art::before {
  content: ""; position: absolute; right: calc(var(--portrait-right) - 30px); top: 50%; transform: translateY(-50%);
  height: 94%; aspect-ratio: 1; border-radius: 50%; border: 1px solid #b192ff63;
  background: radial-gradient(circle,#9a70ff57,transparent 70%);
  box-shadow: 0 0 0 16px #a783ff29, 0 0 0 33px #a783ff15, 0 0 0 52px #a783ff0c;
}
.hero-art::after {
  content: ""; position: absolute; inset: 12% 5% 12% 0;
  background: radial-gradient(circle,#c7b1fc92 1px,transparent 1.5px) 0 0 / 13px 13px;
  mask-image: radial-gradient(ellipse,#000 0%,transparent 73%);
}
.hero-portrait { position: absolute; z-index: 1; right: var(--portrait-right); bottom: -22%; height: 124%; width: auto; }
.hero h1 { font: 700 clamp(29px,3.2vw,41px)/1.05 var(--display); letter-spacing: -.065em; }
.hero p { color: #bcc1d9; margin-top: 4px; font-size: 13px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-stats > span {
  display: inline-flex; align-items: center; gap: 5px; color: #c5c8df; border: 1px solid #3e3b5e;
  background: #1f2138e6; padding: 5px 8px; border-radius: 6px; font-size: 11px;
}
.hero-stats strong { color: #f2efff; font-weight: 650; }
.hero-stats svg { width: 13px; height: 13px; color: #b29eff; margin-right: 2px; }

.featured {
  --featured-art: url(assets/ocarina-switch2.jpg);
  min-height: clamp(226px,20vw,293px); display: grid; align-items: center;
  overflow: hidden; border: 1px solid #394049; border-radius: 14px;
  background: linear-gradient(90deg,#0e171b 36%,#0e171b94 44%,#0e171b1c 57%,transparent 72%),var(--featured-art) right center / auto 100% no-repeat #0e171b;
}
.featured-content { position: relative; margin: 0; padding: 26px clamp(20px,3.6vw,52px); }
.featured-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #dbc2ff; font-weight: 750; font-size: 13px; text-transform: uppercase; letter-spacing: .045em; }
.featured-label svg { width: 19px; height: 19px; }
.featured h2 { font: 700 clamp(31px,3.6vw,53px)/1.03 var(--display); color: #fff; text-shadow: 0 1px 15px #071112b0; }
.featured h2 span { display: block; margin-top: 5px; color: #e1e4f1; font-size: .65em; font-weight: 500; font-style: italic; letter-spacing: -.025em; }
.featured-console { display: inline-flex; align-items: center; gap: 7px; margin-top: 17px; padding: 6px 10px; background: #181c28b3; border: 1px solid #b0b8de50; border-radius: 7px; font-size: 12px; }
.featured-console svg { width: 15px; height: 15px; color: #dccbff; }

.panel { min-width: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 13px; }
.filters { padding: 12px 15px; }
.filters-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 9px; }
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; }
.filters-top h2 { display: flex; gap: 8px; align-items: center; font-size: 16px; letter-spacing: -.02em; }
.filters-top h2 svg { color: var(--accent); width: 16px; height: 16px; }
.filter-count { display: inline-grid; place-items: center; height: 18px; min-width: 18px; padding: 0 4px; border-radius: 5px; background: var(--accent-bg); color: #d2c4ff; font: 600 11px/1 Inter,sans-serif; }
.filter-fields { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr .77fr .94fr; gap: 9px; }
.field { min-width: 0; display: grid; align-content: start; gap: 5px; position: relative; }
.field > :first-child { color: #b2b8cf; font-size: 11px; font-weight: 600; }
.search-control, .select-control {
  display: flex; width: 100%; align-items: center; gap: 7px; min-height: 33px; padding: 0 8px; min-width: 0;
  color: #e1e3f3; border: 1px solid var(--border); border-radius: 7px; background: var(--field); font-size: 12px;
}
.search-control svg, .select-control svg { width: 14px; height: 14px; color: var(--subtle); }
.search-control:focus-within, .select-control:hover { border-color: #655797; }
.search-control input { width: 100%; min-width: 0; border: 0; color: var(--text); background: transparent; font-size: 12px; padding: 5px 0; outline: 0; }
input::placeholder { color: #929bb7; opacity: 1; }
.select-control { justify-content: space-between; list-style: none; cursor: pointer; }
.select-control::-webkit-details-marker { display: none; }
.select-control > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field details[open] .select-control, .select-control[data-active] { border-color: #66539e; }
.select-popover {
  position: absolute; top: calc(100% + 6px); left: 0; width: max(100%,165px); z-index: 4; padding: 7px;
  background: #1b1e2d; box-shadow: 0 10px 28px #0009; border: 1px solid #39384f; border-radius: 8px;
}
.select-options { display: grid; max-height: 222px; overflow: auto; margin-top: 3px; }
.select-options label { display: flex; align-items: baseline; gap: 6px; padding: 5px 4px; color: #e0e1ed; font-size: 12px; cursor: pointer; border-radius: 4px; }
.select-options label:hover { background: #2a2540; }
.select-options input { margin: 0; accent-color: #9678fb; transform: translateY(2px); }
.option-search { width: 100%; outline-offset: 1px; background: var(--field); border: 1px solid var(--border); border-radius: 5px; color: var(--text); padding: 6px; font-size: 11px; }
.filter-groups { display: flex; gap: 9px 16px; flex-wrap: wrap; margin-top: 11px; }
.chip-group { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.chip-group:not(:last-child) { padding-right: 16px; border-right: 1px solid var(--border); }
.chip-label { color: var(--muted); font-size: 11px; font-weight: 600; margin-right: 2px; }
.chip-group:is([aria-label="Perfil"],[aria-label="Status"]) > .chip-label { color: var(--text); font-weight: 750; }
.chip {
  border: 1px solid var(--border); background: #1b1e2d; color: #b9bfd7; font-size: 11px; font-weight: 550;
  padding: 4px 8px; line-height: 1.2; border-radius: 6px;
}
.chip:hover { border-color: #62558a; }
.chip[aria-pressed="true"] { color: #e0d5ff; background: #2e2349; border-color: #7860bf; }
.metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.metric {
  display: flex; align-items: center; gap: clamp(6px,1.1vw,13px); min-width: 0; padding: 11px clamp(8px,1.2vw,16px);
  border: 1px solid var(--border); background: linear-gradient(135deg,#191c2b,#141724); border-radius: 12px;
}
.metric:first-child { background: linear-gradient(130deg,#211a37,var(--surface) 85%); border-color: #423564; }
.metric-details { display: grid; min-width: 0; gap: 4px; }
.metric-label { color: #c2c7dd; font-size: 12px; font-weight: 550; }
.metric-icon { width: clamp(29px,3.1vw,43px); height: clamp(29px,3.1vw,43px); border-radius: 12px; color: var(--metric-color); background: color-mix(in srgb,var(--metric-color) 14%,#17192a); }
.metric-icon svg { width: 55%; height: 55%; }
.metric-value { font: 700 33px/.98 var(--display); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.metric:first-child .metric-value { color: #e1d7ff; }

.recent,.statistics { padding: 13px 14px 14px; }
.section-title { display: flex; align-items: center; gap: 8px; }
.section-title svg { color: var(--accent); }
.recent .panel-head { align-items: center; }
.recent-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 11px; }
.recent-grid > .empty { grid-column: 1/-1; }
.recent-card {
  min-width: 0; overflow: hidden; display: grid; align-content: start; padding: 0; text-align: left;
  color: var(--text); border: 1px solid #303348; background: #111420; border-radius: 10px;
}
.recent-card:hover { border-color: #9075d0; background: #1a1931; }
.recent-cover { position: relative; isolation: isolate; display: grid; place-items: center; aspect-ratio: 5 / 6; overflow: hidden; background: #0d1018; }
.recent-cover::before { content: ""; position: absolute; z-index: -1; inset: -12px; background: var(--cover-image) center / cover; filter: blur(15px) brightness(.52); }
.recent-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.recent-details { display: grid; justify-items: start; gap: 6px; padding: 9px; min-width: 0; }
.recent-name { overflow-wrap: anywhere; font-size: 12px; min-height: 2.5em; line-height: 1.25; }
.recent-console { display: flex; align-items: center; gap: 5px; color: #c2c7da; font-size: 10px; }
.recent-console svg { color: var(--accent); width: 13px; height: 13px; }
.statistics > .section-title { margin-bottom: 12px; }
.charts { display: grid; grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr); gap: 12px; }
.chart-panel { min-height: 278px; padding: 13px; background: #111420; }
.panel-head { display: flex; gap: 7px; align-items: flex-start; justify-content: space-between; margin-bottom: 15px; }
.panel-head p { color: var(--muted); margin-top: 5px; font-size: 11px; }
.legend-dot { display: inline-block; vertical-align: 1px; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #a487fa; }
#show-consoles[aria-expanded="true"] svg { transform: rotate(180deg); }
.console-list { display: grid; gap: 4px; }
.console-list.expanded { max-height: 410px; overflow-y: auto; padding: 3px 8px 4px 3px; margin-left: -3px; }
.console-row {
  display: grid; grid-template-columns: minmax(88px,114px) minmax(0,1fr) 26px; align-items: center; height: 25px; gap: 8px;
  background: transparent; border: 0; border-radius: 5px; padding: 0 3px; width: 100%; color: #d4d8ed; text-align: left;
}
.console-row:hover,.console-row[aria-pressed="true"] { background: #24213a; }
.console-name { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; min-width: 0; background: #232638; border-radius: 3px; }
.bar-fill { display: block; width: var(--percent); height: 100%; border-radius: 3px; background: linear-gradient(90deg,#7652dc,#a38aff); }
.console-value { color: #c9b6ff; font: 650 12px/1 var(--display); text-align: right; }
.segmented { display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--border); background: #10121d; border-radius: 8px; }
.segmented button { border: 1px solid transparent; min-width: 39px; border-radius: 6px; background: transparent; color: var(--muted); padding: 5px 7px; font-size: 11px; font-weight: 650; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { color: #dbceff; background: #352853; border-color: #493968; }
.timeline-context { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: -4px; margin-bottom: 6px; }
.timeline-context label { color: var(--muted); font-size: 11px; }
.timeline-context select { border: 1px solid var(--border); background: var(--field); border-radius: 5px; padding: 3px 4px; margin-left: 5px; color: var(--text); font-size: 11px; }
.timeline-total { margin-left: auto; color: #bdc1d7; font-size: 11px; }
.timeline-total strong { color: #e8deff; font-size: 12px; }
.plot { --plot-height: 147px; height: calc(var(--plot-height) + 31px); position: relative; margin: 7px 0 0 23px; padding-top: 8px; }
.plot-grid { position: absolute; inset: 8px 0 23px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.gridline { position: relative; border-top: 1px solid #2b2d40; height: 0; }
.gridline span { position: absolute; right: calc(100% + 7px); top: -7px; color: var(--subtle); font-size: 10px; }
.plot-bars { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 5px; }
.plot-column { position: relative; text-align: center; min-width: 0; }
.column-hit {
  width: 100%; height: var(--plot-height); display: flex; align-items: flex-end; justify-content: center; position: relative;
  border: 0; background: transparent; color: #d6c6ff; border-radius: 3px; padding: 0 1px;
}
.column-hit:not(:disabled):hover, .column-hit:focus-visible, .column-hit[aria-pressed="true"] { background: #aa96ff0e; }
.column-hit:disabled { opacity: 1; }
.column-bar {
  width: min(72%,32px); height: var(--percent); position: relative; background: linear-gradient(#a78aff,#7653d8);
  border-radius: 4px 4px 0 0;
}
.column-hit:hover .column-bar, .column-hit[aria-pressed="true"] .column-bar { background: linear-gradient(#c6adff,#8560eb); }
.column-count { position: absolute; bottom: calc(var(--percent) + 4px); left: 0; right: 0; font: 650 10px/1 var(--display); }
.column-label { display: block; margin-top: 6px; font-size: 9px; color: var(--muted); white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 36px 10px; font-size: 13px; }

.catalog { overflow: hidden; }
.catalog-head { padding: 15px 15px 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; min-width: 680px; }
thead { background: #181b2a; }
th,td { padding: 9px 12px; border-bottom: 1px solid #26293b; font-size: 12px; }
th:first-child,td:first-child { padding-left: 15px; }
th { color: var(--muted); font-weight: 600; }
th button { padding: 0; border: 0; color: inherit; background: transparent; display: inline-flex; align-items: center; gap: 5px; text-align: left; }
th button:hover,th[aria-sort] button { color: #e1d8ff; }
th button svg { width: 12px; height: 12px; }
td { color: #c8cde2; }
tbody tr:nth-child(even) { background: #171a28; }
tbody tr:hover { background: #1e2031; }
.game-button { padding: 0; border: 0; background: transparent; color: #eeeefe; font-size: 12px; font-weight: 650; text-align: left; }
.game-button:hover { color: #c8b5ff; text-decoration: underline; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; background: color-mix(in srgb,var(--pill) 13%,#161928); border-radius: 5px; color: var(--pill); font-size: 10px; font-weight: 650; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 15px; font-size: 11px; color: var(--muted); }
.page-buttons { display: flex; align-items: center; white-space: nowrap; gap: 8px; }
.page-buttons .icon-button { min-width: 29px; min-height: 27px; }

dialog {
  width: min(490px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 19px; color: var(--text); background: #171a28;
  border: 1px solid #48415e; border-radius: 13px; box-shadow: 0 16px 70px #0009;
}
dialog::backdrop { background: #05060cb8; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.dialog-head h2 { font-size: 23px; padding-top: 3px; overflow-wrap: anywhere; }
dialog p, dialog dd { color: #c3c8dd; font-size: 13px; line-height: 1.5; }
dialog dt { color: #eee9ff; font-size: 13px; font-weight: 650; }
dialog dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.definitions,.game-detail { display: grid; gap: 11px; margin: 14px 0; }
.game-detail { grid-template-columns: repeat(2, minmax(0,1fr)); }
.dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
.file-field { display: grid; gap: 8px; justify-items: start; border: 1px dashed #595071; background: #1d1e31; border-radius: 9px; padding: 12px; margin-top: 14px; color: #dcd4f6; }
.file-field input { width: 100%; font-size: 12px; }
.file-field input::file-selector-button { font: inherit; color: var(--text); background: var(--accent-bg); border: 1px solid #544276; border-radius: 5px; padding: 5px 7px; margin-right: 7px; cursor: pointer; }
dialog .error { color: #ffafb9; margin-top: 8px; }
.notice { position: fixed; z-index: 6; bottom: 16px; right: 16px; max-width: calc(100% - 32px); padding: 11px 13px; border: 1px solid #4e416e; background: #252039; color: #f0e9ff; border-radius: 8px; box-shadow: 0 8px 30px #0009; font-size: 13px; }

@media (max-width: 1170px) {
  .metrics { gap: 8px; }
  .chart-panel { padding-inline: 12px; }
  .console-row { grid-template-columns: minmax(70px,96px) minmax(0,1fr) 23px; gap: 5px; }
}
@media (max-width: 980px) {
  .filter-fields { grid-template-columns: 1.3fr repeat(5,minmax(0,1fr)); }
  .recent-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .charts { grid-template-columns: 1fr; gap: 12px; }
  main { gap: 12px; margin-top: 12px; }
  .filter-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .chip-group:not(:last-child) { padding-right: 0; border-right: 0; }
  .filter-groups { gap: 7px 11px; }
  .chart-panel { min-height: 265px; }
}
@media (max-width: 650px) {
  .hero { grid-template-columns: 1fr; gap: 10px; padding: 12px 94px 12px 13px; }
  .hero-art { --portrait-right: 8px; width: min(58%,240px); }
  .hero-art::before { right: -15px; }
  .hero-tools { gap: 6px 8px; }
  .hero-stats > span { padding: 4px 6px; font-size: 10px; }
  .navigation a { gap: 5px; padding: 6px 8px; font-size: 11px; }
  .navigation svg { width: 13px; height: 13px; }
  .featured { min-height: 0; background: #101a20; }
  .featured::before { content: ""; aspect-ratio: 738 / 228; background: var(--featured-art) center / contain no-repeat; }
}
@media (max-width: 520px) {
  .layout { padding-top: 10px; }
  .featured-content { padding: 14px 15px 16px; }
  .featured-label { font-size: 10px; }
  .featured h2 { font-size: clamp(29px,7.4vw,38px); }
  .featured-console { margin-top: 12px; }
  .filter-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .field:nth-child(2n) .select-popover { left: auto; right: 0; }
  .filters { padding: 10px; }
  .metric { padding: 9px 7px; }
  .metric-icon { width: 24px; height: 24px; border-radius: 7px; }
  .metric-label { font-size: 10px; }
  .metric-value { font-size: 27px; }
  .recent,.statistics { padding: 10px; }
  .recent .panel-head { flex-wrap: wrap; }
  .recent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .plot-bars { gap: 2px; }
  .column-label { font-size: 8px; }
  .console-row { grid-template-columns: minmax(92px,120px) minmax(0,1fr) 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .button,.chip,.console-row,.recent-card,.navigation a { transition: background-color .14s,border-color .14s,color .14s; }
}
