/* Shared Rogues' Gallery theme. Vite bundles this for Draw, Quiz and the Lab;
   the competition and documentation serve this same file directly. */
:root {
  color-scheme: dark;
  --bg:#101f48; --fg:#f5f7ff; --muted:#b5c6e9; --line:#3b5285;
  --panel:#1b3061; --accent:#ffcf5c; --ok:#79e2b4; --no:#ff9baf;
  --paper:var(--bg); --surface:var(--panel); --raised:#263f77;
  --ink:var(--fg); --soft:var(--muted); --faint:#a4b9e0; --rule:var(--line);
  --rust:var(--accent); --green:var(--ok); --amber:#ffdc87; --violet:#bcafff;
  --shadow:0 5px 0 #091633; --lift:0 16px 60px #050e2bcc;
}
* { box-sizing:border-box; }
html { min-height:100%; background:var(--bg); scroll-behavior:smooth; }
body, body.rg-app {
  margin:0; padding:0; display:block; min-height:100vh;
  background-color:var(--bg); color:var(--fg);
  background-image:radial-gradient(ellipse at 50% 0%,#29478080,transparent 70%),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='240' viewBox='0 0 280 240'%3E%3Cg fill='none' stroke='%236c8bcb' stroke-opacity='.1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m24 40 4-19 13 12 17-7 1 23q-15 19-35-9zM34 40v1m14-1v1M157 42l14-10 13 15-15 9zM215 156q18-24 39 0-19 22-39 0l-10-13v26zM77 159v34m-8-17 8 8 12-12M77 158c-19 0-18-17-5-17-6-18 18-19 15-3 17-5 20 17 3 20-2 14-19 13-13 0zM139 211l8-8m-8 0 8 8M234 61l8-8m-8 0 8 8M17 206l5-9 6 10-11-1z'/%3E%3C/g%3E%3C/svg%3E");
  font:600 16px/1.6 "Nunito",ui-rounded,"SF Pro Rounded",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
}
[hidden] { display:none!important; }
a { color:var(--accent); text-underline-offset:3px; }
button,input,select,textarea { font-family:inherit; }
button,a,input,select,textarea,summary { -webkit-tap-highlight-color:transparent; }
:where(button,a,input,select,textarea,summary):focus-visible { outline:3px solid #90e8ff; outline-offset:4px; }
button, .btn, .back {
  border:2px solid var(--line); border-radius:13px; padding:11px 18px;
  background:var(--raised); color:var(--fg); font-weight:800;
  box-shadow:0 4px 0 #0a1738; transition:transform .15s,background .15s,border-color .15s;
  min-height:44px;
}
button:not(:disabled):hover,.btn:not(:disabled):hover,.back:hover { background:#334f8a; border-color:#6e8bc4; transform:translateY(-2px); }
button:not(:disabled):active,.btn:not(:disabled):active { transform:translateY(2px); box-shadow:none; }
button.primary,.btn-primary { background:var(--accent); border-color:#ffdc87; color:#172246; box-shadow:0 5px 0 #aa7925; }
button.primary:not(:disabled):hover,.btn-primary:not(:disabled):hover { background:#ffdc87; border-color:#ffe8af; }
button:disabled,.btn[disabled] { opacity:.5; cursor:not-allowed; box-shadow:none; }
button.link,.signout { box-shadow:none; color:var(--muted); }
h1,h2,h3,.brand,.res b,.empty b,.mhead h3 { font-family:"Fredoka",ui-rounded,system-ui,sans-serif; }
h1 { font-size:clamp(34px,4.5vw,58px); font-weight:600; line-height:1.08; letter-spacing:-.025em; margin:10px 0 20px; }
h1 em { font-style:normal; color:var(--accent); }
h2 { color:var(--fg); }
p { line-height:1.65; }
.muted { color:var(--muted); }
.eyebrow { color:#92dcf0; font-size:11px; font-weight:900; letter-spacing:.15em; display:block; margin-bottom:10px; }
.rg-header { background:#0c193ce8; border:0; border-bottom:2px solid #314675; position:relative; z-index:21; }
.rg-nav { max-width:1180px; margin:auto; padding:19px 28px; display:flex; align-items:center; justify-content:space-between; gap:26px; }
.rg-logo { display:flex; align-items:center; gap:11px; color:#fff; text-decoration:none; font:600 27px/.95 "Fredoka",ui-rounded,system-ui,sans-serif; flex-shrink:0; }
.rg-logo-accent { color:var(--accent); }
.rg-logo small { display:block; font:900 8px/1.6 "Nunito",sans-serif; letter-spacing:.14em; color:var(--muted); margin-top:6px; }
.rg-mark { display:grid; place-items:center; width:44px; height:44px; border:2px solid #95e4ee; border-radius:14px 12px 17px 11px; color:#152448; background:#80d6e7; font-size:32px; transform:rotate(-8deg); box-shadow:3px 4px 0 #07142d; }
.rg-nav nav { display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.rg-nav nav a { display:block; padding:9px 14px; border-radius:11px; color:var(--muted); font-size:14px; font-weight:800; text-decoration:none; white-space:nowrap; }
.rg-nav nav a:hover { color:#fff; background:#263d70; }
.rg-nav nav a[aria-current] { background:#2b4278; color:#fff; box-shadow:inset 0 -3px #80d6e7; }
.rg-footer { max-width:1120px; margin:44px auto 0; padding:25px 24px 32px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.rg-footer b { color:#e1eaff; }
.rg-footer a { color:inherit; }
.rg-app>.wrap { max-width:1080px; margin:0 auto; padding:64px 28px 24px; }
.rg-app #intro.on { display:grid; grid-template-columns:1.1fr 1fr; gap:56px; align-items:center; }
.welcome { min-width:0; }
.hero-copy { font-size:18px; color:#cfdbf3; max-width:42ch; }
.card,.panel,.res,.empty,.modal,.sig,pre { border:2px solid var(--line); border-radius:20px; background:var(--panel); box-shadow:var(--shadow); }
.card.how-card { padding:30px; margin:0; }
.how-card h2 { font-size:29px; text-transform:none; letter-spacing:0; margin:0 0 23px; color:var(--fg); font-weight:600; }
.how-steps { list-style:none; counter-reset:steps; padding:0; margin:0; }
.how-steps li { position:relative; padding:0 0 23px 47px; counter-increment:steps; }
.how-steps li::before { content:counter(steps); position:absolute; left:0; top:2px; display:grid; place-items:center; width:32px; height:32px; border-radius:11px; background:#304d87; color:#a8e9f6; font:600 20px "Fredoka",sans-serif; transform:rotate(-5deg); }
.how-steps b,.how-steps span { display:block; }
.how-steps b { font-size:16px; margin-bottom:4px; }
.how-steps span { color:var(--muted); font-size:14px; line-height:1.55; }
details { border-top:1px solid var(--line); padding-top:16px; margin-top:8px; color:var(--muted); font-size:13px; }
summary { color:#d5e2ff; cursor:pointer; font-weight:800; }
details p { margin-top:12px; }
.session-facts { display:flex; flex-wrap:wrap; gap:6px 14px; font-size:12px; font-weight:800; color:#c3d3ef; margin:20px 0; }
.session-facts span+span::before { content:'•'; color:#80d6e7; margin-right:12px; }
button.big { font-size:19px; padding:14px 28px; }
.small-note { margin-top:16px; font-size:12px; }
.doodle-lineup { display:flex; gap:14px; padding:15px 5px 12px; margin:12px 0; }
.doodle-sticker { position:relative; display:block; width:108px; height:112px; padding:9px; background:#fffdf6; border:3px solid #0a1738; border-radius:16px; box-shadow:4px 6px 0 #091633; transform:rotate(-7deg); }
.doodle-sticker:nth-child(2) { transform:rotate(5deg); margin-top:7px; }
.doodle-sticker:nth-child(3) { transform:rotate(-3deg); }
.doodle-sticker svg { width:100%; height:100%; fill:none; stroke:#172446; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.doodle-sticker b { position:absolute; right:-9px; top:-12px; background:#ffcf5c; color:#172446; border:2px solid #172446; border-radius:50%; width:30px; height:30px; text-align:center; font:600 24px "Fredoka",sans-serif; }
.mode-options { display:grid; gap:17px; margin:0 0 24px; }
.mode-choice { text-align:left; padding:19px 20px; width:100%; }
.mode-choice strong { display:block; font:600 22px/1.25 "Fredoka",sans-serif; margin-bottom:7px; }
.mode-choice strong span { float:right; }
.mode-choice>span { display:block; font-size:13px; font-weight:700; line-height:1.5; }
.rg-contribute #draw,.rg-contribute #finish { max-width:570px; margin:auto; }
.rg-quiz #play,.rg-quiz #done { max-width:780px; margin:auto; }
.head { border:1px solid var(--line); border-radius:12px; padding:10px 15px; background:var(--panel); }
.count,.score { color:#c4d6f4; font-weight:800; }
.prompt { font-family:"Fredoka",sans-serif; font-size:28px; margin:19px 0 14px; font-weight:500; }
canvas#pad,.single img { border:3px solid #607baa; border-radius:20px; box-shadow:0 7px 0 #091633; }
.track { height:9px; border-radius:8px; }
.fill { background:var(--accent); }
.tools { margin-top:20px; flex-wrap:wrap; }
.rg-quiz .grid { gap:18px; }
.rg-quiz .grid button { border:3px solid #607baa; border-radius:16px; box-shadow:0 5px 0 #091633; }
.rg-quiz .grid button:hover { border-color:var(--accent); }
.rg-quiz .grid button.pick { border-color:var(--accent); }
.verdict { font-size:19px; }
.lab-main { max-width:1180px; padding:40px 28px; margin:auto; }
.lab-main .panel { padding:16px 20px; }
.lab-main h1 { font-size:40px; }
.lab-main .cols { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.lab-main .bar { padding:0; }
.lab-main textarea { border-radius:10px; padding:12px; }
/* The arena keeps dense scores and readable source code, inside the same game shell. */
.competition-toolbar,.docs-toolbar { position:relative; background:#172b56; border-bottom:2px solid var(--line); }
.competition-toolbar .bar,.docs-toolbar .bar { padding:15px 24px; gap:14px; }
.brand { font-size:21px; font-weight:600; }
.brand small { font-family:"Nunito",sans-serif; color:var(--muted); font-size:10px; margin-top:5px; }
.mtab { border:0; box-shadow:none; font-weight:800; border-radius:11px; padding:10px 14px; color:var(--muted); }
.mtab[aria-selected="true"] { background:#314b83; color:#fff; }
body>.wrap { padding-top:34px; }
.arena-hero { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:28px; }
.arena-hero h1 { font-size:clamp(34px,4vw,49px); margin:6px 0 12px; }
.arena-hero p { color:var(--muted); margin:0; font-size:17px; }
.arena-badge { display:grid; place-items:center; text-align:center; flex-shrink:0; width:122px; height:130px; color:var(--accent); background:#243c71; border:2px solid #49669f; border-radius:30px 24px 33px 22px; transform:rotate(7deg); font-size:43px; line-height:1; padding:14px; box-shadow:5px 6px 0 #091633; }
.arena-badge small { font-size:10px; font-weight:900; line-height:1.4; letter-spacing:.09em; }
.intro { background:var(--panel); border:2px solid var(--line); padding:22px; border-radius:18px; gap:22px; }
.bar-note { background:#243e72; border-radius:12px; border-left:4px solid var(--accent); }
body>.wrap>h2 { color:#c7d8f8; font-family:"Nunito",sans-serif; font-size:12px; font-weight:900; margin-top:32px; }
#view-leaderboard table { background:#192e5a; border-collapse:separate; border-spacing:0; border:1px solid var(--line); border-radius:16px; overflow:hidden; }
#view-leaderboard th,#view-leaderboard td { padding:14px 12px; }
#view-leaderboard th { background:#233d6f; }
#view-leaderboard tbody tr:last-child td { border-bottom:0; }
#view-leaderboard tbody tr:hover { background:#223a6b; }
.meter .fill { display:block; }
.rank.top { font-size:19px; }
.res { padding:23px; border-radius:18px; }
.res:hover { border-color:#83d9ed; transform:translateY(-3px); }
.res b { font-size:21px; margin:13px 0 8px; }
.res p { font-size:14px; }
.res-grid { gap:18px; }
.kind,.tag,.role { border-radius:6px; }
.empty { padding:35px 24px; }
.modal { border-radius:22px; }
.modal header { background:none; }
.scrim { background:#050e2bcc; backdrop-filter:blur(5px); }
.mhead h3 { font-size:26px; }
input:not([type=checkbox]):not([type=radio]),select,textarea { background:#10234b; color:var(--fg); border-color:#5470a3; border-radius:10px; }
input::placeholder,textarea::placeholder { color:#9eb3d7; opacity:1; }
.code-body pre { border-radius:13px; }
.rg-docs .shell { padding-top:24px; gap:30px; }
.rg-docs .docs-contents { position:sticky; top:20px; margin:0; padding:0; border:0; }
.rg-docs .docs-contents>summary { display:none; }
.rg-docs nav.toc { top:20px; background:#172c57; border:1px solid var(--line); border-radius:18px; padding:20px 12px; margin-bottom:30px; }
.rg-docs nav.toc h4 { padding-left:10px; color:#90dcec; }
.rg-docs nav.toc a { padding:8px 10px; border-radius:8px; }
.rg-docs main { background:#172c57; padding:30px; border:1px solid var(--line); border-radius:20px; }
.rg-docs h1 { font-size:40px; }
.rg-docs h2 { font-size:27px; padding-top:27px; }
.rg-docs pre,.rg-docs .sig { background:#10234b; box-shadow:none; border-radius:12px; }
.rg-docs .note { border-radius:12px; background:#263e70; }
.rg-docs .sub { color:#c1d1ef; }
@media(max-width:900px) {
  .rg-nav { flex-wrap:wrap; gap:18px; padding:18px 22px; }
  .rg-nav nav { gap:3px; }
  .rg-app #intro.on { gap:30px; }
  .rg-app>.wrap { padding-top:40px; }
  .competition-toolbar .bar { flex-wrap:wrap; }
  .rg-docs .shell { grid-template-columns:1fr; }
  .rg-docs .docs-contents { position:static; margin-bottom:22px; }
  .rg-docs .docs-contents>summary { display:block; padding:16px 20px; background:#233d6f; border:1px solid var(--line); border-radius:14px; }
  .rg-docs .docs-contents>summary span { float:right; }
  .rg-docs nav.toc { position:static; max-height:none; margin:12px 0 0; }
  .lab-main .cols { grid-template-columns:1fr; }
}
@media(max-width:640px) {
  .rg-nav { padding:17px 16px 13px; gap:16px; }
  .rg-logo { font-size:26px; }
  .rg-nav nav { width:100%; justify-content:space-between; gap:2px; }
  .rg-nav nav a { font-size:12px; padding:8px 9px; }
  .rg-app>.wrap { padding:30px 18px 16px; }
  .rg-app #intro.on { grid-template-columns:1fr; gap:28px; }
  .welcome h1 { font-size:44px; }
  .hero-copy { font-size:17px; }
  .card.how-card { padding:24px; }
  .doodle-sticker { width:91px; height:96px; }
  .doodle-lineup { gap:12px; }
  .rg-footer { padding:24px 18px; margin-top:30px; }
  .tools { gap:7px; }
  .tools button { padding:10px 12px; }
  .competition-toolbar .bar { padding:16px; gap:12px; }
  .competition-toolbar .brand { width:100%; }
  .tabs-main { margin-right:0; flex:1; }
  .mtab { padding:8px 10px; font-size:13px; }
  .competition-toolbar .btn { font-size:12px; padding:9px 11px; }
  body>.wrap { padding:26px 16px 40px; }
  .arena-badge { display:none; }
  .intro { padding:18px; }
  .bar-note { min-width:0; }
  #view-leaderboard th,#view-leaderboard td { padding:11px 8px; font-size:12px; }
  #view-leaderboard .model small { font-size:10px; overflow-wrap:anywhere; }
  #view-leaderboard .handle { font-size:11px; overflow-wrap:anywhere; }
  .meter { flex-wrap:wrap; gap:3px; }
  .meter .track { width:52px; }
  .res-grid { grid-template-columns:minmax(0,1fr); }
  .gotchas { grid-template-columns:minmax(0,1fr); }
  .rg-docs .shell { padding:18px 14px 0; }
  .rg-docs main { padding:22px 18px; }
  .rg-docs h1 { font-size:33px; }
  .rg-docs pre { padding:13px; }
  .rg-docs table { display:block; overflow-x:auto; }
  .docs-toolbar .brand { font-size:18px; }
  .docs-toolbar .back { font-size:12px; padding:8px 10px; }
  .lab-main { padding:30px 18px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation:none!important; transition:none!important; }
}
