
:root{--ink:#141414;--paper:#faf8f4;--accent:#2f7d4f;--rule:#d8d2c6;--muted:#5f5b54;--soft:#f0ebe1;--box:#fff;
  --serif:Georgia,'Times New Roman',serif;--sans:system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  --body:#ebe6db;--bodyedge:#cbc3b2;--bezel:#3f424a;--pad:#2b2d33;--abtn:#a8324a}
@media (prefers-color-scheme:dark){:root{--ink:#e8e4dc;--paper:#171614;--accent:#6fbe8f;--rule:#3a362e;--muted:#aaa49a;--soft:#24221e;
  --body:#cbc4b5;--bodyedge:#a1998a}}
*{margin:0;box-sizing:border-box}
body{font-family:var(--serif);background:var(--paper);color:var(--ink);line-height:1.6}
.wrap{max-width:1240px;margin:0 auto;padding:0 24px}
a{color:var(--accent)}
a:focus-visible,button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.skip{position:absolute;left:-999px;top:0;background:#12181c;color:#fff;padding:8px 12px;z-index:1000}.skip:focus{left:8px;top:8px}
[hidden]{display:none!important}
main{padding-bottom:64px}
section{padding-top:64px}
h1{font-size:clamp(32px,4.4vw,52px);line-height:1.08;letter-spacing:-.5px}
h2{font-size:28px;line-height:1.2;letter-spacing:-.3px}
.lede{font-size:clamp(18px,1.8vw,21px);line-height:1.5;color:var(--muted);margin-top:16px;max-width:620px}
.sec{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:8px 24px;margin-bottom:24px}
.sec a,.more a,.links a{font-family:var(--sans);font-size:15px;text-decoration:none}
.sec a:hover,.more a:hover,.links a:hover{text-decoration:underline}

/* cards: a preview of the tool, a name, one line (the Arcade's way; the previews are tools/tidy_cards.py's) */
.cards{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(320px,100%),1fr));gap:40px 32px}
.cards.four{grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr))}
@media (min-width:520px) and (max-width:719px){.cards:not(.four){grid-template-columns:1fr 1fr}}
.card{position:relative;min-width:0}
.pic.photo{height:auto;aspect-ratio:276/156}
.pic.photo img{width:100%;height:100%;object-fit:cover;image-rendering:auto}
.card h3{font-size:20px;line-height:1.25;margin:16px 0 4px}
.card h3 a{color:var(--ink);text-decoration:none}
.card h3 a::after{content:"";position:absolute;inset:0}
.card:hover h3 a{color:var(--accent)}
.card p{font-size:15.5px;line-height:1.5;color:var(--muted)}

.more{display:flex;flex-wrap:wrap;gap:8px 24px;align-items:baseline;padding-top:32px;margin-top:48px;border-top:1px solid var(--rule)}
.more span{font-family:var(--sans);font-size:15px;color:var(--muted)}
.links{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:16px}

footer.site-f{display:flex;justify-content:space-between;flex-wrap:wrap;gap:0 24px;padding:16px 0 40px;border-top:1px solid var(--rule);font:14px/1.4 var(--sans);color:var(--muted)}
footer.site-f a{color:var(--accent);text-decoration:none;margin-right:16px;display:inline-flex;align-items:center;min-height:44px}
#stamp{user-select:none;display:inline-flex;align-items:center;min-height:44px}
@media (max-width:600px){.wrap{padding:0 16px}section{padding-top:48px}h2{font-size:25px}
  .cards.four{grid-template-columns:1fr 1fr;gap:24px 16px}.cards.four h3{font-size:18px;margin-top:12px}.cards.four p{font-size:14.5px}}

