:root {
  color-scheme: light;
  font: 15px/1.6 system-ui, -apple-system, sans-serif;
  --canvas: #ffffff;
  --surface: #f6f6f5;
  --raised: #ffffff;
  --ink: #222323;
  --muted: #565956;
  --line: #dedfdd;
  --control-line: #969995;
  --accent: #36566b;
  --accent-bg: #e9edef;
  --solid: #292d30;
  --solid-hover: #41474b;
  --on-solid: #ffffff;
  --error: #893e39;
  --error-bg: #f6eeec;
  --get: #174f9c;
  --get-bg: #e4efff;
  --post: #176346;
  --post-bg: #e1f4e9;
  --update: #7b4800;
  --update-bg: #fff0d6;
  --code-bg: #f5f5f4;
  --code-key: #3a515f;
  --code-string: #3c5e4c;
  --code-literal: #794f3b;
  --header-height: 60px;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #181919;
  --surface: #1e2020;
  --raised: #252727;
  --ink: #e8e9e7;
  --muted: #afb3b0;
  --line: #383b39;
  --control-line: #737975;
  --accent: #afc4d2;
  --accent-bg: #292f32;
  --solid: #dce0de;
  --solid-hover: #f0f1ef;
  --on-solid: #252827;
  --error: #e1aaa3;
  --error-bg: #392d2b;
  --get: #a9cdff;
  --get-bg: #233a56;
  --post: #9de2bb;
  --post-bg: #203d31;
  --update: #ffd38a;
  --update-bg: #48371f;
  --code-bg: #202222;
  --code-key: #bdcbd2;
  --code-string: #adc3b2;
  --code-literal: #d6b39f;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0 0 12px; }
h1 { margin-bottom: 16px; font-size: clamp(30px, 4vw, 52px); line-height: 1.08; letter-spacing: -.05em; overflow-wrap: anywhere; }
h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.025em; }
h3 { font-size: 17px; }
code, pre { font-family: var(--mono); }
button, select, input { font: inherit; }
button, .button, .primary { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: var(--ink); cursor: pointer; text-decoration: none; font-size: 13px; font-weight: 650; }
button:hover, .button:hover { background: var(--surface); border-color: var(--control-line); }
button:disabled, select:disabled { opacity: .65; cursor: default; }
.primary { color: var(--on-solid); background: var(--solid); border-color: var(--solid); }
.primary:hover { color: var(--on-solid); background: var(--solid-hover); border-color: var(--solid-hover); }
input, select { display: block; width: 100%; min-width: 0; padding: 8px 11px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--raised); color: var(--ink); }
input::placeholder { color: var(--muted); }
label { display: block; font-weight: 650; }
label > input, label > select { margin-top: 5px; font-weight: 400; }
summary { cursor: pointer; font-weight: 650; }
.muted { color: var(--muted); }
.error { color: var(--error); }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: fixed; z-index: 10; top: 10px; left: 10px; padding: 8px; background: var(--raised); }

.topbar { position: sticky; z-index: 3; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: var(--header-height); padding: 8px clamp(14px, 3vw, 36px); gap: 12px; background: var(--canvas); border-bottom: 1px solid var(--line); }
.brand, .top-actions, #account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { color: var(--ink); font-size: 15px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--accent); background: var(--accent-bg); }
.brand-mark svg { width: 20px; height: 20px; }
.brand-context { color: var(--muted); font-weight: 500; }
.brand-divider { width: 1px; height: 17px; background: var(--line); }
#account-name { max-width: 19vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.quiet-button { border-color: transparent; background: transparent; white-space: nowrap; }
.icon-button { width: 38px; padding: 0; }
.icon-button svg { width: 18px; height: 18px; }
.sun-icon, :root[data-theme="dark"] .moon-icon { display: none; }
:root[data-theme="dark"] .sun-icon { display: block; }

