@font-face{font-family:Vazirmatn;src:url('/assets/fonts/vazirmatn-arabic.woff2') format('woff2');font-weight:100 900;font-display:swap}

/* Night (RPG window) is the default; the paper theme follows a light device setting.
   --frame / --frame-hot are 6x6 pixel 9-slices: a notched outer edge and an inner line. */
:root{color-scheme:dark light;--bg:#0b1026;--dot:#161d45;--ink:#eef0ff;--muted:#a9b1dd;--w1:#24339a;--w2:#101860;--edge:#dfe4ff;--line:rgba(223,228,255,.2);--accent:#ffd447;--accent-ink:#1b1500;--link:#ffd447;--hover:rgba(255,255,255,.07);--ok:#6be08e;--warn:#ffb65c;--info:#8fd0ff;--field:#080c22;--img:#000;--plate:#0b0f2e;--plate-ink:#ffd447;--read:#11183a;--read-ink:#e4e7f8;--max:1120px;
--frame-soft:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%2336427f' d='M1 0h4v1H1zM0 1h1v4H0zM5 1h1v4H5zM1 5h4v1H1z'/%3E%3Cpath fill='%2311183a' d='M1 1h4v1H1zM1 4h4v1H1zM1 2h1v2H1zM4 2h1v2H4z'/%3E%3C/svg%3E");
--frame:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%23dfe4ff' d='M1 0h4v1H1zM0 1h1v4H0zM5 1h1v4H5zM1 5h4v1H1z'/%3E%3Cpath fill='%230b0f2e' d='M1 1h4v1H1zM1 4h4v1H1zM1 2h1v2H1zM4 2h1v2H4z'/%3E%3C/svg%3E");
--frame-hot:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%23ffd447' d='M1 0h4v1H1zM0 1h1v4H0zM5 1h1v4H5zM1 5h4v1H1z'/%3E%3Cpath fill='%230b0f2e' d='M1 1h4v1H1zM1 4h4v1H1zM1 2h1v2H1zM4 2h1v2H4z'/%3E%3C/svg%3E")}
/* The paper theme follows a light device setting, unless the visitor chose night with the sun/moon switch;
   [data-theme] (set by /assets/theme.js before the page paints) forces either theme. */
@media (prefers-color-scheme:light){:root:not([data-theme=night]){color-scheme:light;--bg:#f2ead6;--dot:#e2d5b3;--ink:#1e1c2c;--muted:#5c5569;--w1:#fffbf2;--w2:#fbf3e2;--edge:#1e1c2c;--line:rgba(30,28,44,.18);--accent:#c13d28;--accent-ink:#fff;--link:#a93320;--hover:rgba(0,0,0,.045);--ok:#1b7a35;--warn:#9a5700;--info:#2152b3;--field:#fff;--img:#1e1c2c;--plate:#1e1c2c;--plate-ink:#fff;--read:#fffdf8;--read-ink:#25232f;
--frame-soft:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%23cbbd96' d='M1 0h4v1H1zM0 1h1v4H0zM5 1h1v4H5zM1 5h4v1H1z'/%3E%3Cpath fill='%23fffdf8' d='M1 1h4v1H1zM1 4h4v1H1zM1 2h1v2H1zM4 2h1v2H4z'/%3E%3C/svg%3E");
--frame:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%231e1c2c' d='M1 0h4v1H1zM0 1h1v4H0zM5 1h1v4H5zM1 5h4v1H1z'/%3E%3Cpath fill='%23e9dcbb' d='M1 1h4v1H1zM1 4h4v1H1zM1 2h1v2H1zM4 2h1v2H4z'/%3E%3C/svg%3E");
--frame-hot:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%23c13d28' d='M1 0h4v1H1zM0 1h1v4H0zM5 1h1v4H5zM1 5h4v1H1z'/%3E%3Cpath fill='%23e9dcbb' d='M1 1h4v1H1zM1 4h4v1H1zM1 2h1v2H1zM4 2h1v2H4z'/%3E%3C/svg%3E")}}
:root[data-theme=paper]{color-scheme:light;--bg:#f2ead6;--dot:#e2d5b3;--ink:#1e1c2c;--muted:#5c5569;--w1:#fffbf2;--w2:#fbf3e2;--edge:#1e1c2c;--line:rgba(30,28,44,.18);--accent:#c13d28;--accent-ink:#fff;--link:#a93320;--hover:rgba(0,0,0,.045);--ok:#1b7a35;--warn:#9a5700;--info:#2152b3;--field:#fff;--img:#1e1c2c;--plate:#1e1c2c;--plate-ink:#fff;--read:#fffdf8;--read-ink:#25232f;
--frame-soft:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%23cbbd96' d='M1 0h4v1H1zM0 1h1v4H0zM5 1h1v4H5zM1 5h4v1H1z'/%3E%3Cpath fill='%23fffdf8' d='M1 1h4v1H1zM1 4h4v1H1zM1 2h1v2H1zM4 2h1v2H4z'/%3E%3C/svg%3E");
--frame:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%231e1c2c' d='M1 0h4v1H1zM0 1h1v4H0zM5 1h1v4H5zM1 5h4v1H1z'/%3E%3Cpath fill='%23e9dcbb' d='M1 1h4v1H1zM1 4h4v1H1zM1 2h1v2H1zM4 2h1v2H4z'/%3E%3C/svg%3E");
--frame-hot:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath fill='%23c13d28' d='M1 0h4v1H1zM0 1h1v4H0zM5 1h1v4H5zM1 5h4v1H1z'/%3E%3Cpath fill='%23e9dcbb' d='M1 1h4v1H1zM1 4h4v1H1zM1 2h1v2H1zM4 2h1v2H4z'/%3E%3C/svg%3E")}
:root[data-theme=night]{color-scheme:dark}

*{box-sizing:border-box}
html{scroll-padding-top:2rem;-webkit-text-size-adjust:100%}
body{margin:0;background:#0b1026;background:var(--bg);color:#eef0ff;color:var(--ink);background-image:radial-gradient(var(--dot) 1px,transparent 1px);background-size:6px 6px;font:16px/1.8 Vazirmatn,Tahoma,"Segoe UI",Arial,sans-serif}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
img{display:block;max-width:100%;height:auto}
h1,h2,h3,p{margin:0}
h1,h2,h3{line-height:1.5}
p+p{margin-top:1rem}
bdi{unicode-bidi:isolate}
[hidden]{display:none!important}
a,button,label{touch-action:manipulation}
::selection{background:#ffd447;background:var(--accent);color:#1b1500;color:var(--accent-ink)}
a:focus,button:focus,input:focus,select:focus,summary:focus{outline:2px solid #ffd447;outline:2px solid var(--accent);outline-offset:3px}
a:focus:not(:focus-visible),button:focus:not(:focus-visible),summary:focus:not(:focus-visible){outline:none}
.wrap{width:calc(100% - 32px);max-width:1120px;max-width:var(--max);margin-left:auto;margin-right:auto}
.skip{position:absolute;top:-100px;right:16px;background:var(--accent);color:var(--accent-ink);padding:8px 16px;z-index:30;font-weight:700}
.skip:focus{top:8px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

/* Pixel pieces */
svg.wordmark,svg.pixel-text{display:block;fill:currentColor;max-width:100%;height:auto}
.wordmark-accent{fill:#ffd447;fill:var(--accent)}
.icon{display:inline-block;flex:none;vertical-align:middle;overflow:visible}
.win,.frame,.search{border:4px solid #dfe4ff;border-color:var(--edge);border-image:var(--frame) 2 stretch;background-clip:padding-box}
.win{position:relative;background-color:#101860;background-image:linear-gradient(var(--w1),var(--w2));padding:20px}
@media (prefers-color-scheme:light){:root:not([data-theme=night]) .win{background-image:none;background-color:var(--w1)}}
:root[data-theme=paper] .win{background-image:none;background-color:var(--w1)}
.frame{display:block;position:relative;background-color:var(--img);overflow:hidden}
.frame img{width:100%;image-rendering:pixelated}
/* RPG cursor: a pointing hand that steps in, never blinks. */
.hand{display:inline-block;flex:none;width:22px;height:18px;background:url('/assets/hand.svg') no-repeat;background-size:100% 100%;image-rendering:pixelated;opacity:0;transform:translateX(6px);transition:opacity .16s steps(2),transform .16s steps(3)}

.button{display:inline-block;background:#ffd447;background:var(--accent);color:#1b1500;color:var(--accent-ink);border:0;padding:8px 18px;font-size:15px;font-weight:800;line-height:1.6;text-align:center;box-shadow:inset 0 -3px 0 rgba(0,0,0,.25);-webkit-clip-path:polygon(0 3px,3px 3px,3px 0,calc(100% - 3px) 0,calc(100% - 3px) 3px,100% 3px,100% calc(100% - 3px),calc(100% - 3px) calc(100% - 3px),calc(100% - 3px) 100%,3px 100%,3px calc(100% - 3px),0 calc(100% - 3px));clip-path:polygon(0 3px,3px 3px,3px 0,calc(100% - 3px) 0,calc(100% - 3px) 3px,100% 3px,100% calc(100% - 3px),calc(100% - 3px) calc(100% - 3px),calc(100% - 3px) 100%,3px 100%,3px calc(100% - 3px),0 calc(100% - 3px))}
.button:hover{filter:brightness(1.08)}
.button:active{box-shadow:inset 0 3px 0 rgba(0,0,0,.25)}
.button:focus-visible{outline:none;box-shadow:inset 0 0 0 3px var(--accent-ink)}
.button.secondary{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 2px var(--edge)}
.button:disabled,.button[disabled]{opacity:.45;cursor:not-allowed;filter:none}
.text-link{color:var(--link);font-weight:700;font-size:14px;display:inline-block;padding:6px 0}
.text-link:hover{text-decoration:underline;text-underline-offset:5px}

/* Header */
.header-inner{display:flex;flex-wrap:wrap;align-items:center;padding:22px 0 18px}
.header-inner .brand{margin-left:auto}
.header-inner .theme-toggle{order:3}
.brand{display:flex;align-items:center;color:var(--ink);margin:4px 0}
.brand svg{width:180px}
.brand small{color:var(--muted);font-size:13px;line-height:1.3;border-right:1px solid var(--line);padding-right:14px;margin-right:14px}
.nav{display:flex;flex-wrap:wrap;align-items:center;font-size:15px;font-weight:600;margin:4px 0}
.nav a{position:relative;padding:6px 0;margin-left:22px}
.nav a:last-child{margin-left:0}
.nav a[aria-current]:after,.nav a:hover:after{content:"";position:absolute;right:0;left:0;bottom:0;height:2px;background:var(--accent)}
.nav .button{padding:5px 14px;font-size:14px}
.nav .button:after{display:none}
/* Sun and moon: the visitor's own day/night choice. Hidden until theme.js wires it up. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;margin:4px 16px 4px 0;background:transparent;border:2px solid var(--line);color:var(--accent);padding:0}
.theme-toggle:hover{border-color:var(--accent)}
.theme-toggle .icon{width:18px;height:18px}
.theme-toggle .icon-sun,:root[data-theme=paper] .theme-toggle .icon-moon{display:block}
.theme-toggle .icon-moon,:root[data-theme=paper] .theme-toggle .icon-sun{display:none}
@media (prefers-color-scheme:light){:root:not([data-theme=night]) .theme-toggle .icon-moon{display:block}:root:not([data-theme=night]) .theme-toggle .icon-sun{display:none}}

/* Headings */
.eyebrow{display:flex;flex-wrap:wrap;align-items:center;font-size:13px;font-weight:700;color:var(--link);margin-bottom:6px}
.eyebrow>*{margin:2px 0 2px 14px}
.pixel-heading{color:#ffd447;color:var(--accent);line-height:1;padding:4px 0}
.page-heading{padding:30px 0 26px}
.page-heading h1{font-size:34px}
.page-heading>p{max-width:760px;color:var(--muted);margin-top:12px}
.breadcrumb{font-size:13px;color:var(--muted);margin-bottom:14px}
.breadcrumb a:hover{color:var(--ink);text-decoration:underline}
.breadcrumb span[aria-hidden]{margin:0 6px}
.section-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;margin-bottom:18px}
.section-head h2{font-size:22px;display:flex;align-items:center}
.section-head h2 .icon{width:22px;height:22px;color:var(--accent);margin-left:10px;align-self:center}
.section-head p{font-size:14px;color:var(--muted)}

/* Status, platform and version labels */
.state,.tag{display:inline-flex;align-items:center;font-weight:700;white-space:nowrap}
.state .icon,.tag .icon{width:16px;height:14px;margin-left:6px}
.tag{font:800 12px/1.5 Arial,sans-serif;letter-spacing:.04em;color:var(--muted)}
.tag .icon{width:14px}
.state-released{color:var(--ok)}.state-partial{color:var(--warn)}.state-early-access,.state-in-progress{color:var(--info)}.state-unknown{color:var(--muted)}
.ver{display:inline-block;direction:ltr;background:var(--plate);color:var(--plate-ink);font:700 11px/1.7 ui-monospace,Consolas,monospace;padding:0 6px;letter-spacing:.03em}
.frame .ver{position:absolute;top:6px;left:6px}

/* Home hero */
.hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-gap:28px;gap:28px;align-items:stretch;padding-top:6px}
.hero-main{display:flex;flex-direction:column;justify-content:center}
.hero-main h1{margin-bottom:4px}
.lead{color:var(--muted);margin:12px 0 20px;max-width:44ch}
.stage{position:relative;min-height:330px}
.stage-shot{display:block;position:absolute;top:0;right:0;bottom:0;left:0;padding:0;overflow:hidden;background:var(--img)}
.stage-shot img{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.say{padding:14px 18px 16px;font-size:15px}
.stage .say{position:absolute;right:16px;left:16px;bottom:16px}
.speaker{position:absolute;top:-17px;right:14px;background:var(--plate);color:var(--plate-ink);border:2px solid var(--edge);font-size:12px;line-height:1.6;padding:0 10px}
.say p{margin:4px 0 0}
.say a{font-weight:700}
.say a:hover{text-decoration:underline;text-underline-offset:4px}
.say-more{font-size:13px;color:var(--muted)}
.say-more .state{margin-right:8px;font-size:12px}
.say-next{position:absolute;left:12px;bottom:8px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid var(--accent)}
.steps{display:flex;flex-wrap:wrap;align-items:center;list-style:none;margin:22px 0 0;padding:16px 0 0;border-top:2px dotted var(--line);font-size:14px;color:var(--muted)}
.steps li{display:flex;align-items:center;margin:4px 0}
.steps li+li:before{content:"";width:22px;height:2px;margin:0 10px;background:repeating-linear-gradient(to left,var(--muted) 0 2px,transparent 2px 5px);opacity:.7}
.steps .icon{width:18px;height:16px;color:var(--accent);margin-left:8px}
.tally{display:flex;align-items:center;color:var(--muted);font-size:14px;margin-top:26px}
.tally .icon{width:18px;height:14px;color:var(--ok);margin-left:10px}

/* Search and filters */
.search{display:flex;background-color:var(--field)}
.search input{flex:1;min-width:0;width:100%;background:transparent;border:0;padding:8px 12px;min-height:44px;-webkit-appearance:none;appearance:none;border-radius:0}
.search input:focus{outline:none}
.search:focus-within{border-image-source:var(--frame-hot)}
.search .button{margin:3px}
input::placeholder{color:var(--muted);opacity:.85}
.chips{border:0;padding:0;margin:12px 0 0;display:flex;flex-wrap:wrap;align-items:center;font-size:13px}
.chip{position:relative;display:inline-block;margin:0 0 6px 6px;cursor:pointer}
.chip input{position:absolute;opacity:0;width:1px;height:1px}
.chip span{display:block;font-weight:700;color:var(--muted);padding:3px 10px;direction:ltr}
.chip:hover span{color:var(--ink);background:var(--hover)}
.chip input:checked+span{background:var(--accent);color:var(--accent-ink);-webkit-clip-path:polygon(0 2px,2px 2px,2px 0,calc(100% - 2px) 0,calc(100% - 2px) 2px,100% 2px,100% calc(100% - 2px),calc(100% - 2px) calc(100% - 2px),calc(100% - 2px) 100%,2px 100%,2px calc(100% - 2px),0 calc(100% - 2px));clip-path:polygon(0 2px,2px 2px,2px 0,calc(100% - 2px) 0,calc(100% - 2px) 2px,100% 2px,100% calc(100% - 2px),calc(100% - 2px) calc(100% - 2px),calc(100% - 2px) 100%,2px 100%,2px calc(100% - 2px),0 calc(100% - 2px))}
.chip input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.filter-state{display:flex;align-items:center;font-size:13px;color:var(--muted);margin-top:4px}
.filter-state select{margin-right:8px;background:var(--field);border:1px solid var(--line);border-radius:0;padding:3px 8px;color:var(--ink);min-height:32px}
.filters-win{margin-bottom:6px}

/* Library */
.library{padding-top:28px}
.games-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));grid-gap:32px 24px;gap:32px 24px}
.game{min-width:0}
.game-link{display:block;position:relative}
.game .frame img{aspect-ratio:4/3;object-fit:cover;transition:transform .25s steps(4)}
.cover-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;aspect-ratio:4/3;padding:12px;text-align:center;color:var(--muted);font:14px/1.5 Arial,sans-serif}
.cover-fallback .icon{margin-bottom:10px}
.game-name{display:block;position:relative;margin-top:12px}
.game h3{font-size:16px}
.game-name .hand{position:absolute;top:3px;right:-12px}
.game h3{transition:transform .16s steps(3)}
.game .english{display:block;direction:ltr;text-align:right;font:12px/1.5 Arial,sans-serif;color:var(--muted);overflow-wrap:anywhere}
.game-meta{display:flex;flex-wrap:wrap;align-items:center;margin-top:8px;font-size:12px}
.game-meta .tag{margin-left:14px}
.game-link:hover .frame,.game-link:focus-visible .frame{border-image-source:var(--frame-hot)}
.game-link:hover .hand,.game-link:focus-visible .hand{opacity:1;transform:none}
.game-link:hover h3,.game-link:focus-visible h3{color:var(--accent);transform:translateX(-16px)}
.game-link:focus-visible{outline:none}
.filter-count{font-size:14px;color:var(--muted)}
.empty-state{padding:10px 0 20px}
.page-end{padding-bottom:70px}
.notice{border-right:3px solid var(--accent);background:var(--hover);padding:12px 18px;font-size:14px;margin:16px 0}
.notice a{color:var(--link);text-decoration:underline}

/* Mascot: Dad (ض) */
.dad{display:flex;align-items:flex-end;max-width:620px}
.dad-art{width:90px;height:75px;margin-left:14px;margin-bottom:4px;transform:scaleX(-1)}
.dad .say{flex:1}
.say-actions{margin-top:12px}
.egg{position:fixed;left:16px;bottom:16px;z-index:40;width:calc(100% - 32px);max-width:420px}
.egg .button{margin-top:10px;padding:4px 12px;font-size:13px}
.say-actions>*{margin-left:10px}

/* Project page */
.project-crumbs{padding:24px 0 16px}
.project-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;grid-template-rows:auto 1fr;grid-template-areas:"title side" "body side";grid-gap:28px 40px;gap:28px 40px;align-items:start}
.project-title{grid-area:title;min-width:0}
.project-side{grid-area:side;margin-top:16px}
.project-content{grid-area:body}
/* Title window first, then the game's screenshot. */
.title-shot{display:block}
.title-shot .frame img{aspect-ratio:4/3;max-height:420px;object-fit:contain}
.title-box{margin:16px 0 22px;padding:24px 26px 22px}
.title-box .speaker .tag{color:var(--plate-ink);letter-spacing:.06em}
.title-box .speaker .tag .icon{width:13px;height:11px}
.title-box .eyebrow{margin:0 0 4px}
.title-box h1{font-size:30px;line-height:1.45;font-weight:800;color:var(--ink)}
.title-box .english{direction:ltr;text-align:right;font:16px/1.5 Arial,sans-serif;color:var(--muted);margin-top:2px;overflow-wrap:anywhere}
.title-box .lead{font-size:16px;line-height:1.9;color:var(--ink);opacity:.92;max-width:none;margin:14px 0 0;padding-top:12px;border-top:2px dotted var(--line)}
.project-content{min-width:0}
.after-reading{margin-top:40px}
/* Game card: the cartridge's facts, like a status screen. */
.game-card{background-color:var(--read);border:4px solid #36427f;border-image:var(--frame-soft) 2 stretch;background-clip:padding-box;padding:16px 22px 18px;margin-bottom:24px}
.game-card h2{display:flex;align-items:center;font-size:14px;color:var(--accent);margin-bottom:10px}
.game-card h2 .icon{width:16px;height:14px;margin-left:8px}
.game-card dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));grid-gap:12px 20px;gap:12px 20px;margin:0}
.game-card dt{font-size:12px;color:var(--muted)}
.game-card dd{margin:2px 0 0;font-size:16px;font-weight:700;color:var(--read-ink)}
.project-media{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:16px;gap:16px;margin:22px 0}
.gallery{grid-template-columns:repeat(3,minmax(0,1fr));margin:0}
.project-media a{display:block}
.project-media .frame img{aspect-ratio:4/3;object-fit:contain}
.project-media a:hover .frame{border-image-source:var(--frame-hot)}
@media (min-height:880px){.project-side{position:-webkit-sticky;position:sticky;top:16px}}
.project-side h2{font-size:17px;margin-bottom:8px}
.menu{list-style:none;margin:0 0 4px;padding:0}
.menu a{display:flex;align-items:center;padding:7px 4px;overflow-wrap:anywhere}
.menu a>span{flex:1;min-width:0}
.menu .hand{margin-left:8px}
.menu a:hover,.menu a:focus-visible{background:var(--hover);outline:none}
.menu a:hover .hand,.menu a:focus-visible .hand,.menu .primary .hand{opacity:1;transform:none}
.menu:hover .primary:not(:hover) .hand,.menu:focus-within .primary:not(:focus-visible) .hand{opacity:0;transform:translateX(6px)}
.menu strong{display:block}
.menu small{display:block;color:var(--muted);font-size:13px;line-height:1.5}
.menu .primary strong{color:var(--accent)}
.menu .trail{width:16px;height:16px;color:var(--muted);margin-right:8px}
.resource-links li{border-top:1px dashed var(--line)}
.extras{margin-top:12px;padding-top:10px;border-top:1px dashed var(--line)}
.extras h3{font-size:13px;color:var(--muted);font-weight:600;margin-bottom:4px}
.extras ul{list-style:none;margin:0;padding:0}
.extras a{display:flex;align-items:center;justify-content:space-between;font-size:14px;padding:4px 0;color:var(--ink)}
.extras a:hover{color:var(--accent);text-decoration:underline;text-underline-offset:4px}
.extras .trail{width:14px;height:14px;color:var(--muted);margin-right:8px}
.waiting{font-size:14px;color:var(--muted);border-right:3px solid var(--info);padding:4px 12px 4px 0;margin:4px 0 10px}
.waiting a{color:var(--link);text-decoration:underline}
.facts{margin:14px 0 0;padding-top:12px;border-top:2px dotted var(--line);font-size:14px}
.facts div{display:flex;justify-content:space-between;align-items:center;padding:3px 0}
.facts dt{color:var(--muted)}
.facts dd{margin:0}
.facts .tag{color:var(--ink)}
.side-note{font-size:13px;color:var(--muted);margin-top:12px}
.source-note{font-size:13px!important;color:var(--muted);padding-top:16px;margin-top:28px;border-top:1px solid var(--line)}
.source-note a{color:var(--link);text-decoration:underline}
details{border-top:1px dashed var(--line);padding:10px 0 0;margin-top:18px;font-size:14px}
summary{cursor:pointer;color:var(--muted);font-weight:600}
details dl{display:grid;grid-template-columns:1fr 2fr;grid-gap:8px;gap:8px}
details dd{margin:0;overflow-wrap:anywhere}

/* Reading: long text gets its own calm page — solid, framed softly, no dots under the letters. */
.reading{background-color:#11183a;background-color:var(--read);color:#e4e7f8;color:var(--read-ink);border:4px solid #36427f;border-image:var(--frame-soft) 2 stretch;background-clip:padding-box;padding:34px 40px 36px}
.reading p,.reading li{font-size:17px;line-height:2;max-width:68ch}
.reading p{white-space:pre-line;overflow-wrap:anywhere;margin:0 0 1em}
.reading p+p{margin-top:0}
.reading h2{font-size:21px;line-height:1.6;color:var(--ink);margin:1.9em 0 .6em;padding-right:14px;border-right:4px solid var(--accent)}
.reading h3{font-size:18px;line-height:1.6;color:var(--ink);margin:1.5em 0 .4em}
.reading>:first-child,.reading>.archive-block:first-child>*,.reading-title+.archive-block>*{margin-top:0}
.reading .reading-title{display:flex;align-items:center;border:0;padding:0 0 12px;margin:0 0 22px;font-size:15px;color:var(--accent);background:repeating-linear-gradient(to left,var(--line) 0 4px,transparent 4px 8px) bottom/100% 2px no-repeat}
.reading-title .icon{width:18px;height:18px;margin-left:10px}
.reading a{color:var(--link);text-decoration:underline;text-underline-offset:4px}
.reading .menu a{text-decoration:none}
.reading .source-note,.reading .menu li{max-width:none}
.reading .source-note{margin-top:26px}
.reading .resource-links{margin-top:18px}
.reading details{margin-top:26px}
.prose{max-width:840px}
.prose ul{padding-right:22px;padding-left:0}
.prose ol{list-style:none;padding:0;counter-reset:step}
.prose ol>li{position:relative;padding-right:44px;counter-increment:step}
.prose ol>li:before{content:counter(step,arabic-indic);position:absolute;right:0;top:4px;width:28px;height:28px;line-height:24px;text-align:center;border:2px solid var(--accent);color:var(--accent);font-weight:800;font-size:14px}
.prose li{margin:10px 0}
.archive-block{margin:0}
.url{unicode-bidi:isolate;font-size:.9em;overflow-wrap:anywhere}

/* News */
.news-list{background-color:var(--read);border:4px solid #36427f;border-image:var(--frame-soft) 2 stretch;background-clip:padding-box;padding:2px 22px}
.news-item:last-child{border-bottom:0}
.news-item{border-bottom:1px solid var(--line)}
.news-link{display:flex;align-items:center;position:relative;padding:16px 0}
.news-thumb{flex:none;width:120px;margin-left:20px}
.news-thumb img{aspect-ratio:4/3;object-fit:cover}
.news-thumb-empty{display:flex;align-items:center;justify-content:center;height:90px;color:var(--muted);border:2px dashed var(--line)}
.news-body{display:block;min-width:0}
.news-time{display:block;font-size:13px;color:var(--muted)}
.news-name{display:block}
.news-link .hand{position:absolute;top:50%;margin-top:-9px;right:-12px}
.news-title{font-size:17px}
.news-summary{display:block;font-size:14px;color:var(--muted);margin-top:4px}
.news-link:hover .news-title,.news-link:focus-visible .news-title{color:var(--accent)}
.news-link:hover .hand,.news-link:focus-visible .hand{opacity:1;transform:none}
.news-link:hover .frame,.news-link:focus-visible .frame{border-image-source:var(--frame-hot)}
.news-link:focus-visible{outline:none;background:var(--hover)}

/* Resources: an inventory of items */
.resource-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));grid-gap:22px;gap:22px}
.resource{display:block}
.resource .item{width:27px;height:24px;color:var(--accent);margin-bottom:10px}
.resource-name{display:block;position:relative}
.resource-name .hand{position:absolute;top:6px;right:-36px}
.resource h2{font-size:19px}
.resource p{font-size:14px;color:var(--muted);margin-top:6px}
.resource:hover,.resource:focus-visible{border-image-source:var(--frame-hot);outline:none}
.resource:hover .hand,.resource:focus-visible .hand{opacity:1;transform:none}

/* Footer */
.footer{margin-top:40px;padding:6px 0 26px;color:var(--muted);font-size:14px}
.divider{display:flex;align-items:center;color:var(--accent);margin-bottom:22px}
.divider:before,.divider:after{content:"";flex:1;height:2px;background:repeating-linear-gradient(to left,var(--line) 0 4px,transparent 4px 8px)}
.divider .icon{width:22px;height:22px;margin:0 14px}
.footer-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start}
.footer .brand svg{width:120px}
.footer p{margin-top:12px;font-size:13px}
.footer-links{display:flex;flex-wrap:wrap}
.footer-links a{margin:0 0 8px 20px}
.footer-links a:hover,.footer-links a[aria-current]{color:var(--ink);text-decoration:underline;text-underline-offset:5px}
.footer-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;border-top:1px solid var(--line);margin-top:22px;padding-top:14px;font-size:12px}
.footer-bottom span,.footer-bottom bdi{margin:2px 0 2px 18px}

@media (max-width:900px){
 .hero,.project-layout{grid-template-columns:minmax(0,1fr)}
 .stage{min-height:0}
 .stage-shot{display:none}
 .stage .say{position:relative;right:auto;left:auto;bottom:auto;margin-top:12px}
 .project-side{position:relative;top:auto;margin-top:0}
 .project-layout{grid-template-rows:auto;grid-template-areas:"title" "side" "body";grid-gap:24px;gap:24px}
 .title-box{margin:14px 0 16px;padding:20px 18px 18px}
 .title-box h1{font-size:25px}
 .project-side .facts .dup{display:none}
 .project-side .facts:not(:has(div:not(.dup))){display:none}
 .game-card dl{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
 .header-inner{padding:16px 0 10px}
 .brand svg{width:150px}
 .brand small{display:none}
 .nav{width:100%;justify-content:space-between;font-size:14px;margin-top:10px}
 .header-inner .theme-toggle{order:0;margin:4px 0}
 .nav a{margin-left:0}
 .page-heading{padding:22px 0 18px}
 .page-heading h1{font-size:27px}
 .win{padding:16px}
 .games-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:24px 14px;gap:24px 14px}
 .game h3{font-size:14px}
 .game .english{font-size:11px}
 .game-meta .tag{margin-left:10px}
 .game-name .hand,.news-link .hand{display:none}
 .game-link:hover h3{transform:none}
 .frame .ver{top:4px;left:4px;font-size:10px;padding:0 4px}
 .steps li+li:before{display:none}
 .steps li{margin:4px 0 4px 18px}
 .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
 .reading{padding:22px 18px 24px}
 .reading h2{font-size:19px}
 .news-list{padding:2px 14px}
 .reading p,.reading li{font-size:16px;line-height:1.95}
 .news-thumb{width:84px;margin-left:14px}
 .news-thumb-empty{height:63px}
 .news-title{font-size:15px}
 .news-summary{display:none}
 .resource-name .hand{display:none}
 .dad-art{width:54px;height:45px;margin-left:8px}
 .footer-bottom{display:block}
 details dl{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:no-preference){
 .game-link:hover .frame img{transform:scale(1.04)}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