/* card previews (tools/tidy_cards.py): a tiny screen of each tool on the Arcade's ground (site/play.html --lcd) */
:root{--lcd:#f3f1ea;--lcd-edge:#d9d4c7;--lcd-ink:#1d211c;--lcd-dim:#6b6f66}
@media (prefers-color-scheme:dark){:root{--lcd:#dedad0;--lcd-edge:#8f897c}}
.pic{position:relative;height:156px;background:var(--lcd);border-radius:6px;overflow:hidden;container-type:inline-size;box-shadow:inset 0 0 0 1px var(--lcd-edge),inset 0 3px 10px rgba(0,0,0,.06);color:var(--lcd-ink);font:600 11px/1.3 var(--sans)}
.pv{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 12px;--s:1}
.pic .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pv img{display:block;flex:none;image-rendering:pixelated;image-rendering:crisp-edges;zoom:var(--s)}
.pv .lab{white-space:nowrap}.pv .dim{color:var(--lcd-dim);font-weight:500}.pv .mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-weight:700}
.pv .wide{display:none!important}
.pv .fig{display:flex;flex-direction:column;align-items:center;gap:4px;flex:none}
.pv .col{display:flex;flex-direction:column;gap:3px;min-width:0}.pv .grow{flex:1 1 auto}
.pv .row{display:flex;align-items:flex-end;justify-content:center;gap:12px}
.pv .gbbox{background:#fff;color:#111;border:3px double #222;border-radius:5px;padding:5px 10px;font:700 13px/1.45 ui-monospace,Menlo,Consolas,monospace;white-space:nowrap}
.pv .tcs{display:flex;flex-wrap:wrap;gap:3px}
.pv .tc{font:600 10px/1 var(--sans);font-style:normal;border-radius:3px;padding:3px 5px;color:#141414;white-space:nowrap}
.t-normal{background:#a8a878}.t-fire{background:#f08030}.t-water{background:#6890f0}.t-electric{background:#f8d030}.t-grass{background:#78c850}.t-ice{background:#98d8d8}.t-fighting{background:#c03028}.t-poison{background:#a040a0}.t-ground{background:#e0c068}.t-flying{background:#a890f0}.t-psychic{background:#f85888}.t-bug{background:#a8b820}.t-rock{background:#b8a038}.t-ghost{background:#705898}.t-dragon{background:#7038f8}.t-dark{background:#705848}.t-steel{background:#b8b8d0}.t-fairy{background:#ee99ac}
.pv .t-fighting,.pv .t-poison,.pv .t-ghost,.pv .t-dragon,.pv .t-dark{color:#fff}
.pv-scr{padding:6px}.pv-scr .scr{width:160px;height:144px;zoom:1}
@container (max-width:171px){.pv-scr .scr{width:100%;height:auto}}
@container (min-width:340px){.pv-scr img.wide{display:block!important}.pv-scr .col.wide{display:flex!important}}
.pv .odds b{display:inline-block;min-width:68px;font-weight:600}
.pv-party{flex-direction:column;gap:6px}
.pv-party .where{position:absolute;left:12px;bottom:6px}.pv-party .cap{position:absolute;left:10px;top:7px}
@container (min-width:300px){.pv-party .where{position:static}}
.pv-champ{padding:8px;gap:12px}.pv-champ .side{display:flex;flex-direction:column;align-items:center;gap:4px}
.pv-champ .g{display:grid;grid-template-columns:repeat(3,auto);align-items:end;justify-items:center;gap:0 2px}
@container (min-width:372px){.pv-champ .wide{display:flex!important}}
@container (max-width:199px){.pv-champ .g{grid-template-columns:repeat(2,auto)}.pv-champ .g img:nth-child(n+5){display:none}}
.pv-name{flex-direction:column;gap:8px}.pv-name .glitch{align-self:center;justify-content:center;min-height:56px}
@container (min-width:340px){.pv-name{flex-direction:row;gap:20px}}
@container (min-width:420px){.pv-name{--s:2}.pv-name .glitch{min-height:112px}}
/* the random roll: six at 1x, or the first three at 2x with their names on a card wide enough for any three */
.pv-roll .g{display:grid;grid-template-columns:repeat(3,auto);align-items:end;justify-items:center;gap:2px 4px}
.pv-roll .lab{display:none}
@container (min-width:300px){.pv-roll .g{gap:2px 18px}}
@container (min-width:372px){.pv-roll{--s:2}.pv-roll .fig:nth-child(n+4){display:none}.pv-roll .lab{display:block}.pv-roll .g{gap:0 4px}}
@container (max-width:199px){.pv-roll .g{grid-template-columns:repeat(2,auto)}.pv-roll .fig:nth-child(n+5){display:none}}
.pv-dv .tab{display:grid;grid-template-columns:repeat(6,auto);gap:3px 9px;align-items:baseline}
.pv-dv .tab b,.pv-dv .tab i{font-style:normal;color:var(--lcd-dim);font-size:10px;font-weight:600}.pv-dv .tab span{font-variant-numeric:tabular-nums;text-align:right}
@container (min-width:220px){.pv-dv .wide{display:flex!important}}
@container (max-width:269px){.pv-dv{gap:8px}.pv-dv .fig .lab{display:none}.pv-dv .tab{grid-template-columns:repeat(5,auto);gap:3px 4px}.pv-dv .tab>i{display:none}}
.pv-cry .wave{display:block;width:100%;height:72px;stroke:var(--lcd-ink);stroke-width:.62;fill:none}
.pv-gt{flex-direction:column;gap:12px}.pv-gt .zalgo{font:700 22px/1.2 Georgia,serif;white-space:nowrap}
@container (min-width:300px){.pv-gt .zalgo{font-size:30px}.pv-gt .gbbox{font-size:15px}}
.pv-ch .gbbox{display:flex;flex-direction:column;gap:2px;white-space:normal;font-size:11.5px;line-height:1.35;max-width:320px}.pv-ch .gbbox b{font-size:13px}
.pv-ch .d{display:none;font:500 11.5px/1.35 var(--sans);margin-bottom:3px}
@container (min-width:300px){.pv-ch .d{display:block}}
.pv-team{flex-direction:column;gap:6px}
.pv-team .six{display:grid;grid-template-columns:repeat(3,auto);align-items:end;justify-items:center;gap:2px 8px}
@container (min-width:360px){.pv-team .six{grid-template-columns:repeat(6,auto);gap:0 6px}}
.pv-team .weak{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px}
.pv-type .col>div{display:flex;flex-wrap:wrap;align-items:center;gap:3px 6px}.pv-type .ty .lab,.pv-catch .col .lab:first-child{font-size:12px}
.pv-type.few .col>.wide:not([hidden]){display:flex!important}.pv-type .col>[hidden]{display:none!important}
@container (min-width:280px){.pv-type .col>.wide:not([hidden]){display:flex!important}}
@container (min-width:300px){
  .pv-type .ty .lab{font-size:13px}.pv-type .tc{font-size:11px;padding:3px 6px}}
.pv-chart{gap:16px;padding:8px}.pv-chart .grid{width:132px;height:132px}
@container (min-width:300px){.pv-chart .wide{display:flex!important}}
.pv-chart .key i{display:inline-block;width:9px;height:9px;margin-right:6px;vertical-align:-1px}
.pv-chart .k2{background:#3e9c4b}.pv-chart .k05{background:#d9534a}.pv-chart .k0{background:#262626}
.pv-nature .ng{display:grid;grid-template-columns:auto repeat(5,auto);gap:2px;font:500 10px/1 var(--sans)}
.pv-nature .ng i{font-style:normal;padding:4px;text-align:center;white-space:nowrap}
.pv-nature .ng .h{color:var(--lcd-dim);font-weight:600}.pv-nature .ng .on{background:var(--accent);color:#fff;border-radius:3px;font-weight:700}
@container (max-width:299px){.pv-nature .ng{grid-template-columns:auto repeat(3,auto)}.pv-nature .ng .c0,.pv-nature .ng .c1,.pv-nature .ng .r3,.pv-nature .ng .r4{display:none}}
.pv-name .glitch{display:none}
@container (min-width:220px){.pv-name .glitch{display:flex}}
/* a card under 220 px (none on the site today): smaller gaps, and only what fits whole */
@container (max-width:219px){
  .pv{padding:6px;gap:6px}.pv .row{gap:2px}.pv .row img{margin:0 -3px}
  .pv-party .lab,.pv-party .where,.pv-party .cap{display:none}.pv-party .row{flex-wrap:wrap;row-gap:4px}
  .pv-team .six{gap:0}.pv-team .six img{margin:0 -4px}.pv-team .weak .lab+.tc~*{display:none}
  .pv-type .fig,.pv-catch .fig,.pv-catch .dim{display:none}
  .pv-gt .zalgo{font-size:16px}.pv-ch .gbbox{max-width:100%}
  .pv-nature .ng{grid-template-columns:auto repeat(2,auto)}.pv-nature .ng .c2,.pv-nature .ng .r2{display:none}.pv-nature .ng i{padding:4px 3px}
  .pv-cry .fig .lab{display:none}
}
@container (min-width:200px){.s2-200{--s:2}}
@container (min-width:220px){.s2-220{--s:2}}
@container (min-width:240px){.s2-240{--s:2}}
@container (min-width:260px){.s2-260{--s:2}}
@container (min-width:280px){.s2-280{--s:2}}
@container (min-width:300px){.s2-300{--s:2}}
@container (min-width:320px){.s2-320{--s:2}}
@container (min-width:340px){.s2-340{--s:2}}
@container (min-width:360px){.s2-360{--s:2}}
@container (min-width:380px){.s2-380{--s:2}}
@container (min-width:400px){.s2-400{--s:2}}
@container (min-width:420px){.s2-420{--s:2}}
@container (min-width:440px){.s2-440{--s:2}}
@container (min-width:200px){.s3-200{--s:3}}
@container (min-width:220px){.s3-220{--s:3}}
@container (min-width:240px){.s3-240{--s:3}}
@container (min-width:260px){.s3-260{--s:3}}
@container (min-width:280px){.s3-280{--s:3}}
@container (min-width:300px){.s3-300{--s:3}}
@container (min-width:320px){.s3-320{--s:3}}
@container (min-width:340px){.s3-340{--s:3}}
@container (min-width:360px){.s3-360{--s:3}}
@container (min-width:380px){.s3-380{--s:3}}
@container (min-width:400px){.s3-400{--s:3}}
@container (min-width:420px){.s3-420{--s:3}}
@container (min-width:440px){.s3-440{--s:3}}

/* the handheld: real screens of glitch encounters, stepped through with its own buttons */
.hh{margin:0;justify-self:center;width:376px;max-width:100%}
.hh-body{padding:16px 16px 20px;border-radius:14px 14px 56px 14px;background:var(--body);box-shadow:inset 0 -4px 0 var(--bodyedge)}
.hh-bezel{position:relative;background:var(--bezel);border-radius:8px 8px 28px 8px;padding:20px 12px 24px}
.led{position:absolute;left:12px;top:7px;width:6px;height:6px;border-radius:50%;background:#d9473b}
.hh-screen{display:block;width:320px;height:288px;margin:0 auto;background:#fff;line-height:0}
.hh-screen img{display:block;width:320px;height:288px;image-rendering:pixelated;image-rendering:crisp-edges}
.hh-brand{margin:12px 0 0 4px;font:italic 700 17px/1 var(--serif);color:#3f424a}
.hh-brand em{color:#2f7d4f}
.hh-ctl{display:grid;grid-template-columns:auto auto;justify-content:space-between;align-items:center;margin-top:16px;padding:0 4px}
.dpad{position:relative;width:108px;height:108px}
.dpad::before{content:"";position:absolute;left:36px;top:36px;width:36px;height:36px;background:var(--pad)}
.dpad>*{position:absolute;width:36px;height:36px;background:var(--pad);border:0;padding:0}
.dpad .u{left:36px;top:0;border-radius:4px 4px 0 0}.dpad .d{left:36px;bottom:0;border-radius:0 0 4px 4px}
.dpad .l{left:0;top:36px;border-radius:4px 0 0 4px}.dpad .r{right:0;top:36px;border-radius:0 4px 4px 0}
.dpad button{cursor:pointer}
.dpad button::after{content:"";position:absolute;left:50%;top:50%;border:6px solid transparent;transform:translate(-50%,-50%)}
.dpad .l::after{border-right-color:#8a8d96;margin-left:-3px}.dpad .r::after{border-left-color:#8a8d96;margin-left:3px}
.ab{display:flex;gap:14px;transform:rotate(-20deg);margin-right:4px}
.ab button{width:46px;height:46px;border-radius:50%;background:var(--abtn);border:0;cursor:pointer;color:rgba(255,255,255,.75);font:700 14px/1 var(--sans)}
.ab .b{margin-top:24px}
.ss{grid-column:1/-1;display:flex;justify-content:center;gap:24px;padding-top:8px}
.ss span,.ss button{width:40px;height:10px;border-radius:5px;background:#8f8a80;transform:rotate(-24deg)}
.hh-ctl button:active{transform:translateY(1px)}

.hero{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"t" "h" "s";gap:40px;padding-top:48px;align-items:center}
.hero>.txt{grid-area:t}.hero>.hh{grid-area:h}.hero>.start{grid-area:s}
@media (min-width:920px){.hero{grid-template-columns:minmax(0,1fr) 376px;grid-template-areas:"t h" "s h";gap:0 64px}
  .hero>.txt{align-self:end}.hero>.start{align-self:start;margin-top:24px}}
.by{font:15px/1.5 var(--sans);color:var(--muted);margin-top:16px}
.by a{color:var(--ink);text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:3px}
.start{display:flex;flex-wrap:wrap;gap:4px 20px;align-items:baseline;max-width:620px;font:15px/1.5 var(--sans)}
.start span{color:var(--muted)}
.start a{text-decoration:none;display:inline-flex;align-items:center;min-height:32px}
.start a:hover{text-decoration:underline}
.hh-cap{margin-top:16px;text-align:center;font:15px/1.45 var(--sans);color:var(--muted)}
.hh-cap a{color:var(--ink);text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:3px}
.hh-l1{display:block}
.hh-end{margin-top:6px}
.hh-end span{color:var(--ink)}
.hh-cap .hh-more{color:var(--accent);font-weight:700;text-decoration-thickness:2px}
.hh-l2{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:0 16px;margin-top:4px;font-size:13px;line-height:19px}
.hh-snd{position:relative;padding:0 4px;border:0;background:none;color:var(--muted);font:inherit;line-height:19px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.hh-snd::before{content:"";position:absolute;inset:-13px -8px}
.hh-vol{display:inline-flex;align-items:center;gap:6px}.hh-vol[hidden]{display:none}
.hh-vol select{min-height:32px;padding:0 4px;border:1px solid var(--rule);border-radius:6px;background:var(--paper);color:var(--ink);font:inherit}
/* the handheld plays: the battler's frame over the screen (made only when a battle starts), the loading screen, and
   the line under the screen in the game's font; while a battle is on its buttons never scroll or zoom the page */
.hh-scr{position:relative;width:320px;height:288px;margin:0 auto}
.hh-load,.hh-frame{position:absolute;left:0;top:0;width:100%;height:100%;border:0;display:block;background:#f8f8f8}
.hh-load{z-index:3;image-rendering:pixelated;image-rendering:crisp-edges;pointer-events:none}
.hh-frame{z-index:2;visibility:hidden}
.hh-frame.on{visibility:visible}
.hh-say{position:absolute;left:50%;bottom:4px;width:320px;height:16px;margin-left:-160px;image-rendering:pixelated;image-rendering:crisp-edges;pointer-events:none}
.dpad .u::after{border-bottom-color:#8a8d96;margin-top:-3px}.dpad .d::after{border-top-color:#8a8d96;margin-top:3px}
.dpad button::before{content:"";position:absolute;inset:-4px}
.dpad .u::before{inset:-8px -4px 0}.dpad .d::before{inset:0 -4px -8px}.dpad .l::before{inset:-4px 0 -4px -8px}.dpad .r::before{inset:-4px -8px -4px 0}
.hh-ctl button{touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.hh:not([data-state=off]) .hh-ctl button{touch-action:none}
.hh-ctl button.down{transform:translateY(1px)}
.ss button{position:relative;border:0;padding:0;cursor:pointer}
.ss button::before{content:"";position:absolute;inset:-17px -2px}
.ss button.down{transform:rotate(-24deg) translateY(1px)}
/* off: the power light dark and the screen saying PRESS A TO START (the picture, then the same words drawn over it) */
.hh[data-state=off] .led{background:#5d5952}
.hh-lcd{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;image-rendering:pixelated;image-rendering:crisp-edges;pointer-events:none}
/* the start screen from before 2026-11-16: the wordmark drops down the screen once a visit, then the screen wipes */
.hh-boot{position:absolute;inset:0;z-index:4;display:flex;justify-content:center;overflow:hidden;background:#f4f5ef;container-type:inline-size;transform-origin:bottom;pointer-events:none}
.hh-boot span{align-self:flex-start;font:700 9.5cqw/1.3 Georgia,'Times New Roman',serif;color:#1c1e1b;transform:translateY(-14cqw);animation:hhbootdrop 1.1s steps(20) forwards}
.hh-boot i{font-style:normal;color:#60645e}
@keyframes hhbootdrop{to{transform:translateY(36cqw)}}
.hh-boot.wipe{animation:hhwipe .3s steps(9) forwards}
@keyframes hhwipe{from{transform:scaleY(1)}to{transform:scaleY(0)}}
@media (prefers-reduced-motion:reduce){.hh-boot span,.hh-boot.wipe{animation:none}}
@media (max-width:420px){
  .hh{width:auto;max-width:none;margin:0 -16px}
  .hh-body{padding:12px 8px 16px;border-radius:12px 12px 44px 12px}
  .hh-bezel{padding:16px 8px 24px}
  .hh-cap{padding:0 16px}
}
@media (max-width:351px){.hh-screen,.hh-screen img,.hh-scr{width:160px;height:144px}.hh-say{width:160px;height:8px;margin-left:-80px;bottom:8px}}

.news{list-style:none;padding:0;max-width:760px}
.news li{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:0 24px;padding:12px 0;border-bottom:1px solid var(--rule)}
.news li:first-child{border-top:1px solid var(--rule)}
.news a{font-size:18px;color:var(--ink);text-decoration:none}
.news a:hover{color:var(--accent)}
.news span{font:14px/1.4 var(--sans);color:var(--muted)}
@media (max-width:600px){.news li{display:block}.news span{display:block;margin-top:2px}}

#console{position:fixed;inset:0;background:rgba(4,10,6,.96);display:none;z-index:99;font-family:ui-monospace,Menlo,Consolas,monospace;color:#7dffa8;padding:6vh 8vw;overflow:auto}
#console.open{display:block}
#clog{white-space:pre-wrap;font-size:14.5px;line-height:1.6}
#cline{display:flex;gap:8px;font-size:14.5px;margin-top:4px}
#cin{background:none;border:none;outline:none;color:#7dffa8;font:inherit;flex:1;min-width:0}
#cin:focus-visible{outline:2px solid #3f9c63;outline-offset:3px;border-radius:2px}
#console .dim{color:#3f9c63}
#console .warn{color:#ffb37d}