.layout { display: grid; grid-template-columns: clamp(220px, 22vw, 270px) minmax(0, 1fr); min-height: calc(100dvh - var(--header-height)); }
.sidebar { position: sticky; top: var(--header-height); height: calc(100dvh - var(--header-height)); overflow-y: auto; padding: 25px 18px; background: var(--surface); border-right: 1px solid var(--line); }
.nav-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.nav-heading label { font-size: 13px; }
.version, .pill { display: inline-flex; padding: 2px 8px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 600; white-space: nowrap; }
#search { margin-bottom: 14px; font-size: 13px; }
.nav-toggle { display: none; }
.nav-label, .eyebrow { display: block; font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.nav-label { margin: 0 0 5px; padding: 0 8px; color: var(--muted); }
.eyebrow { margin-bottom: 10px; color: var(--accent); }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 7px; color: var(--ink); font-size: 13px; line-height: 1.4; text-decoration: none; }
.nav-link:hover, .nav-link[aria-current] { color: var(--accent); background: var(--accent-bg); }
.nav-link[aria-current] { font-weight: 700; }
.nav-group { margin-top: 20px; }
.method, .status { display: inline-block; flex: none; padding: 2px 6px; border-radius: 5px; color: var(--muted); background: var(--surface); font: 750 11px/1.5 var(--mono); }
.nav-link .method { font-size: 10px; }
.method-get, .method-head { color: var(--get); background: var(--get-bg); }
.method-post { color: var(--post); background: var(--post-bg); }
.method-put, .method-patch { color: var(--update); background: var(--update-bg); }
.method-delete { color: var(--error); background: var(--error-bg); }
.status-4, .status-5 { color: var(--error); background: var(--error-bg); }

