:root {
  color: #e9eef5;
  background: #0b1220;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
.site-header { align-items: center; border-bottom: 1px solid #26344c; display: flex; justify-content: space-between; padding: 1rem max(1.5rem, calc((100vw - 1100px) / 2)); }
.brand { font-weight: 700; text-decoration: none; }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { color: #a8c7ff; text-decoration: none; }
.nav-form { margin: 0; }
.nav-button { background: transparent; border: 0; color: #a8c7ff; cursor: pointer; font: inherit; padding: 0; }
main { margin: 0 auto; max-width: 1100px; padding: 5rem 1.5rem; }
.hero { max-width: 670px; }
.eyebrow { color: #69d7ae; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1 { font-size: clamp(2.5rem, 7vw, 5rem); line-height: 1; margin: .25rem 0 1rem; }
h2 { margin-top: 0; }
p { color: #b7c4d6; font-size: 1.1rem; line-height: 1.6; }
.button { background: #69d7ae; border-radius: .4rem; color: #08130f; display: inline-block; font-weight: 700; margin-top: 1rem; padding: .75rem 1rem; text-decoration: none; }
.dashboard-shell { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) 280px; }
.dashboard-shell aside { background: #121d30; border: 1px solid #26344c; border-radius: .6rem; padding: 1.25rem; }
.auth-panel { margin: 0 auto; max-width: 520px; }
.stacked-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.stacked-form label { color: #d9e4f2; display: grid; font-weight: 600; gap: .45rem; }
.stacked-form input, .stacked-form textarea { background: #121d30; border: 1px solid #40516f; border-radius: .4rem; color: #e9eef5; font: inherit; padding: .7rem; width: 100%; }
.stacked-form textarea { resize: vertical; }
.stacked-form .button { border: 0; cursor: pointer; margin-top: .25rem; width: fit-content; }
.form-error { background: #401d2c; border: 1px solid #a84667; border-radius: .4rem; color: #ffd7e2; padding: .75rem; }
.form-note { font-size: .95rem; }
.agents-layout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) 360px; }
.agent-form-panel, .agent-item { background: #121d30; border: 1px solid #26344c; border-radius: .6rem; padding: 1.25rem; }
.agent-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.agent-item h2 { margin-bottom: .4rem; }
.agent-item p { font-size: 1rem; margin: 0 0 .6rem; }
.agent-item a { color: #a8c7ff; overflow-wrap: anywhere; }
.api-key-section { border-top: 1px solid #26344c; margin-top: 1rem; padding-top: 1rem; }
.api-key-section h3 { font-size: 1rem; margin: 0 0 .6rem; }
.api-key-display { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.copy-status { color: #b7c4d6; font-size: .85rem; }
.credit-transfer-form { display: flex; align-items: end; flex-wrap: wrap; gap: .6rem; margin: .6rem 0; }
.credit-transfer-form label { display: grid; gap: .3rem; font-size: .85rem; }
.credit-transfer-form input { width: 10rem; max-width: 100%; background: #0b1220; border: 1px solid #40516f; border-radius: .3rem; color: #e9eef5; font: inherit; padding: .45rem; }
.api-key-list { display: grid; gap: .5rem; list-style: none; margin: 0 0 .8rem; padding: 0; }
.api-key-list li { align-items: center; display: flex; flex-wrap: wrap; gap: .45rem; }
.full-api-key { background: #0b1220; border-radius: .3rem; display: block; max-width: 100%; overflow-wrap: anywhere; padding: .45rem; user-select: all; }
.key-created { background: #153d33; border: 1px solid #4bb38e; border-radius: .4rem; padding: .8rem; }
.api-key-list form { display: inline; }
.key-create-form { align-items: end; display: flex; flex-wrap: wrap; gap: .6rem; }
.key-create-form label { display: grid; font-size: .85rem; gap: .3rem; }
.key-create-form input { background: #0b1220; border: 1px solid #40516f; border-radius: .3rem; color: #e9eef5; font: inherit; padding: .45rem; }
.text-button { background: transparent; border: 0; color: #a8c7ff; cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.key-status { color: #b7c4d6; font-size: .85rem; }
.api-key-reveal { background: #153d33; border: 1px solid #4bb38e; border-radius: .4rem; display: grid; gap: .4rem; margin-bottom: .8rem; padding: .8rem; }
.api-key-reveal code { overflow-wrap: anywhere; }
.empty-state { border-left: 3px solid #69d7ae; padding-left: 1rem; }
.game-preview { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, .82fr) minmax(360px, 1.18fr); align-items: center; }
.game-preview-copy h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
.game-stage { aspect-ratio: 1.14; background: radial-gradient(circle at 50% 45%, #142b3c 0, #09121a 68%); border: 1px solid #26344c; border-radius: 1rem; min-height: 360px; overflow: hidden; position: relative; }
#game-canvas { display: block; height: 100%; width: 100%; }
.game-status { color: #b7c4d6; left: 50%; margin: 0; position: absolute; top: 50%; transform: translate(-50%, -50%); }
.game-stage-label { bottom: 1rem; color: #b7c4d6; font-size: .7rem; font-weight: 700; left: 1rem; letter-spacing: .12em; position: absolute; }
.practice-page h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.practice-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); margin-top: 2rem; }
.practice-table-panel { background: #121d30; border: 1px solid #26344c; border-radius: .6rem; padding: 1.25rem; }
.agent-picker { border: 1px solid #40516f; border-radius: .4rem; display: grid; gap: .6rem; padding: .8rem; }
.agent-picker label { align-items: center; display: flex; font-weight: 400; }
.agent-picker input { width: auto; }
.table-selector { display: block; margin-bottom: .5rem; }
#table-select { background: #0b1220; border: 1px solid #40516f; border-radius: .4rem; color: #e9eef5; font: inherit; max-width: 100%; padding: .6rem; }
.table-id-label, .table-id-label code { font-size: .85rem; overflow-wrap: anywhere; }
.table-summary { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.table-summary dt { color: #a8c7ff; font-size: .8rem; text-transform: uppercase; }
.table-summary dd { font-weight: 700; margin: .35rem 0 0; }
.practice-players { display: grid; gap: .6rem; list-style: none; padding: 0; }
.practice-players li { background: #0b1220; border-radius: .4rem; line-height: 1.5; padding: .7rem; }
.remove-table { margin-left: 1rem; }
.agent-client h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.agent-client-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); margin-top: 2rem; }
.agent-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.action-button { background: #69d7ae; border: 0; border-radius: .4rem; color: #08130f; cursor: pointer; font: inherit; font-weight: 700; padding: .65rem .95rem; }
.action-button:disabled { cursor: not-allowed; opacity: .4; }
.raise-controls { align-items: center; display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.raise-controls input { background: #0b1220; border: 1px solid #40516f; border-radius: .4rem; color: #e9eef5; font: inherit; padding: .6rem; width: 9rem; }
.raise-controls .form-note { flex-basis: 100%; margin: 0; }
@media (prefers-reduced-motion: reduce) { #game-canvas { opacity: .98; } }
@media (max-width: 650px) { .dashboard-shell { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .game-preview, .agents-layout, .practice-layout, .agent-client-grid { grid-template-columns: 1fr; } .game-stage { min-height: 320px; } .site-header { align-items: flex-start; flex-direction: column; gap: 1rem; } .site-header nav { flex-wrap: wrap; } }
