/* JumPHP playground: a night-blue arcade cabinet, yellow buttons, pixels where it helps. */
:root {
	--bg: #0b0e1f;
	--bg-2: #11162e;
	--panel: #161c3a;
	--panel-2: #1d2550;
	--line: #2b3670;
	--ink: #eef0fa;
	--muted: #a6afd6;
	--faint: #8a93bf;
	--yellow: #ffd23f;
	--pink: #ff4d8d;
	--cyan: #3fd0ff;
	--green: #4be08a;
	--red: #ff6b6b;
	--radius: 6px;
	--mono: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
	--rainbow: linear-gradient(90deg, #ff4d4d, #ff9f1c, #ffd23f, #4be08a, #3fd0ff, #7c5cff, #ff4d8d);
	color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code, pre, kbd { font-family: var(--mono); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 4vw, 40px); }
h2 { font-size: clamp(20px, 2.6vw, 26px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.pixel { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.stripe { height: 4px; background: var(--rainbow); }

/* --- header ----------------------------------------------------------------------------------------- */
.top { background: var(--bg-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: baseline; gap: 8px; color: var(--ink); font: 800 22px var(--mono); letter-spacing: .08em; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--yellow); text-shadow: 2px 2px 0 var(--pink); }
.logo small { font: 600 11px var(--mono); color: var(--muted); letter-spacing: .15em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: var(--radius); font-weight: 600; white-space: nowrap; }
.nav a:hover, .nav a.on { color: var(--ink); background: var(--panel); text-decoration: none; }
.search { flex: 1; min-width: 110px; max-width: 360px; margin-left: auto; }
.me { display: flex; align-items: center; gap: 8px; }
.me img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); }
.me form { margin: 0; }
.lang { position: relative; }
.lang summary { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border: 2px solid var(--line); border-radius: 6px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 700; color: var(--muted); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--ink); }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; margin: 0; padding: 6px; list-style: none; min-width: 160px; max-height: 70vh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.lang ul.to-right { right: auto; left: 0; }
.lang ul { max-width: calc(100vw - 16px); }
.lang li a { display: block; padding: 6px 10px; border-radius: 5px; color: var(--ink); text-decoration: none; }
.lang li a:hover { background: var(--line); }
.lang li a.on { font-weight: 700; color: var(--ink); }
footer.bottom .langs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
footer.bottom .langs a[aria-current] { font-weight: 700; }
@media (max-width: 720px) {
	.top .wrap { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
	.search { order: 5; max-width: none; flex-basis: 100%; }
	.nav { order: 4; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
	.nav a { padding: 6px 7px; }
	.logo small { display: none; }
}

/* --- forms and buttons ------------------------------------------------------------------------------ */
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px; width: 100%; }
input[type=checkbox] { width: auto; }
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
label { display: block; font-weight: 600; margin: 0 0 6px; }
label.inline { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.field { margin-bottom: 18px; }
.field .hint { font-size: 14px; color: var(--muted); margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 700 15px var(--sans); padding: 10px 18px; border-radius: var(--radius); border: 2px solid var(--line);
	background: var(--panel); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn[hidden] { display: none; }
.btn.primary { background: var(--yellow); color: #17130a; border-color: #17130a; box-shadow: 4px 4px 0 var(--pink); }
.btn.primary:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--pink); }
.btn.big { font-size: 19px; padding: 14px 28px; }
.btn.small { font-size: 13px; padding: 6px 11px; }
.btn.danger { border-color: var(--red); color: var(--red); background: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions form { margin: 0; }

/* --- flashes, panels, badges ------------------------------------------------------------------------ */
.flash { padding: 12px 16px; border-radius: var(--radius); margin: 16px 0; white-space: pre-line; border: 1px solid; }
.flash.success { background: #10301f; border-color: var(--green); }
.flash.error { background: #3a1420; border-color: var(--red); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 20px; }
.badge { display: inline-block; font: 700 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }
.badge.ready { background: #123d27; color: var(--green); }
.badge.error { background: #45121f; color: var(--red); }
.badge.creating, .badge.empty { background: #403710; color: var(--yellow); }
.chip { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14px; }
.chip:hover, .chip.on { color: var(--ink); border-color: var(--yellow); text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
pre.code { background: #070914; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; font-size: 14px; white-space: pre-wrap; }
.cmd { display: flex; gap: 10px; align-items: flex-start; background: #070914; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.cmd code { flex: 1; white-space: pre-wrap; word-break: break-all; font-size: 14px; }
.cmd .btn { flex: none; }

/* --- page layout ------------------------------------------------------------------------------------ */
main { flex: 1; }
.section { padding-top: 36px; padding-bottom: 36px; }      /* not the sides: a .wrap.section keeps its 16px gutter */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.hero { padding: 48px 0 30px; }
.hero h1 { font-family: var(--mono); letter-spacing: .02em; max-width: 860px; }
.hero h1 em { font-style: normal; color: var(--yellow); text-shadow: 3px 3px 0 var(--pink); }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 720px; }
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
.steps .panel { padding: 18px; margin: 0; }
.steps .panel::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 8px;
	border-radius: 50%; background: var(--yellow); color: #17130a; font: 800 15px var(--mono); }
.two { display: grid; gap: 24px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
footer.bottom { border-top: 1px solid var(--line); background: var(--bg-2); padding: 26px 0 32px; color: var(--muted); font-size: 14px; margin-top: 40px; }
footer.bottom .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
body.full footer.bottom { display: none; }

/* --- game cards ------------------------------------------------------------------------------------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: transform .12s, border-color .12s; }
.card:hover { transform: translateY(-3px); border-color: var(--yellow); text-decoration: none; }
.thumb { aspect-ratio: 16 / 9; background: #070914; position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; font: 800 clamp(18px, 2.4vw, 26px) var(--mono); letter-spacing: .05em; padding: 12px; text-align: center;
	color: #fff; text-shadow: 3px 3px 0 rgba(0, 0, 0, .45); background: linear-gradient(135deg, hsl(var(--h) 70% 38%), hsl(calc(var(--h) + 60) 70% 22%)); }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: auto; padding-top: 4px; }
.card .meta img { width: 20px; height: 20px; border-radius: 50%; }
.card .cat { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--yellow); }
.cats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.cats a { display: block; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.cats a:hover { border-color: var(--yellow); text-decoration: none; }
.cats strong { display: block; font-size: 19px; }
.cats span { color: var(--muted); font-size: 14px; }
.cats em { float: right; font: 700 13px var(--mono); font-style: normal; color: var(--yellow); }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }

/* --- a game ----------------------------------------------------------------------------------------- */
.gamebar { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.gamebar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 8px; padding-bottom: 8px; max-width: none; }
.gamebar h1 { font-size: 18px; margin: 0; }
.gamebar .by { color: var(--muted); font-size: 14px; }
.gamebar .actions { margin-left: auto; gap: 6px; }
.frame { width: 100%; border: 0; display: block; background: #000; height: calc(100vh - var(--frame-top, 116px)); height: calc(100dvh - var(--frame-top, 116px)); min-height: 360px; }
/* --frame-top: what is above the frame, measured by assets/app.js (the header wraps on narrow screens); 116px until it runs */
/* dvh: the height really visible (a phone's browser bars shown), else the frame's bottom hides under them */
.game-hero { display: grid; gap: 28px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; padding: 36px 0; }
.game-hero .thumb { border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 860px) { .game-hero { grid-template-columns: 1fr; } .frame { height: calc(100vh - var(--frame-top, 150px)); height: calc(100dvh - var(--frame-top, 150px)); } }
/* phones: the bar of a game's site folds up under a small arrow pinned to the top of the screen */
.bar-fold, .bar-full { display: none; }
@media (max-width: 860px) {
	/* the arrow has its own strip above the portal's header: nothing under it. The page keeps scrolling as a whole (the frame is the
	   screen's height left under the bars, --frame-top): the game's text and pictures under it are part of the page, for people and for
	   search engines (a page locked to the screen's height with an inner scroller showed Googlebot nothing under the game) */
	body.has-bar-fold { padding-top: 22px; }
	.bar-fold { display: block; position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 30; touch-action: manipulation; width: 52px; height: 22px; padding: 0;
		border: 2px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; background: var(--bg-2); color: var(--ink); font: 700 12px/1 var(--sans); cursor: pointer; }
	.bar-fold:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
	/* fullscreen beside the arrow: there even when the bar is folded */
	.bar-full { display: block; position: fixed; top: 0; left: calc(50% + 32px); z-index: 30; touch-action: manipulation; width: 32px; height: 22px; padding: 0;
		border: 2px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; background: var(--bg-2); color: var(--ink); font: 700 13px/1 var(--sans); cursor: pointer; }
	.bar-full[hidden] { display: none; }
	.bar-full:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
	body.bar-folded .stripe, body.bar-folded header.top, body.bar-folded .gamebar { display: none; }
}
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; word-break: break-word; }

/* --- sources ---------------------------------------------------------------------------------------- */
.crumbs { font-family: var(--mono); font-size: 15px; margin: 18px 0; word-break: break-all; }
.crumbs a { color: var(--yellow); }
table.files { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.files td { padding: 8px 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 14px; }
table.files tr:first-child td { border-top: 0; }
table.files td.size { text-align: right; color: var(--faint); white-space: nowrap; }
pre.source { counter-reset: line; background: #070914; border: 1px solid var(--line); border-radius: 10px; padding: 12px 0; overflow-x: auto; font-size: 13.5px; line-height: 1.55; margin: 0; }
pre.source span { display: block; padding: 0 16px 0 0; white-space: pre; }
pre.source span::before { counter-increment: line; content: counter(line); display: inline-block; width: 52px; padding-right: 14px; margin-right: 12px; text-align: right; color: var(--faint); border-right: 1px solid var(--line); user-select: none; }
.preview-img { background: repeating-conic-gradient(#1a1f3c 0 25%, #12162c 0 50%) 0 0 / 16px 16px; padding: 18px; border-radius: 10px; border: 1px solid var(--line); }
.preview-img img { image-rendering: pixelated; margin: 0 auto; max-height: 70vh; }

/* --- editor ----------------------------------------------------------------------------------------- */
/* the editor fills what the header and the bar leave of the window, whatever their height */
@media (min-width: 961px) {
	body.full.has-editor { height: 100vh; height: 100dvh; }
	body.full.has-editor main { display: flex; flex-direction: column; min-height: 0; }
}
.editor { display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); flex: 1; min-height: 480px; }
.editor.no-preview { grid-template-columns: 250px minmax(0, 1fr); }
.editor.no-preview .ed-preview { display: none; }
.ed-tree { overflow: auto; border-right: 1px solid var(--line); background: var(--bg-2); font: 13px/1.4 var(--mono); padding: 6px 0; }
.ed-tree details > summary { cursor: pointer; padding: 3px 10px; color: var(--muted); list-style: none; white-space: nowrap; }
.ed-tree details > summary::-webkit-details-marker { display: none; }
.ed-tree details > summary::before { content: '▸ '; }
.ed-tree details[open] > summary::before { content: '▾ '; }
.ed-tree .children { padding-left: 12px; }
.ed-tree a { display: block; padding: 3px 10px 3px 22px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-tree a:hover { background: var(--panel); text-decoration: none; }
.ed-tree a.on { background: var(--panel-2); color: var(--yellow); }
.ed-tree a.modified::after, .ed-tree a.added::after { content: ' ●'; color: var(--yellow); }
.ed-tree a.added { color: var(--green); }
.ed-tree a.deleted { color: var(--faint); text-decoration: line-through; }
.ed-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ed-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--bg-2); font: 13px var(--mono); min-height: 44px; flex-wrap: wrap; }
.ed-head .path { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-code { flex: 1; overflow: hidden; min-height: 0; }
.ed-code .cm-editor { height: 100%; }
.ed-empty { display: grid; place-items: center; height: 100%; color: var(--muted); padding: 24px; text-align: center; }
.ed-preview { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ed-preview iframe { flex: 1; width: 100%; border: 0; background: #000; }
.ed-status { font: 12px var(--mono); color: var(--muted); }
@media (max-width: 960px) {
	.editor, .editor.no-preview { grid-template-columns: 1fr; height: auto; }
	.ed-tree { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
	.ed-code { height: 60vh; flex: none; }
	.ed-preview { border-left: 0; height: 60vh; }
}
dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 22px; width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(5, 6, 15, .7); }

/* --- the wall of games (/games) ------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wall-top { width: 100%; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 18px 16px; max-width: 1600px; margin: 0 auto; }
.wall-top h1 { margin: 0; font-size: 22px; }
.sorts { display: flex; flex-wrap: wrap; gap: 6px; }
.sorts a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 14px; }
.sorts a:hover { color: var(--ink); text-decoration: none; border-color: var(--yellow); }
.sorts a.on { background: var(--yellow); border-color: var(--yellow); color: #111; font-weight: 700; }
.wall { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); padding: 0 16px 40px; max-width: 1600px; margin: 0 auto; }
.tile { position: relative; display: block; border-radius: 8px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); color: var(--ink); transition: transform .12s, border-color .12s; }
.tile:hover, .tile:focus-visible { transform: scale(1.03); border-color: var(--yellow); text-decoration: none; z-index: 1; }
.tile .name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 10px; }
.tile .name span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .name small { color: var(--muted); font-size: 12px; white-space: nowrap; display: flex; gap: 6px; }
.stars-mini { color: var(--yellow); font-weight: 700; }

/* --- marks: the stars of a game --------------------------------------------------------------------- */
.rate { display: flex; align-items: center; gap: 8px; }
.rate .stars { display: inline-flex; }
.rate .stars button { background: none; border: 0; padding: 0 1px; font-size: 20px; line-height: 1; color: #4a4f6b; cursor: pointer; }
.rate .stars:hover button { color: var(--yellow); }
.rate .stars button:hover ~ button { color: #4a4f6b; }
.rate .stars button.on { color: var(--yellow); }
.rate .avg { color: var(--ink); font-weight: 700; font-size: 14px; }
.rate .avg small { color: var(--muted); font-weight: 400; }

/* --- sharing a game --------------------------------------------------------------------------------- */
.share { position: relative; display: inline-flex; }
.share > button { display: inline-flex; align-items: center; gap: 6px; }
.share-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; min-width: 190px; display: flex; flex-direction: column;
	background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 12px 30px #0009; }
.share-menu[hidden] { display: none; }
.share-menu a, .share-menu button { padding: 8px 12px; border-radius: 6px; color: var(--ink); font: inherit; font-size: 14px; text-align: left; background: none; border: 0; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: var(--bg-2); text-decoration: none; }

/* --- a game installed as an app: only the game --------------------------------------------------------- */
.install { position: relative; display: inline-flex; }
.install[hidden] { display: none; }
.install > button { display: inline-flex; align-items: center; gap: 6px; }
.install-help { width: 260px; }
.install-help p { margin: 6px 8px; font-size: 14px; line-height: 1.5; }
@media (display-mode: standalone), (display-mode: fullscreen) {
	/* .bar-open: the fold arrow of a game's site (phones) brought the bars back */
	body.full:not(.bar-open) .stripe, body.full:not(.bar-open) header.top, body.full:not(.bar-open) .gamebar { display: none; }
	body.full:not(.bar-open) .frame { height: 100vh; height: 100dvh; }
}

.private-list { list-style: none; margin: 8px 0; padding: 0; max-height: 240px; overflow: auto; font-size: 13px; }
.private-list li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.private-list code { word-break: break-all; }

/* --- the documentation ---------------------------------------------------------------------------------- */
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.docs-nav { position: sticky; top: 16px; font-size: 14px; }
.docs-nav h2 { font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--yellow); margin: 18px 0 6px; }
.docs-nav h2:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--muted); }
.docs-nav li a:hover { color: var(--ink); text-decoration: none; background: var(--panel); }
.docs-nav li a.on { color: var(--ink); background: var(--panel); border-left: 3px solid var(--yellow); }
.doc { max-width: 820px; line-height: 1.7; font-size: 16px; }
.doc h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; margin: 0 0 18px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc { min-width: 0; }
.doc p, .doc li { color: #cfd3ea; overflow-wrap: anywhere; }
.doc code { font: 14px var(--mono); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.doc pre { background: #070914; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
.doc pre code { background: none; border: 0; padding: 0; font-size: 13.5px; color: #e6e9ff; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; display: block; overflow-x: auto; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { color: var(--yellow); font-weight: 700; }
.doc blockquote { margin: 16px 0; padding: 10px 16px; border-left: 3px solid var(--pink); background: var(--panel); border-radius: 0 8px 8px 0; }
.doc-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
	.docs-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px 14px; }
	.docs-nav h2 { width: 100%; margin: 10px 0 2px; }
	.docs-nav ul { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 100%; min-width: 0; }
	.docs-nav li a { white-space: nowrap; }
}

/* --- what the players say: comments, the idea box, issues ------------------------------------------- */
.comments { max-width: 860px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--yellow); }
.tabs a small { color: var(--faint); font-weight: 400; }
.comment-form textarea { min-height: 100px; }
.comments > p.muted { margin-top: 14px; }
.comment-form .who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.comment-form .who img { width: 36px; height: 36px; border-radius: 50%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.comment-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.comment.pending { border-style: dashed; border-color: var(--yellow); }
.comment.resolved { opacity: .7; }
.comment .avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); font: 700 18px var(--mono); }
.comment .avatar:hover { text-decoration: none; }
.comment .avatar img { width: 100%; height: 100%; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; margin-bottom: 4px; }
.comment-body p { margin: 0 0 8px; overflow-wrap: anywhere; }
.comment-body .actions { gap: 6px; }
.comment-list.compact .comment { padding: 10px 12px; }
.comment-list.compact .avatar { width: 32px; height: 32px; font-size: 15px; }

/* --- a developer's page ------------------------------------------------------------------------------- */
.profile-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--yellow); box-shadow: 4px 4px 0 var(--pink); display: grid; place-items: center; background: var(--panel); font: 800 48px var(--mono); }
.profile-head h1 { margin-bottom: 4px; }
dl.stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
dl.stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; }
dl.stats dt { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
dl.stats dd { margin: 0; font: 800 20px var(--mono); }

/* --- the studio: private notes and tasks ---------------------------------------------------------------- */
.todo-list { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; max-height: 320px; overflow: auto; }
.todo-list li { padding: 3px 0; }
.todo-list li.done { color: var(--faint); text-decoration: line-through; }
details.note { margin-top: 8px; }
details.note summary { cursor: pointer; }
details.note pre { max-height: 400px; overflow: auto; font-size: 13px; }

/* --- a game's PHPUnit tests (studio) -------------------------------------------------------------------- */
.test-cases { list-style: none; margin: 0 0 24px; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.test-cases li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 8px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.test-cases li:first-child { border-top: 0; }
.test-cases .mark { font-weight: 800; }
.test-cases li.passed .mark { color: var(--green); }
.test-cases li.failed .mark, .test-cases li.error .mark { color: var(--red); }
.test-cases li.skipped .mark { color: var(--faint); }
.test-cases pre { grid-column: 2; margin: 4px 0 0; font-size: 12.5px; }
.test-output { max-height: 60vh; overflow: auto; font-size: 13px; }
.films { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 0 0 24px; }
.film { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.film.passed { border-color: color-mix(in srgb, var(--green) 50%, var(--line)); }
.film.failed, .film.error { border-color: var(--red); }
.film-pic { display: block; background: #000; }
.film img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; image-rendering: pixelated; }
.film figcaption { padding: 8px 12px 0; font-size: 14px; }
.film figcaption small { display: block; overflow-wrap: anywhere; }
.film .mark { font-weight: 800; }
.film.passed .mark { color: var(--green); }
.film.failed .mark, .film.error .mark { color: var(--red); }
.film-ctrl { display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px; }
.film-ctrl input { flex: 1; min-width: 0; }
.film-ctrl span { font-size: 12px; font-variant-numeric: tabular-nums; }
.film pre { margin: 0 12px 12px; font-size: 12px; max-height: 160px; overflow: auto; }
.shared-play { background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; max-height: 75vh; }
.shared-play iframe { display: block; width: 100%; height: 100%; border: 0; }
.shared-files { columns: 2 260px; margin: 10px 0; }
.share-url { display: flex; gap: 8px; }
.share-url input { flex: 1; min-width: 0; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: 17px; text-decoration: none; filter: grayscale(1); opacity: .75; }
.bell:hover, .bell.on { filter: none; opacity: 1; }
.bell-count { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 700 11px/18px system-ui, sans-serif; text-align: center; }
.notes-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.notes-list > li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.notes-list > li:first-child { border-top: 0; }
.notes-list > li.new { box-shadow: inset 3px 0 0 var(--accent, var(--green)); }
.notes-list .who img, .notes-list .who span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-size: 18px; }
.notes-list .head { font-size: 14px; }
.notes-list .body { white-space: pre-line; overflow-wrap: anywhere; margin: 4px 0; }
.notes-list .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.notes-list .acts form { margin: 0; }
.tabs-inline { display: flex; gap: 8px; margin: 0 0 14px; }
.film-pic { cursor: zoom-in; }
.theater { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
.theater[open] { display: flex; flex-direction: column; }
.theater::backdrop { background: #000; }
.theater-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 15px; }
.theater-head b { flex: 1; }
.theater.passed .mark { color: var(--green); }
.theater.failed .mark, .theater.error .mark { color: var(--red); }
.theater-pic { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.theater-pic img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.theater-ctrl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px 16px; }
.theater-ctrl input[type=range] { flex: 1; min-width: 160px; max-width: 700px; }
.theater-ctrl .count { font-variant-numeric: tabular-nums; min-width: 70px; }
.theater-ctrl select { width: auto; }
.ed-live { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.ed-live input { width: auto; margin: 0; }
.versions { list-style: none; margin: 0 0 18px; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.versions > li { padding: 12px 14px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.versions > li:first-child { border-top: 0; }
.versions > li.live { box-shadow: inset 3px 0 0 var(--green); }
.v-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.v-acts, .version-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.v-acts form, .version-bar form { margin: 0; }
.version-bar { padding: 8px 16px; background: color-mix(in srgb, var(--red) 18%, var(--panel)); border-bottom: 1px solid var(--line); font-size: 14px; }
.version-bar > span { flex: 1; min-width: 240px; }
.version-bar + .frame { height: calc(100vh - var(--frame-top, 160px)); height: calc(100dvh - var(--frame-top, 160px)); }

/* --- a game's statistics (studio/stats) ------------------------------------------------------------- */
.stat-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); margin: 18px 0; }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.stat-tile b { font: 700 30px/1.2 var(--mono); color: var(--ink); }
.stat-chart { margin-top: 18px; }
.bars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line); padding-top: 18px; }
.bars-top { position: absolute; top: 0; left: 0; font-size: 12px; }
.bar { flex: 1; min-width: 0; height: var(--h); background: var(--cyan); border-radius: 4px 4px 0 0; position: relative; outline: none; }
.bar.zero { height: 2px; background: var(--line); }
.bar::before { content: ""; position: absolute; inset: -140px -1px 0; } /* hit area: the whole column */
.bar:hover, .bar:focus-visible { filter: brightness(1.25); }
.bar:hover::after, .bar:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 8px; font: 12px var(--mono); z-index: 2; pointer-events: none; }
.bars-axis { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; }
.spread { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; font-size: 14px; }
.spread-bar { height: 10px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.spread-bar span { display: block; height: 100%; background: var(--yellow); border-radius: 4px; }
details.panel summary { cursor: pointer; }

/* --- the editor's console (what the game's PHP writes) ---------------------------------------------- */
.ed-console { border-top: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; }
.ed-console[open] { height: 42%; }
.ed-console summary { display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer; font: 600 13px var(--mono); color: var(--muted); list-style: none; }
.ed-console summary::-webkit-details-marker { display: none; }
.ed-console summary::before { content: "▸"; transition: transform .15s; }
.ed-console[open] summary::before { transform: rotate(90deg); }
.ed-console summary .btn { margin-left: auto; }
.ed-console:not([open]) summary .btn { display: none; }
.ed-console-count { background: var(--panel-2); color: var(--ink); border-radius: 99px; padding: 0 7px; font-size: 12px; }
.ed-console-count.err { background: #45121f; color: var(--red); }
.ed-console-log { flex: 1; overflow: auto; padding: 4px 12px 10px; min-height: 0; }
.ed-console-log pre { margin: 0; padding: 0; background: none; border: 0; font: 12px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.ed-console-log pre.err { color: var(--red); }
.ed-console-log .sep { font: 11px var(--mono); color: var(--faint); border-top: 1px dashed var(--line); margin: 6px 0 2px; padding-top: 2px; }
.ed-console-log iframe { width: 100%; height: 60vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin: 4px 0; }
/* studio: a game's private notes and todo list (studio/notes.html.twig) */
.notes-page > .panel + .panel { margin-top: 0; }
.note-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.note-tabs a { padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--ink); }
.note-tabs a.active { border-color: var(--cyan); background: var(--panel-2); }
.note-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.note-body { max-width: none; font-size: 15px; }
.note-body h1 { font-size: 24px; } .note-body h2 { font-size: 19px; margin-top: 24px; }
textarea.mono { font: 13px/1.5 var(--mono); }
.todo-list.editable { max-height: 60vh; }
.todo-list.editable form { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.todo-list.editable .todo-text { flex: 1; overflow-wrap: anywhere; }
.todo-check, .todo-del { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 2px; font-size: 16px; line-height: 1.3; }
.todo-del { color: var(--faint); visibility: hidden; }
.todo-list.editable li:hover .todo-del, .todo-del:focus { visibility: visible; }
@media (hover: none) { .todo-del { visibility: visible; } }
.todo-add { margin-top: 14px; } .todo-add textarea { min-height: 70px; margin-bottom: 8px; }

/* installers (studio): jumphp2installer's editor */
.installer-editor { padding-top: 0; }
.installer-app { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 0; height: calc(100vh - 140px); height: calc(100dvh - 140px); min-height: 560px; border-top: 1px solid var(--line); }
.installer-script { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.installer-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.installer-head h1 { font-size: 18px; margin: 0; }
.installer-head .grow { flex: 1; }
.installer-code { flex: 1; min-height: 0; overflow: hidden; }
.installer-code .cm-editor { height: 100%; font-size: 13px; }
.installer-problems { max-height: 140px; overflow: auto; border-top: 1px solid var(--line); padding: 6px 16px; font-size: 13px; }
.installer-problems .problem { color: var(--red); cursor: pointer; }
.installer-problems .ok { color: var(--green); }
.installer-side { overflow: auto; padding: 12px 16px 30px; min-width: 0; }
.installer-side h2 { font-size: 16px; margin: 16px 0 8px; }
.installer-frame { width: 100%; aspect-ratio: 660 / 470; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; margin-top: 8px; }
.installer-frame iframe { width: 660px; height: 470px; border: 0; transform-origin: 0 0; }
.installer-drop { border: 2px dashed var(--line); border-radius: 8px; padding: 12px; text-align: center; color: var(--muted); }
.installer-drop.over { border-color: var(--yellow); color: var(--yellow); }
.installer-drop .link { color: var(--cyan); cursor: pointer; text-decoration: underline; }
.installer-files { list-style: none; padding: 0; margin: 8px 0; }
.installer-files li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 2px 0; }
.installer-files code { cursor: copy; }
.installer-links { padding-left: 18px; word-break: break-all; font-size: 14px; }
.installer-warn { color: var(--red); }
.installer-downloads { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; align-items: stretch; }
.installer-downloads .btn { justify-content: center; }
@media (max-width: 900px) {
	.installer-app { grid-template-columns: 1fr; height: auto; }
	.installer-script { height: 70vh; border-right: 0; }
}

/* docs: a row of screenshots (the installer's wizard) */
.doc .shots { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 18px 0; }
.doc .shots figure { margin: 0; }
.doc .shots img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.doc .shots figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; text-align: center; }
.doc .callout { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
/* home: the installer's promo */
.promo { display: grid; gap: 22px; grid-template-columns: minmax(0, 330px) 1fr; align-items: center; }
.promo img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.promo h3 { margin: 0 0 8px; }
.promo .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (max-width: 700px) { .promo { grid-template-columns: 1fr; } }
/* the JumPHP IDE's page (/jumphp-ide) */
.ide-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }
.ide-version { font-size: 14px; }
.ide-shot { width: 100%; height: auto; margin-top: 26px; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.ide-features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ide-features figure { margin: 0; padding: 0; overflow: hidden; }
.ide-features img { width: 100%; height: auto; border-bottom: 1px solid var(--line); }
.ide-features figcaption { padding: 16px 18px 6px; }
.ide-features h3 { margin-bottom: 6px; }
a.panel { color: inherit; display: block; }
a.panel:hover { text-decoration: none; border-color: var(--muted); }
/* home: the IDE */
.ide-forms { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); margin: 18px 0; }
.ide-forms img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(0, 0, 0, .4); }
.ide-forms-lead { max-width: 820px; font-size: 17px; }
.promo.ide-promo { grid-template-columns: minmax(0, 520px) 1fr; }
@media (max-width: 700px) { .promo.ide-promo { grid-template-columns: 1fr; } }

/* --- an installer's statistics (studio) --- */
.istats { display: flex; flex-direction: column; gap: 18px; }
.istats-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.istats-head h1 { margin: 0; }
.istats-head .grow { flex: 1; }
.istats-periods { display: flex; gap: 4px; flex-wrap: wrap; }
.istats-periods a { padding: 4px 10px; border-radius: var(--radius); text-decoration: none; color: var(--muted); }
.istats-periods a.on { background: var(--panel-2); color: var(--ink); }
.istats-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.istats-tiles > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.istats-tiles b { font-size: 28px; }
.istats-tiles span { color: var(--muted); }
.istats-tiles small { color: var(--faint); }
.istats-tiles .ok b { color: var(--green); }
.istats-tiles .bad b { color: var(--red); }
.istats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.istats-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.istats-box.wide { grid-column: 1 / -1; }
.istats-box h2 { font-size: 17px; margin: 0 0 8px; }
.istats-box h3 { font-size: 15px; margin: 14px 0 6px; }
.istats-box .scroll { overflow-x: auto; }
.istats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.istats-table th { text-align: left; color: var(--faint); font-weight: 600; padding: 4px 8px; }
.istats-table td { padding: 6px 8px; border-top: 1px solid var(--line); }
.istats-table .num { text-align: right; white-space: nowrap; }
.istats-table td.meter { width: 45%; }
.istats-table td.meter i { display: block; height: 12px; min-width: 2px; border-radius: 3px; background: var(--cyan); }
.istats-table td.err { font-family: var(--mono); font-size: 13px; word-break: break-word; }
.istats-days { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.istats-days > div { flex: 1; display: flex; align-items: flex-end; gap: 1px; height: 100%; min-width: 3px; }
.istats-days i, .istats-legend i { flex: 1; min-height: 1px; border-radius: 2px 2px 0 0; }
.istats-legend i { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 10px; vertical-align: middle; }
.istats i.dl { background: var(--faint); } .istats i.st { background: var(--cyan); } .istats i.in { background: var(--green); }
@media (max-width: 700px) { .istats-grid { grid-template-columns: 1fr; } }
table.files td.totals { color: var(--muted); white-space: normal; }
table.files td.totals b { color: var(--ink); font-weight: 700; }
table.files td.totals span { white-space: nowrap; }
@media (max-width: 700px) { .wide-only { display: none; } table.files td { padding: 8px 8px; } }

/* the IDE's plugins (/ide-plugins) */
.plugin-search input { width: 100%; max-width: 420px; margin: 8px 0 20px; }
.plugin-card { display: flex; flex-direction: column; gap: 6px; color: inherit; }
.plugin-card:hover { text-decoration: none; border-color: var(--muted); }
.plugin-card .plugin-desc { color: var(--text, inherit); }
.plugin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.plugin-versions { margin: 0; padding-left: 18px; }
.plugin-stats h3 { font-size: 15px; margin: 14px 0 6px; }
.plugin-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.plugin-chart .day { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; min-width: 4px; }
.plugin-chart .day span, .plugin-legend i { display: block; }
.plugin-chart .views, .plugin-legend .views { background: var(--muted); }
.plugin-chart .install, .plugin-legend .install { background: var(--yellow); }
.plugin-chart .update, .plugin-legend .update { background: var(--pink); }
.plugin-chart .web, .plugin-legend .web { background: #5fb8ff; }
.plugin-legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.plugin-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.plugin-stats-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.plugin-stats-cols ul { list-style: none; padding: 0; margin: 0; }
.plugin-stats-cols b { margin-left: 6px; }

/* several accounts in one browser (assets/app.js) */
.accounts { position: relative; }
.accounts summary { cursor: pointer; list-style: none; padding: 4px 8px; border: 2px solid var(--line); border-radius: 6px; color: var(--muted); font-weight: 700; }
.accounts summary::-webkit-details-marker { display: none; }
.accounts[open] summary, .accounts summary:hover { color: var(--ink); }
.accounts-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; margin: 0; padding: 6px; list-style: none; min-width: 200px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.accounts-list li { display: flex; align-items: center; gap: 4px; }
.accounts-list li.menu-sep { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.accounts-list li form { flex: 1; display: flex; margin: 0; }
.accounts-list a, .accounts-list .account { flex: 1; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 5px; color: var(--ink); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.accounts-list a:hover, .accounts-list .account:hover { background: var(--line); }
.accounts-list .account.on { color: var(--yellow); cursor: default; }
.accounts-list .account img { border-radius: 50%; }
.accounts-list .account-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 8px; }

.adm-spark{display:inline-block;vertical-align:middle;margin-left:.4rem;opacity:.9}
.adm-spark svg{display:block;fill:var(--accent,#7dd3fc)}

.decision { display: flex; gap: 14px; align-items: center; margin: 0 0 12px; padding: 14px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--panel-2); border-left: 4px solid var(--green); }
.decision.ko { border-left-color: #e5484d; }
.decision.wait { border-left-color: #f5a524; align-items: flex-start; }
.decision .txt { flex: 1; min-width: 0; }
.decision form.decide { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.decision form.decide input { flex: 1 1 14rem; min-width: 0; padding: 6px 10px; }
.decision .ico { font-size: 26px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--panel-2); flex: none; }
.decision .what { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 17px; }
.decision .meta { margin-top: 2px; }
.decision .why { margin: 6px 0 0; color: var(--muted); }

/* a game's own site in a frame: the text under it (templates/game/show.html.twig); phones: the frame keeps the whole screen, the text scrolls below */
.game-about h2 { margin-top: 0; }
.game-about .site-text { margin: 16px 0 24px; max-width: 72ch; }
/* a game's place in the site (templates/game/_related.html.twig) */
.crumbs-nav { font-size: 14px; color: var(--muted); margin: 12px 0; }
.crumbs-nav a { color: var(--muted); }
.crumbs-nav a:hover { color: var(--ink); }
.game-about .site-text h2 { margin: 28px 0 8px; font-size: 22px; }
.game-about .site-text h3, .game-about .site-text h4 { margin: 20px 0 6px; font-size: 18px; }
.game-about .site-text img { display: block; max-width: 100%; height: auto; margin: 12px 0; border-radius: 8px; image-rendering: pixelated; }
.game-about .site-text figure { margin: 12px 0; }
.game-about .site-text figcaption { color: var(--muted); font-size: 14px; }
.game-about .site-text table { border-collapse: collapse; display: block; overflow-x: auto; }
.game-about .site-text th, .game-about .site-text td { border: 1px solid var(--line, #8884); padding: 4px 8px; text-align: left; }
.game-about .site-text pre { overflow-x: auto; }

/* Changelog (/changelog) and its link in the header */
.nav .nav-changelog { background: linear-gradient(90deg, rgba(255, 196, 0, .22), rgba(255, 90, 160, .22)); border-radius: 999px; padding-inline: 10px; font-weight: 600; }
.changelog-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.changelog-day h2 { text-transform: capitalize; font-size: 1.15rem; }
.changelog-day ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.changelog-day li { line-height: 1.5; }
.cl-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; white-space: nowrap; }
.cl-engine { background: rgba(76, 154, 255, .2); color: #8cc0ff; }
.cl-ide { background: rgba(170, 120, 255, .2); color: #c9a8ff; }
.cl-site { background: rgba(60, 200, 120, .2); color: #7ee2a8; }

/* Community (/communaute) and the players of a game (its bar) */
.bar-players { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: rgba(60, 200, 120, .16); white-space: nowrap; }
.community-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
@media (max-width: 800px) { .community-grid { grid-template-columns: 1fr; } }
.community-total { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.community-total b { font-size: 48px; line-height: 1; color: var(--yellow, #ffd34d); }
.community-games { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.community-games li { display: flex; justify-content: space-between; gap: 8px; }
.community-n { white-space: nowrap; opacity: .8; }
.chat-log { height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 4px 8px; }
.chat-older { align-self: center; }
.chat-msg { position: relative; padding-right: 22px; }
.chat-msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-right: 8px; }
.chat-who img { border-radius: 50%; }
.chat-msg time { font-size: 12px; opacity: .6; }
.chat-del { position: absolute; top: 0; right: 0; background: none; border: 0; color: inherit; opacity: .4; cursor: pointer; font-size: 16px; }
.chat-del:hover { opacity: 1; color: #ff6b6b; }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }
.chat-form input { flex: 1; min-width: 0; }

/* forum and guests (Community) */
.community-tabs { display: flex; gap: 14px; margin-bottom: 12px; }
.chat-form { flex-direction: column; align-items: stretch; }
.chat-row { display: flex; gap: 8px; }
.chat-row input { flex: 1; min-width: 0; }
.guest-fields { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 8px; }
.guest-fields .captcha { display: flex; align-items: center; gap: 6px; }
.guest-fields .captcha img { border-radius: 6px; background: #f5f6fa; }
.guest-fields .captcha input { width: 110px; text-transform: uppercase; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.forum-title { margin-top: 28px; }
.forum-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.forum-cat { display: flex; gap: 12px; align-items: flex-start; color: inherit; text-decoration: none; }
.forum-cat:hover { outline: 2px solid rgba(255, 211, 77, .4); }
.forum-cat-icon { font-size: 28px; line-height: 1; }
.forum-cat-body { display: flex; flex-direction: column; gap: 3px; }
.forum-topics { display: flex; flex-direction: column; padding: 0; }
.forum-topic-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-bottom: 1px solid rgba(127, 127, 127, .15); color: inherit; text-decoration: none; }
.forum-topic-row:hover { background: rgba(127, 127, 127, .08); }
.forum-topic-title { font-weight: 600; }
.is-hidden { opacity: .55; }
.forum-post header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.forum-text { line-height: 1.6; overflow-wrap: anywhere; }
.forum-mod { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.forum-form { display: flex; flex-direction: column; gap: 10px; }
.forum-form label { display: flex; flex-direction: column; gap: 4px; }
.forum-form textarea, .forum-form input[type=text] { width: 100%; box-sizing: border-box; }
.forum-error { color: #ff6b6b; font-weight: 600; }
.crumbs { font-size: 14px; opacity: .8; }

/* the ☰ Menu: every page by section, full screen (templates/base.html.twig, assets/app.js) */
.mega-open { order: -1; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.mega-open:hover { border-color: var(--muted); }
.mega { position: fixed; inset: 0; z-index: 100; background: rgba(5, 7, 18, .92); backdrop-filter: blur(6px); overflow-y: auto; overscroll-behavior: contain; }
/* a little smaller than the screen (80% wide, 90% high), centred; phones keep the whole screen */
@media (min-width: 701px) { .mega { inset: 5vh 10vw; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 80px rgba(0, 0, 0, .6), 0 0 0 100vmax rgba(5, 7, 18, .55); } }
.mega[hidden] { display: none; }
.mega-inner { padding-top: 22px; padding-bottom: 40px; }
.mega-head { display: flex; gap: 10px; margin-bottom: 22px; position: sticky; top: 0; padding: 8px 0; background: rgba(5, 7, 18, .96); z-index: 1; }
.mega-head input { flex: 1 1 auto; min-width: 0; width: 100%; font-size: 18px; padding: 12px 14px; }
.mega-head .btn { flex: none; }   /* the ✕ always on screen: the field shrinks for it on a phone */
.mega-inner { max-width: 100%; box-sizing: border-box; }
.mega-grid { min-width: 0; }
.mega-grid a { overflow-wrap: anywhere; }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 28px; }
.mega-grid h3 { margin: 0 0 8px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mega-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mega-grid a { display: block; padding: 7px 10px; border-radius: var(--radius); color: var(--ink); font-weight: 600; text-decoration: none; }
.mega-grid a:hover, .mega-grid a:focus-visible { background: var(--panel); }
.mega-grid section[hidden], .mega-grid li[hidden] { display: none; }
body.mega-on { overflow: hidden; }
@media (max-width: 1180px) { .nav a:not(.nav-changelog) { padding-inline: 7px; } }
@media (max-width: 720px) {
	.mega-open span { display: none; }
	.mega-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 420px) { .mega-grid { grid-template-columns: 1fr; } }
/* (fixes of the Community / menu layout) */
.community-grid > .panel, .forum-categories > .panel { margin: 0; }
.forum-categories .forum-cat { display: flex; flex-direction: row; align-items: flex-start; }
.guest-fields .captcha input { width: 210px; }
.guest-fields .captcha input::placeholder { text-transform: none; }
@media (max-width: 1440px) { .nav a.nav-minor { display: none; } }
@media (max-width: 720px) { .nav { display: none; } }
.forum-form .guest-fields label.captcha { flex-direction: row; flex-wrap: wrap; }
.forum-form .guest-fields > label:first-child { flex: 1 1 220px; }
.chat-reply { position: absolute; top: 0; right: 22px; background: none; border: 0; color: inherit; opacity: .45; cursor: pointer; font-size: 15px; }
.chat-reply:hover { opacity: 1; }
.chat-msg { padding-right: 46px; }
.forum-reply { margin-top: 8px; }
.signup .signup-way { margin: 14px 0; }
.signup .signup-way h2 { margin-top: 0; font-size: 18px; }
.signup-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
/* the header's quick links (templates/base.html.twig): who is online (every width), chat / forum / bell on phones, where the nav is folded */
.quick { display: flex; align-items: center; gap: 4px; }
.quick .online { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 700 13px var(--mono); white-space: nowrap; text-decoration: none; }
.quick .online i { color: var(--green); font-style: normal; font-size: 11px; animation: online-pulse 2.4s infinite; }
.quick .online:hover { border-color: var(--green); text-decoration: none; }
@keyframes online-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .quick .online i { animation: none; } }
.quick .quick-i { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; font-size: 19px; text-decoration: none; }
.quick .quick-i:hover { background: var(--panel); text-decoration: none; }
.quick .quick-i.bell { filter: grayscale(1); opacity: .75; }
.quick .quick-i.bell.on { filter: none; opacity: 1; }
@media (min-width: 721px) { .quick .online { padding: 3px 9px; } .quick .online span { display: none; } }      /* the nav has the Community link: the number alone (its title says what it is) */
@media (min-width: 721px) and (max-width: 1180px) { .quick { display: none; } }      /* no room beside the nav there: the Community link stays */
@media (max-width: 720px) {
	.quick { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 2px; }
	.quick .online { min-height: 40px; margin-right: auto; }
	.quick .quick-i { display: inline-flex; }
	.me .bell-notif { display: none; }
}

/* rights an app lost when its code changed: under the header on every page until handled */
.rights-alert { background: #5a3a00; color: #ffe6b3; border-bottom: 1px solid #a86d00; font-size: 14px; }
.rights-alert-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.rights-alert-row span { flex: 1 1 260px; }
.rights-alert-row form { margin: 0; }
