:root{color-scheme:light;--ink:#172b39;--muted:#687784;--blue:#1769c2;--line:#dce5eb;--surface:#fff}
*{box-sizing:border-box}body{margin:0;background:linear-gradient(160deg,#fbfcff,#eef3f5);color:var(--ink);font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;min-height:100vh}
a{color:var(--blue);text-decoration:none}button,input{font:inherit}button,.button{display:inline-flex;justify-content:center;align-items:center;gap:24px;border:1px solid transparent;border-radius:10px;background:var(--blue);color:#fff;padding:10px 20px;font-weight:600;cursor:pointer}button:hover,.button:hover{background:#10549d}button:disabled{opacity:.5;cursor:wait}.secondary{background:#fff;color:var(--ink);border-color:var(--line)}.secondary:hover{background:#eef3f8}.shell{max-width:1220px;margin:0 auto;padding:34px 26px}.header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:25px;border-bottom:1px solid var(--line)}h1,h2,p{margin:0}h1{font-size:34px;line-height:1.25;letter-spacing:-.7px}h2{font-size:26px;line-height:1.35}.eyebrow{font-size:12px;font-weight:700;letter-spacing:1px;color:#18756c;margin-bottom:8px}.navigation{display:flex;align-items:center;gap:18px;font-size:14px;flex-wrap:wrap}.navigation form{margin:0}.muted{color:var(--muted)}.panel{background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 15px 45px #263f4f0a}.locked{max-width:450px;margin:65px auto 60px;padding:36px}.lock-symbol{width:52px;height:52px;display:grid;place-items:center;border-radius:15px;background:#e6f0fb;color:var(--blue);font-size:25px;margin-bottom:26px}.locked .muted{font-size:14px;margin-top:12px}.login-form{display:flex;flex-direction:column;gap:10px;margin-top:28px}.login-form label{font-size:14px;font-weight:600}.login-form input{width:100%;padding:10px 13px;border:1px solid #c7d4df;border-radius:9px;background:#f9fbfc;color:var(--ink)}.login-form input:focus{outline:3px solid #dceafb;border-color:var(--blue)}.login-form button{margin-top:9px}.error{margin-top:15px;color:#b42318;font-size:14px}.intro{margin:35px 0 25px}.intro .muted{margin-top:8px}.collection{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:24px}.game-card{overflow:hidden;max-width:560px}.cover-link{display:block;background:#637c35}.game-card img{display:block;width:100%;aspect-ratio:695/500;object-fit:cover}.card-content{padding:25px}.card-content .muted{margin:12px 0 23px;font-size:14px;line-height:1.8}.game-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin:24px 0 18px}.game-heading .muted{font-size:13px;max-width:450px}.game-panel{padding:12px;border-radius:14px}#game{width:min(100%,1050px,max(320px,calc((100vh - 275px)*1.39)));margin:0 auto;background:#111;overflow:hidden}ruffle-player{display:block;width:100%;height:100%}.game-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 5px 3px;font-size:12px;color:var(--muted)}.game-toolbar>div{display:flex;gap:10px}.game-toolbar button{font-size:13px;padding:7px 14px}footer{font-size:12px;color:#788590;text-align:center;margin-top:40px}.playing footer{margin-top:18px}
@media(max-width:650px){.shell{padding:20px 15px}.header{align-items:flex-start;flex-direction:column;padding-bottom:18px}h1{font-size:29px}.navigation{gap:13px;font-size:13px}.locked{margin:30px auto;padding:26px}.game-heading{align-items:flex-start;flex-direction:column;gap:12px}.game-heading h2{font-size:23px}.game-toolbar{align-items:flex-start;flex-direction:column}#game{width:100%}.game-panel{padding:5px}.game-toolbar button{padding:6px 12px}.card-content{padding:21px}}

/* Playback menu sits directly under the original game's menu row. */
#game-stage{width:100%;aspect-ratio:695/500;min-height:0;background:#111}
.speed-menu{display:flex;align-items:center;gap:6px;min-height:40px;padding:6px 10px;background:#252b20;color:#d9dec5;font-size:12px;flex-wrap:wrap}
.speed-label{color:#aeb799;font-weight:600;margin-right:4px}.speed-menu button{border:1px solid #626c50;border-radius:5px;background:#363e2c;color:#e6ead7;padding:3px 12px;font-size:12px;line-height:1.5;min-height:26px;gap:0}.speed-menu button:hover{background:#4a583a}.speed-menu button.active{background:#d9c67c;border-color:#f6df85;color:#25291d}.speed-current{margin-left:auto;font-size:11px;color:#aeb799}.speed-current strong{color:#e5d59a}
#game:is(:fullscreen,:-webkit-full-screen){width:100%;height:100%;max-width:none;background:#111;display:flex;flex-direction:column;justify-content:center;align-items:center;overflow:hidden}
#game:is(:fullscreen,:-webkit-full-screen) #game-stage{flex:none;width:min(100%,calc((100vh - 56px)*1.39));max-height:calc(100vh - 56px)}
#game:is(:fullscreen,:-webkit-full-screen) .speed-menu{width:min(100%,calc((100vh - 56px)*1.39));flex:none}
@media(max-width:650px){.speed-menu{padding:6px;gap:5px}.speed-menu button{padding:3px 10px}.speed-label{margin-right:0}.speed-current{font-size:10px}}

@media(min-width:651px){.shell.playing{padding-top:20px}.playing .header{padding-bottom:16px}.playing h1{font-size:28px}.playing .game-heading{margin:18px 0 14px}.playing #game:not(:fullscreen){width:min(100%,1050px,max(320px,calc((100vh - 305px)*1.39)))}}

.native-game-frame{display:block;width:100%;height:max(630px,calc(100dvh - 240px));border:0;border-radius:8px;background:#151a14}.native-panel{overflow:hidden}.native-panel .game-toolbar a{font-weight:600;padding:8px}
@media(max-width:650px){.native-game-frame{height:780px}.native-panel .game-toolbar{padding:10px}}

/* Tank TD presentation: scoped so the collection and Flash games stay unchanged. */
body.tank-page{background:radial-gradient(ellipse at 20% 0%,#26362b 0,transparent 55%),#0e1512;color:#e8eee2;--ink:#e8eee2;--muted:#a8b5a6;--line:#344438;--blue:#d6e6a6;--surface:#111917;color-scheme:dark}.tank-page .shell{max-width:1360px;padding:18px 30px}.tank-page .header{padding-bottom:14px;border-bottom:1px solid #334335}.tank-page .header>div{display:flex;align-items:center;gap:14px}.tank-page .header .eyebrow{margin:0;color:#a8bd91;font-size:10px;letter-spacing:2px}.tank-page .header h1{font-size:17px;letter-spacing:1px}.tank-page .navigation{font-size:12px;gap:20px}.tank-page .navigation a{color:#b9c7af}.tank-page .secondary{border-color:#45553e;background:transparent;color:#d5dfca;font-size:11px;padding:6px 12px;border-radius:7px}.tank-page .secondary:hover{background:#30402d}.tank-page .game-heading{margin:20px 0 16px;align-items:center}.tank-page .game-heading h2{font-size:22px;letter-spacing:.5px}.tank-page .game-heading .eyebrow{color:#a9be89;font-size:10px;margin-bottom:5px}.tank-page .game-heading .muted{font-size:12px;max-width:340px;line-height:1.8}.tank-page .game-panel{padding:0;border:1px solid #3c4d3d;border-radius:16px;box-shadow:0 18px 70px #0003;overflow:hidden}.tank-page .native-game-frame{border-radius:0;background:#111917;height:1000px;min-height:0}.tank-page .game-toolbar{padding:12px 24px;border-top:1px solid #334335;background:#18231c;color:#9cac96}.tank-page .game-toolbar a{color:#d6e6a6;padding:3px 0}.tank-page .shell>footer{margin:18px 0 0;color:#8d9e86;font-size:10px}
@media(max-width:720px){.tank-page .shell{padding:14px 10px}.tank-page .header{gap:12px;align-items:flex-start;flex-direction:column;padding:0 4px 12px}.tank-page .header h1{font-size:16px}.tank-page .navigation{width:100%;font-size:11px;gap:16px}.tank-page .navigation form{margin-left:auto}.tank-page .game-heading{margin:16px 4px 12px;gap:8px;align-items:flex-start;flex-direction:column}.tank-page .game-heading h2{font-size:20px}.tank-page .game-heading .muted{font-size:11px;max-width:none}.tank-page .game-panel{border-radius:12px}.tank-page .game-toolbar{padding:12px 14px;font-size:11px;gap:5px}.tank-page .native-game-frame{height:1380px}}
/* The game's light switch also updates its surrounding page. */
[data-theme=light] body.tank-page{background:radial-gradient(ellipse at 20% 0%,#e3ebd8 0,transparent 55%),#f3f5ee;color:#273a24;--ink:#273a24;--muted:#5c7053;--line:#c7d3bc;--blue:#4b6d30;--surface:#fffef8;color-scheme:light}[data-theme=light] .tank-page .header{border-color:#c7d3bc}[data-theme=light] .tank-page .header .eyebrow,[data-theme=light] .tank-page .game-heading .eyebrow{color:#647d48}[data-theme=light] .tank-page .navigation a{color:#526b3d}[data-theme=light] .tank-page .secondary{border-color:#b4c5a3;color:#415a30;background:#f9fbf4}[data-theme=light] .tank-page .secondary:hover{background:#e0eacd}[data-theme=light] .tank-page .game-panel{border-color:#bacbaa;box-shadow:0 18px 60px #35472910}[data-theme=light] .tank-page .native-game-frame{background:#f1f4ec}[data-theme=light] .tank-page .game-toolbar{background:#e9efdf;border-color:#c4d1b8;color:#637651}[data-theme=light] .tank-page .game-toolbar a{color:#45682b}[data-theme=light] .tank-page .shell>footer{color:#6b7e5b}
@media(max-width:720px){.tank-page .shell{padding:8px 6px}.tank-page .header{flex-direction:row;align-items:center;padding:0 2px 6px;gap:6px}.tank-page .header h1{display:none}.tank-page .header .eyebrow{font-size:9px;letter-spacing:1px;white-space:nowrap}.tank-page .navigation{width:auto;margin-left:auto;font-size:10px;gap:10px}.tank-page .navigation>a:first-child{display:none}.tank-page .secondary{padding:4px 8px;font-size:10px}.tank-page .game-heading{margin:8px 3px;display:block}.tank-page .game-heading .eyebrow,.tank-page .game-heading .muted{display:none}.tank-page .game-heading h2{font-size:16px;line-height:20px}.tank-page .game-panel{border-radius:9px}}