#reference { width: 100%; max-width: 1210px; min-width: 0; margin-inline: auto; padding: clamp(24px, 5vw, 66px); container-type: inline-size; }
#reference:focus { outline: none; }
.hero { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.lead { color: var(--muted); font-size: 16px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.guide { margin-top: 30px; }
.guide .prose > h2:not(:first-child) { margin-top: 26px; }
.environment { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 8px 0; overflow-wrap: anywhere; }
.environment code { font-size: 13px; }
.operation-head { margin-bottom: 30px; }
.route { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; overflow-wrap: anywhere; }
.route code { min-width: 0; font-size: 14px; font-weight: 600; }
.server-url { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 8px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.nested-schema > summary { color: var(--accent); font-size: 13px; }
.prose { max-width: 77ch; overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 23px; }
.prose blockquote { margin: 14px 0; padding: 9px 13px; border-left: 2px solid var(--accent); background: var(--accent-bg); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose pre { overflow-x: auto; padding: 12px; background: var(--code-bg); }
.prose :not(pre) > code { padding: 1px 4px; border-radius: 4px; background: var(--surface); }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 5px 9px; text-align: left; }

.reference-section, .game-options { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; }
.reference-section > .prose + .reference-disclosure { margin-top: 12px; }
.operation-examples { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; }
.reference-section + .operation-examples { margin-top: 24px; }
.operation-examples > section { min-width: 0; margin: 0; padding: 0; border: 0; }
.operation-examples .sample + .sample { margin-top: 8px; }
@container (min-width: 760px) {
  .operation-examples:has(> :nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.reference-disclosure { margin-bottom: 7px; border: 1px solid var(--line); border-radius: 8px; }
.reference-disclosure > summary { padding: 9px 12px; }
.reference-disclosure > summary:hover { background: var(--surface); }
.reference-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.disclosure-body { padding: 12px; }
.disclosure-body .schema + .media-type, .disclosure-body .prose + .prose { margin-top: 16px; }
#reference > .reference-disclosure { margin-top: 16px; }
.media-type { margin: 0 0 8px; color: var(--accent); font: 600 12px/1.55 var(--mono); overflow-wrap: anywhere; }
.fields { margin: 0; }
.field { padding: 9px 0; border-top: 1px solid var(--line); }
.field dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; overflow-wrap: anywhere; }
.field dt code { min-width: 0; font-weight: 650; }
.field dd { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.field dd:empty { display: none; }
.field dd > :last-child { margin-bottom: 0; }
.field dd details { margin-top: 5px; }
.field dd .schema { margin: 5px 0 0 6px; padding-left: 10px; border-left: 1px solid var(--line); }
.type, .required, .allowed { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.allowed { font-family: var(--mono); }
.required { color: var(--error); font-size: 11px; font-weight: 650; }
.sample { border: 1px solid var(--line); border-radius: 9px; background: var(--code-bg); }
.sample-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.example-notes { padding: 12px; border-bottom: 1px solid var(--line); background: var(--accent-bg); font-size: 13px; }
.example-notes h3 { margin-bottom: 6px; font-size: 13px; }
.sample-label { color: var(--muted); font-size: 12px; }
.sample-copy { flex: none; min-height: 28px; margin-left: auto; padding: 2px 8px; font-size: 11px; }
.sample pre { margin: 0; padding: 12px; overflow: auto; max-height: 31rem; border-radius: 0 0 8px 8px; font: 12px/1.65 var(--mono); }
.example-picker { position: relative; flex: 1; min-width: 0; }
.example-trigger { max-width: 100%; min-height: 28px; gap: 10px; padding: 4px 9px; font-size: 12px; text-align: left; }
.example-trigger span { min-width: 0; overflow-wrap: anywhere; }
.example-trigger::after { content: ''; flex: none; width: 6px; height: 6px; margin-top: -3px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.example-trigger[aria-expanded="true"] { background: var(--surface); border-color: var(--control-line); }
.example-trigger[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(225deg); }
.example-menu { position: absolute; z-index: 2; inset: calc(100% + 6px) auto auto 0; width: min(100%, 22rem); max-height: min(19rem, var(--menu-space, 19rem)); overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--raised); box-shadow: 0 8px 22px #0003; }
.opens-up .example-menu { inset: auto auto calc(100% + 6px) 0; }
.example-option { display: grid; grid-template-columns: minmax(0, 1fr) 12px; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 5px 8px; border: 0; border-radius: 5px; background: transparent; font-size: 12px; font-weight: 500; text-align: left; overflow-wrap: anywhere; }
.example-option[aria-checked="true"] { color: var(--accent); background: var(--accent-bg); font-weight: 650; }
.example-option[aria-checked="true"]::after { content: ''; justify-self: center; width: 5px; height: 9px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.example-option:focus-visible { outline-offset: -2px; }
.code-key { color: var(--code-key); }
.code-string { color: var(--code-string); }
.code-literal { color: var(--code-literal); }
.response { border: 1px solid var(--line); border-radius: 9px; }
.response + .response { margin-top: 7px; }
.response > summary, .response-label, .game-option > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) 12px; align-items: center; gap: 9px; padding: 10px 12px; list-style: none; border-radius: 8px; overflow-wrap: anywhere; }
.response > summary::-webkit-details-marker, .game-option > summary::-webkit-details-marker { display: none; }
.response > summary::after, .game-option > summary::after { content: ''; justify-self: center; width: 7px; height: 7px; margin-top: -3px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.response[open] > summary::after, .game-option[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
.response > summary:hover, .game-option > summary:hover { background: var(--surface); }
.response[open] > summary, .game-option[open] > summary { background: var(--surface); border-radius: 8px 8px 0 0; }
.response-label { grid-template-columns: auto minmax(0, 1fr); font-weight: 650; }
.response-payload { border-top: 1px solid var(--line); }
.response-payload .sample { border: 0; border-radius: 0 0 8px 8px; }
.game-option { border: 1px solid var(--line); border-radius: 9px; }
.game-option + .game-option { margin-top: 7px; }
.game-option > summary { grid-template-columns: minmax(0, 1fr) auto 12px; }
.game-identity { display: grid; gap: 2px; overflow-wrap: anywhere; }
.game-identity > span { color: var(--muted); font-size: 12px; font-weight: 500; }
.game-currencies { display: flex; justify-content: end; flex-wrap: wrap; gap: 4px; max-width: min(30vw, 14rem); }
.game-currencies .pill { color: var(--muted); background: var(--surface); }
.game-option-body { padding: 0 clamp(12px, 3vw, 20px); border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.game-option-body .field { padding: 12px 0; }
.game-option-body .field:first-child { border-top: 0; }
.game-option-body dd { max-width: 72ch; margin-top: 4px; }
.game-options-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.game-options-notice p { margin: 0; }

.auth-screen { min-height: calc(100dvh - var(--header-height)); display: grid; justify-items: center; align-content: start; padding: clamp(30px, 12vh, 120px) 16px; background: var(--surface); }
.auth-access { width: min(100%, 430px); padding: clamp(20px, 5vw, 34px); border: 1px solid var(--line); border-radius: 15px; background: var(--canvas); }
.auth-access h1 { font-size: 29px; margin-bottom: 8px; }
#signin-form label { margin-top: 16px; font-size: 13px; }
#signin-form input, #signin-form .primary { min-height: 42px; }
#signin-form input { font-size: 16px; }
#signin-form .primary { width: 100%; margin-top: 20px; }
#signin-error { margin: 10px 0 0; }
.auth-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 740px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; min-height: 34px; }
  #nav-content { display: none; max-height: 45dvh; overflow-y: auto; padding: 10px 3px 4px; }
  .nav-toggle[aria-expanded="true"] + #nav-content { display: block; }
}
@media (max-width: 480px) {
  #account-name, .brand-divider, .brand-context { display: none; }
  #reference { padding: 24px 14px; }
  .game-option > summary { grid-template-columns: minmax(0, 1fr) 12px; }
  .game-option > summary::after { grid-column: 2; grid-row: 1; }
  .game-currencies { grid-column: 1; justify-content: start; max-width: none; }
}
