:root { color-scheme: dark; --bg: #14141c; --panel: #1f1f2b; --fg: #e8e8f0; --dim: #9a9ab0; --accent: #7c5cff; --bad: #ff6b6b; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, sans-serif; }
header, main, footer { max-width: 760px; margin: 0 auto; padding: 16px; }
header h1 { margin: 16px 0 0; letter-spacing: .2em; }
header p, footer p { color: var(--dim); }
code { background: #0003; padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
#drop { border: 2px dashed var(--dim); border-radius: 12px; padding: 40px 16px; text-align: center; cursor: pointer; }
#drop:hover, #drop:focus, #drop.over { border-color: var(--accent); background: #7c5cff18; outline: none; }
#card { background: var(--panel); border-radius: 12px; padding: 16px 20px; margin-top: 16px; }
#card h2 { margin: 0; }
#card h3 { margin-bottom: 4px; }
#c-meta, #c-license, .small { color: var(--dim); }
.small { font-size: 13px; }
#error { background: #ff6b6b22; border: 1px solid var(--bad); color: var(--bad); padding: 10px 14px; border-radius: 8px; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 8px 18px; font: inherit; cursor: pointer; }
button.secondary { background: #3a3a4c; }
.bar { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 8px; }
#screen { display: flex; justify-content: center; }
iframe { border-radius: 8px; }
/* The game frame carries inline sizing (width, max-width, aspect-ratio); fullscreen must override it or the frame
   keeps a stale size after Esc in WebKit (the desktop app on macOS). */
iframe:fullscreen { width: 100% !important; max-width: none !important; height: 100% !important; aspect-ratio: auto !important; border-radius: 0; }
.nav { max-width: 760px; margin: 0 auto; padding: 12px 16px 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav a { color: var(--dim); text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--fg); }
a { color: #a99bff; }
.doc, .play { max-width: 860px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; background: var(--panel); border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.toc a { text-decoration: none; }
.doc h2 { margin-top: 36px; border-bottom: 1px solid #ffffff22; padding-bottom: 4px; }
.doc h3 { margin-top: 24px; }
pre { background: #0d0d14; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.45; }
pre code { background: none; padding: 0; word-break: normal; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; margin: 8px 0 16px; font-size: 15px; }
th, td { border: 1px solid #ffffff22; padding: 5px 10px; text-align: left; vertical-align: top; }
th { background: var(--panel); }
.play label { display: block; margin: 12px 0 4px; color: var(--dim); }
.play label.inline { display: inline; margin-left: 12px; }
.play select { width: 100%; max-width: 420px; background: #0d0d14; color: var(--fg); border: 1px solid #ffffff2a; border-radius: 8px; padding: 8px 10px; font: 14px/1.45 system-ui, sans-serif; }
input[type=text], textarea { width: 100%; background: #0d0d14; color: var(--fg); border: 1px solid #ffffff2a; border-radius: 8px; padding: 8px 10px; font: 14px/1.45 ui-monospace, Consolas, monospace; }
textarea { tab-size: 2; resize: vertical; }
.nav .brand { color: var(--fg); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-right: 10px; }
header h1 { letter-spacing: .22em; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.banner { position: relative; max-width: 1200px; margin: 12px auto 0; }
.banner img { display: block; width: 100%; height: auto; border-radius: 14px; background: #0b0b14; }
#banner .home-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
#banner .featured { background: var(--panel); border-radius: 14px; padding: 6px 18px 14px; }
#banner .featured h2 { margin: 10px 0 2px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
#banner .featured h3 { margin: 4px 0; font-size: 22px; }
#banner #drop { display: flex; flex-direction: column; justify-content: center; border: 2px dashed var(--dim); border-radius: 14px; padding: 22px 16px; text-align: center; cursor: pointer; }
#banner #drop strong { display: block; font-size: 18px; }
#banner #drop span { color: var(--dim); font-size: 14px; }
#banner #drop:hover, #banner #drop:focus-visible, #banner #drop.over { border-color: var(--accent); background: #7c5cff22; outline: none; }
#banner .featured .shot { display: block; margin: 8px 0 10px; }
#banner .featured .shot img { display: block; width: 100%; height: auto; border-radius: 10px; background: #04050d; }
#banner .home-col { display: flex; flex-direction: column; gap: 12px; }
#banner .top { background: var(--panel); border-radius: 14px; padding: 6px 18px 14px; }
#banner .top h2 { margin: 10px 0 6px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
#banner .top ol { margin: 0; padding-left: 22px; columns: 2; }
#banner .top li { margin: 2px 0; }
@media (max-width: 640px) { #banner .top ol { columns: 1; } #banner .home-row { grid-template-columns: 1fr; } }
#error { max-width: 1024px; margin: 12px auto 0; }
.downloads { background: var(--panel); border-radius: 12px; padding: 4px 18px 8px; margin-bottom: 18px; }
.downloads h2 { margin: 12px 0 8px; font-size: 18px; }
.downloads p { margin: 8px 0; }
a.button { display: inline-block; background: var(--accent); color: #fff; border-radius: 8px; padding: 8px 18px; text-decoration: none; margin: 0 6px 6px 0; }
a.button.secondary { background: #3a3a4c; }
.downloads button { margin: 0 6px 6px 0; }
button:disabled { opacity: .6; cursor: not-allowed; }
#dl-note { color: var(--bad); }
#dropzone { border: 2px dashed var(--dim); border-radius: 12px; padding: 36px 16px; text-align: center; cursor: pointer; }
#dropzone:hover, #dropzone:focus, #dropzone.over { border-color: var(--accent); background: #7c5cff18; outline: none; }
#load-error { background: #ff6b6b22; border: 1px solid var(--bad); color: var(--bad); padding: 10px 14px; border-radius: 8px; white-space: pre-wrap; }
.pack h2 { margin-top: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; }
.form-grid label { display: block; color: var(--dim); font-size: 14px; }
.form-grid label.wide, .form-grid fieldset.wide { grid-column: 1 / -1; }
.form-grid small { display: block; margin-top: 4px; font-size: 12px; }
.form-grid input[type=text], .form-grid input[type=number], .form-grid select { display: block; width: 100%; margin-top: 4px; background: #0d0d14; color: var(--fg); border: 1px solid #ffffff2a; border-radius: 8px; padding: 8px 10px; font: 15px/1.4 system-ui, sans-serif; }
.form-grid fieldset { border: 1px solid #ffffff22; border-radius: 8px; padding: 8px 12px; }
.form-grid legend { color: var(--dim); font-size: 14px; padding: 0 6px; }
.form-grid label.inline { display: inline-block; margin: 4px 18px 4px 0; color: var(--fg); }
.files { list-style: none; padding: 0; margin: 8px 0; font: 13px/1.6 ui-monospace, Consolas, monospace; max-height: 260px; overflow: auto; }
.files li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #ffffff10; }
.files .size { color: var(--dim); white-space: nowrap; }
.checks { list-style: none; padding: 0; margin: 8px 0; }
.checks li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 12px; margin: 6px 0; border-radius: 8px; background: var(--panel); white-space: pre-wrap; }
.checks li b { text-transform: uppercase; font-size: 11px; letter-spacing: .08em; padding: 2px 8px; border-radius: 99px; }
.checks .lvl-error b { background: #ff6b6b33; color: var(--bad); }
.checks .lvl-warn b { background: #ffa30033; color: #ffb84d; }
.checks .lvl-info b { background: #29adff2a; color: #7cc7ff; }
.checks span { flex: 1 1 300px; }
#check-summary.bad { color: var(--bad); }
#check-summary.warn { color: #ffb84d; }
#check-summary.good { color: #5ee08a; }
.actions button { margin-right: 8px; }
#action-note { color: var(--dim); }
.form-grid .check { display: block; color: var(--fg); font-size: 15px; }
#obf-row[hidden] { display: none; }
.downloads .cmd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.downloads .cmd code { font-size: 15px; padding: 4px 10px; user-select: all; }
.downloads .cmd button { margin: 0; padding: 4px 12px; }
.library .bar { gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.library .bar h2 { margin: 0; border: 0; }
#lib-search { background: #0d0d14; color: var(--fg); border: 1px solid #ffffff2a; border-radius: 8px; padding: 8px 10px; font: 15px system-ui, sans-serif; min-width: 240px; }
#lib-error { background: #ff6b6b22; border: 1px solid var(--bad); color: var(--bad); padding: 10px 14px; border-radius: 8px; white-space: pre-wrap; }
.games { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.games li { background: var(--panel); border-radius: 12px; padding: 4px 16px 8px; }
.games h3 { margin: 12px 0 0; }
.games p { margin: 6px 0; }
.games .actions button { margin: 4px 8px 4px 0; }
.sale { margin: 8px 0; }
a.buy { display: inline-block; background: var(--accent); color: #fff; border-radius: 8px; padding: 6px 14px; text-decoration: none; }
a.buy:hover { filter: brightness(1.1); }
#account { margin-left: auto; margin-top: 4px; position: relative; font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
/* sign-in button: GitHub's own dark button look, with its logo */
a.signin-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 11px; border-radius: 8px; border: 1px solid #ffffff2e; background: #24292f; color: #fff; font: 600 14px/1 system-ui, sans-serif; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
a.signin-btn:hover { background: #32383f; border-color: #ffffff55; color: #fff; }
a.signin-btn:active { transform: translateY(1px); }
a.signin-google { background: #fff; color: #1f1f1f; border-color: #747775; font-weight: 500; }
a.signin-google:hover { background: #f1f3f4; color: #1f1f1f; border-color: #747775; }
a.signin-btn:focus-visible, .testing-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 8px 14px; background: #7a4a00; color: #fff; font-size: 15px; font-weight: 600; }
.testing-bar button { padding: 3px 12px; }
.account-menu summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a.signin-btn svg { flex: none; display: block; }
/* signed in: a pill with the initial and the name */
.account-menu summary { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 5px; border-radius: 999px; border: 1px solid #ffffff2e; background: var(--panel); color: var(--fg); cursor: pointer; list-style: none; user-select: none; }
.account-menu summary:hover, .account-menu[open] summary { border-color: #ffffff55; background: #2a2a3a; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { content: ''; width: 6px; height: 6px; margin: 0 2px 3px 2px; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim); transform: rotate(45deg); }
.account-menu[open] summary::after { margin-bottom: -2px; transform: rotate(225deg); }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px; }
.account-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-panel { position: absolute; right: 0; top: 40px; z-index: 5; min-width: 250px; background: var(--panel); border: 1px solid #ffffff22; border-radius: 12px; padding: 4px 16px 8px; box-shadow: 0 10px 30px #000a; text-align: left; }
.account-panel p { margin: 10px 0; }
.account-who { overflow-wrap: anywhere; }
button.danger { border-color: #ff6b6b66; color: var(--bad); }
button.danger:hover { background: #ff6b6b22; }
.account-panel .actions { display: flex; flex-direction: column; gap: 8px; }
.account-panel .actions button { width: 100%; }
/* the store */
main.store { max-width: 1040px; }
.welcome { margin: 4px 0 0; color: var(--dim); }
.welcome a { color: var(--fg); }
.hero { --a: #2a2a3c; --b: #1b1b27; --t: #fff; margin: 12px 0 8px; padding: 32px 28px; border-radius: 16px; color: var(--t); background: linear-gradient(135deg, var(--a), var(--b)); border: 1px solid #ffffff1c; box-shadow: 0 10px 30px #0006; }
.hero h2 { margin: 4px 0 8px; font-size: clamp(28px, 5vw, 44px); letter-spacing: .04em; border: 0; }
.hero p { margin: 8px 0; max-width: 62ch; }
.hero .small { color: inherit; opacity: .75; }
.hero-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; opacity: .8; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; }
.hero a.button { background: #fff; color: #111; font-weight: 700; padding: 10px 22px; border-radius: 10px; text-decoration: none; }
.hero a.button:hover { filter: brightness(.92); }
.hero .sale { margin: 0; }
.hero .sale .small { color: inherit; }
.store-tools { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; background: linear-gradient(var(--bg) 82%, #14141c00); }
.store-tools input[type="search"] { flex: 1 1 220px; max-width: 320px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid #ffffff2e; background: var(--panel); color: var(--fg); font: inherit; }
.store-tools input[type="search"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #ffffff2e; background: transparent; color: var(--dim); font-size: 14px; }
.chip:hover { color: var(--fg); border-color: #ffffff55; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.row { margin: 22px 0 8px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.row-head h2 { margin: 0 0 10px; font-size: 20px; border: 0; }
.row-head button { height: 28px; padding: 0 12px; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
a.game-card { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid #ffffff14; color: var(--fg); text-decoration: none; transition: transform .12s, border-color .12s, box-shadow .12s; }
a.game-card:hover, a.game-card:focus-visible { transform: translateY(-3px); border-color: #ffffff55; box-shadow: 0 8px 22px #0007; outline: none; }
a.game-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.game-art { --a: #2a2a3c; --b: #1b1b27; --t: #fff; position: relative; display: flex; align-items: flex-end; min-height: 104px; padding: 12px 14px; color: var(--t); background: linear-gradient(135deg, var(--a), var(--b)); }
.game-title { font-weight: 800; font-size: 20px; line-height: 1.15; letter-spacing: .02em; text-shadow: 0 1px 8px #0006; }
.badge { position: absolute; top: 8px; right: 8px; padding: 2px 9px; border-radius: 999px; background: #ffd65a; color: #3a2a00; font-size: 12px; font-weight: 700; }
.game-info { padding: 10px 14px 14px; }
.game-info p { margin: 0 0 4px; }
.game-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; color: var(--fg); }
body.wide .nav { max-width: 1040px; }
/* account settings */
main.settings { max-width: 760px; }
main.settings > * { max-width: 640px; }
main.settings h2 { margin-top: 36px; font-size: 20px; border-bottom: 1px solid #ffffff22; padding-bottom: 4px; }
.field { margin: 18px 0; }
.field > label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"] { width: 100%; max-width: 420px; height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid #ffffff2e; background: var(--panel); color: var(--fg); font: inherit; }
.field input[type="text"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.field .check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.field .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.field p.small { margin: 6px 0 0; }
.msg { margin: 10px 0; padding: 8px 12px; border-radius: 8px; background: #3ecf8e22; border: 1px solid #3ecf8e66; }
.msg.bad { background: #ff6b6b22; border-color: #ff6b6b66; color: var(--bad); }
.account-link { display: inline-block; margin: 4px 0 8px; color: var(--fg); }
.save-list { list-style: none; margin: 8px 0; padding: 0; }
.save-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 10px 0; border-bottom: 1px solid #ffffff14; }
.save-list .actions { display: flex; gap: 8px; margin: 0; }
.save-list button { height: 30px; padding: 0 12px; font-size: 13px; }
/* leaderboards */
main.leaderboard { max-width: 760px; }
.board-list { list-style: none; padding: 0; }
.board-list li { padding: 10px 0; border-bottom: 1px solid #ffffff14; }
main.leaderboard table { width: 100%; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.you td { background: #7c5cff22; font-weight: 600; }
a.chip { display: inline-flex; align-items: center; text-decoration: none; }
a.chip[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
/* analytics */
main.analytics { max-width: 960px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.card { background: var(--panel); border-radius: 10px; padding: 12px 14px; }
.card .value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .label { color: var(--dim); font-size: 13px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .legend { display: flex; gap: 16px; font-size: 13px; color: var(--dim); margin-top: 4px; }
.chart .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.chart .axis { fill: var(--dim); font-size: 11px; }
.chart .bar-a { fill: var(--accent); }
.chart .bar-b { fill: #3ecf8e; }
.chart .grid { stroke: #ffffff18; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 28px; }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 5px 0; font-size: 14px; }
.bars .track { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: #ffffff14; overflow: hidden; }
.bars .fill { display: block; height: 100%; background: var(--accent); }
main.analytics table { width: 100%; }
main.analytics th, main.analytics td { padding: 6px 10px; text-align: left; border-bottom: 1px solid #ffffff14; }
main.analytics table.users { font-size: 14px; white-space: nowrap; }
main.analytics input[type="search"] { width: 100%; max-width: 360px; }
.chart .swatch.bar-a { background: var(--accent); }
.chart .swatch.bar-b { background: #3ecf8e; }

.install { max-width: 1200px; margin: 12px auto 0; }
.install p { margin: 10px 0; }
.how-to video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; }
.how-to ol { padding-left: 22px; }
.tools { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tools li { background: var(--panel); border-radius: 12px; padding: 4px 16px 12px; }
.tools h2 { margin: 12px 0 6px; font-size: 18px; border: 0; }
.tools p { margin: 6px 0; }
.site-links { max-width: 760px; margin: 28px auto 20px; padding: 0 16px; font-size: 14px; color: var(--dim); }
body.wide .site-links { max-width: 1040px; }
html:not([data-mode="develop"]) .mode-develop, html[data-mode="develop"] .mode-play { display: none; }
.mode-switch { display: flex; gap: 8px; }
.mode-switch button { flex: 1; }
.mode-switch button[aria-pressed="true"] { background: var(--accent); }
.worldmap svg { display: block; width: 100%; height: auto; border-radius: 10px; background: #0d0d14; }

.choose-lead { text-align: center; color: var(--dim); }
.choose-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
button.choose { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; min-height: 160px; padding: 24px 16px; border-radius: 16px; background: var(--panel); border: 2px solid var(--accent); color: inherit; cursor: pointer; font: inherit; }
button.choose strong { font-size: 28px; }
button.choose span { color: var(--dim); font-size: 16px; }
button.choose:hover, button.choose:focus-visible { background: #7c5cff33; outline: none; }
@media (max-width: 640px) { .choose-buttons { grid-template-columns: 1fr; } }

/* a game's own page (games/<slug>.html) and the list of all games (games/) */
.game-page { max-width: 760px; margin: 18px auto; padding: 0 16px; }
.game-page h1 { margin: 6px 0 2px; }
.game-page .shot { display: block; margin: 12px 0; }
.game-page .shot img { display: block; width: 100%; height: auto; border-radius: 12px; background: #0b0b14; }
.game-page .facts { list-style: none; padding: 0; }
.game-page .related { columns: 2; padding-left: 20px; }
.game-page .related li { margin: 3px 0; break-inside: avoid; }
@media (max-width: 640px) { .game-page .related { columns: 1; } }

/* the Studio page (studio.html) */
main.studio-page { max-width: 728px; margin: 0 auto; padding: 0 16px 40px; }
.studio-drop { display: flex; flex-direction: column; gap: 4px; align-items: center; border: 2px dashed var(--dim); border-radius: 14px; padding: 22px 16px; text-align: center; cursor: pointer; margin: 12px 0; }
.studio-drop strong { font-size: 18px; }
.studio-drop span { color: var(--dim); font-size: 14px; }
.studio-drop:hover, .studio-drop:focus-visible, .studio-drop.over { border-color: var(--accent); background: #7c5cff22; outline: none; }
.studio-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.studio-table th, .studio-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #ffffff1a; vertical-align: middle; }
.studio-table th { color: var(--dim); font-size: 13px; font-weight: 600; }
.studio-actions { white-space: normal; }
.studio-actions .button, .studio-actions button { margin: 2px 4px 2px 0; padding: 6px 12px; }
@media (max-width: 700px) { .studio-actions { white-space: normal; } }

/* where a game came from (js/provenance.js): in the Library and on the card before a game runs */
.source { margin: 4px 0; font-size: 14px; color: var(--dim); }
.source-store { color: #3ecf8e; }
.source-file, .source-changed { color: #ffa300; }
#c-source { padding: 8px 12px; border-radius: 8px; background: #ffffff0d; border-left: 3px solid var(--dim); color: inherit; font-size: 15px; }
#c-source.source-store strong { color: #3ecf8e; }
#c-source.source-file strong, #c-source.source-changed strong { color: #ffa300; }
#c-source.source-store { border-left-color: #3ecf8e; }
#c-source.source-file, #c-source.source-changed { border-left-color: #ffa300; }
#c-source.source-studio { border-left-color: var(--accent); color: inherit; }

/* the waiting list on the Plans page */
.notify { background: var(--panel); border-radius: 12px; padding: 4px 18px 14px; margin: 18px 0; max-width: 640px; }
.notify h3 { margin: 12px 0 6px; }
.notify form label[for] { display: block; margin: 8px 0 4px; }
.notify input[type="email"] { width: 100%; max-width: 420px; }
.notify fieldset { border: 0; padding: 0; margin: 10px 0; }
.notify legend { color: var(--dim); font-size: 14px; padding: 0; margin-bottom: 4px; }
.notify .check { display: inline-block; margin-right: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* the npm page (npm.html) */
main.npm .cmd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0; }
main.npm .cmd code { font-size: 15px; padding: 5px 10px; user-select: all; }
main.npm .cmd button { margin: 0; padding: 4px 12px; }
main.npm .steps > li { margin: 14px 0; }
main.npm dt { margin-top: 14px; font-weight: 600; }
main.npm dd { margin: 4px 0 0 0; color: var(--dim); }

/* the version picker on the spec page: what a newer language version added is hidden */
[data-since][hidden] { display: none !important; }
.version-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 8px 12px; background: var(--panel); border-radius: 10px; }
.version-picker select { font: inherit; }

/* a running game, and under it on a phone or tablet the on-screen controls (js/touch.js) */
.game-wrap { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.game-wrap:fullscreen { width: 100%; height: 100%; background: #000; justify-content: center; }
.game-wrap:fullscreen iframe { flex: 1 1 auto; min-height: 0; width: 100% !important; max-width: none !important; height: auto !important; aspect-ratio: auto !important; }
.touchpad { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 8px 12px; width: 100%; max-width: 560px; padding: 14px 12px 18px; box-sizing: border-box; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.touchpad * { touch-action: none; -webkit-tap-highlight-color: transparent; }
.tp-dpad { position: relative; width: 150px; height: 150px; border-radius: 50%; background: #ffffff12; justify-self: start; }
.tp-arrow { position: absolute; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #ffffff99; border-radius: 12px; pointer-events: none; }
.tp-up { top: 6px; left: 53px; } .tp-down { bottom: 6px; left: 53px; } .tp-left { left: 6px; top: 53px; } .tp-right { right: 6px; top: 53px; }
.tp-arrow.on { background: #7c5cff; color: #fff; }
.tp-buttons { display: flex; gap: 18px; justify-self: end; align-items: flex-end; }
.tp-btn { width: 68px; height: 68px; border-radius: 50%; border: 0; background: #ffffff1c; color: #ffffffcc; font: 700 22px system-ui, sans-serif; margin: 0; padding: 0; }
.tp-a { margin-bottom: 26px; }
.tp-btn.on { background: #7c5cff; color: #fff; }
.tp-start { grid-column: 1 / 3; grid-row: 2; justify-self: center; width: auto; height: 34px; border-radius: 17px; padding: 0 22px; font-size: 13px; letter-spacing: .1em; }
@media (max-width: 420px) { .touchpad { gap: 8px; } .tp-dpad { width: 132px; height: 132px; } .tp-up { left: 44px; } .tp-down { left: 44px; } .tp-left { top: 44px; } .tp-right { top: 44px; } .tp-btn { width: 60px; height: 60px; } }
