/* TechyGo — robin's-egg blue, yolk yellow, deep ink. Fonts are self-hosted (SIL OFL). */
@font-face{font-family:"Bagel Fat One";src:url(fonts/bagel-fat-one.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Nunito";src:url(fonts/nunito.woff2) format("woff2");font-weight:200 1000;font-display:swap}

:root{
  --bg:#f2faf9; --surface:#fff; --ink:#10283a; --muted:#56707f; --line:#d5e9e7;
  --robin:#4fd3c9; --robin-deep:#0a6f6a; --yolk:#ffc83d; --yolk-deep:#d99a00;
  --link:#0a6f6a; --focus:#5b3df5; --danger:#c62f3b; --ok:#147a4b;
  --display:"Bagel Fat One","Arial Rounded MT Bold",ui-rounded,system-ui,sans-serif;
  --text:"Nunito",ui-rounded,system-ui,-apple-system,"Segoe UI",sans-serif;
  --r-s:10px; --r-m:18px; --r-l:28px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme=light]){
    --bg:#0b1d28; --surface:#13303f; --ink:#eaf7f6; --muted:#9bb6c1; --line:#234656;
    --link:#74e4da; --focus:#ffc83d; --danger:#ff8b93; --ok:#6fdca6; color-scheme:dark;
  }
}
:root[data-theme=dark]{
  --bg:#0b1d28; --surface:#13303f; --ink:#eaf7f6; --muted:#9bb6c1; --line:#234656;
  --link:#74e4da; --focus:#ffc83d; --danger:#ff8b93; --ok:#6fdca6; color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:500 1rem/1.6 var(--text)}
img,svg{display:block;max-width:100%}
img{height:auto}
a{color:inherit;text-decoration:none}
h1,h2,h3,p,ol,ul{margin:0}
ol,ul{padding:0;list-style:none}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:6px}
[hidden]{display:none!important}

.wrap{max-width:1152px;margin-inline:auto;padding-inline:20px}
.skip{position:absolute;left:12px;top:-60px;background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:var(--r-s);z-index:99;font-weight:800}
.skip:focus{top:12px}

h1,.h-sec{font-family:var(--display);font-weight:400;line-height:1.05;letter-spacing:.005em}
h1{font-size:clamp(1.9rem,1.2rem + 3vw,3.1rem)}
.h-sec{font-size:clamp(1.35rem,1.1rem + 1vw,1.7rem)}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:999px;
  border:2px solid var(--line);background:var(--surface);color:var(--ink);font-weight:800;cursor:pointer;white-space:nowrap}
.btn:hover{border-color:var(--ink)}
.btn svg{width:18px;height:18px;flex:none}
.btn.play{background:var(--yolk);border-color:var(--yolk);color:#10283a;box-shadow:0 4px 0 var(--yolk-deep);transition:transform .08s,box-shadow .08s}
.btn.play:hover{border-color:var(--yolk)}
.btn.play:active{transform:translateY(3px);box-shadow:0 1px 0 var(--yolk-deep)}
.btn.big{min-height:54px;padding:0 26px;font-size:1.1rem}
.btn.icon{width:44px;padding:0}
.btn.danger{color:var(--danger)}
.btn.danger:hover{border-color:var(--danger)}
.btn.sm{min-height:36px;padding:0 14px;font-size:.9rem}

/* ---------- header ---------- */
.top{background:var(--surface);border-bottom:1px solid var(--line)}
.top-in{display:flex;align-items:center;gap:12px;padding-block:12px}
.logo{display:inline-flex;align-items:center;gap:10px;font-family:var(--display);font-size:1.45rem;line-height:1;margin-right:auto;white-space:nowrap}
.logo svg{width:30px;height:36px;flex:none}
.search{position:relative;flex:0 1 380px}
.search svg{position:absolute;left:14px;top:50%;width:18px;height:18px;margin-top:-9px;color:var(--muted);pointer-events:none}
.search input{width:100%;height:44px;padding:0 16px 0 42px;border-radius:999px;border:2px solid var(--line);background:var(--bg)}
.search input::placeholder{color:var(--muted)}
.search input:focus{outline:0;border-color:var(--ink);background:var(--surface)}
.cats{border-top:1px solid var(--line)}
.cats ul{display:flex;gap:8px;overflow-x:auto;padding-block:10px;scrollbar-width:none}
.cats ul::-webkit-scrollbar{display:none}
.chip{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 14px;border-radius:999px;font-weight:700;white-space:nowrap;border:2px solid transparent}
.chip:hover{background:var(--bg)}
.chip[aria-current]{background:var(--ink);color:var(--bg)}
.dot{width:10px;height:10px;border-radius:50%;background:var(--k,var(--robin));flex:none;display:inline-block}
@media (max-width:720px){
  .top-in{flex-wrap:wrap}
  .search{order:5;flex:1 0 100%}
  .btn .lbl-wide{display:none}
  .top .btn.rand{width:44px;padding:0}
}

main{padding-block:24px 56px;min-height:60vh}
section,.block{margin-top:44px}
.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:16px}
.more{font-weight:800;color:var(--link);white-space:nowrap}
.more:hover,.prose a:hover,.crumbs a:hover,.foot a:hover{text-decoration:underline;text-underline-offset:3px}

/* ---------- hero ---------- */
.hero{margin-top:0;display:grid;grid-template-columns:1.25fr 1fr;gap:32px;align-items:center;padding:clamp(24px,5vw,56px);border-radius:var(--r-l);color:#10283a;
  background-color:var(--robin);
  background-image:radial-gradient(circle,rgba(16,40,58,.16) 2.5px,transparent 3px),radial-gradient(circle,rgba(16,40,58,.12) 4px,transparent 4.5px),radial-gradient(circle,rgba(255,255,255,.35) 3px,transparent 3.5px);
  background-size:67px 83px,131px 113px,97px 149px;background-position:11px 17px,53px 71px,29px 5px}
.hero p{font-size:1.1rem;max-width:46ch;margin-top:14px;font-weight:600}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.hero .btn:not(.play){background:#fff;border-color:#fff;color:#10283a}
.hero .btn:not(.play):hover{border-color:#10283a}
.hero :focus-visible{outline-color:#10283a}
.hero-game{display:block;position:relative;background:#fff;color:#10283a;border-radius:var(--r-m);padding:12px 12px 16px;transform:rotate(2deg);box-shadow:0 10px 0 rgba(16,40,58,.18);transition:transform .15s}
.hero-game:hover{transform:rotate(0)}
.hero-game img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:12px}
.hero-game b{display:block;font-family:var(--display);font-weight:400;font-size:1.4rem;line-height:1.1;margin:14px 6px 4px}
.hero-game span{display:block;margin-inline:6px;color:#3f5a69;font-size:.95rem;line-height:1.45}
.tag{display:inline-block;background:var(--yolk);color:#10283a;font-weight:800;font-size:.8rem;padding:3px 10px;border-radius:999px}
.hero-game .tag{position:absolute;top:22px;left:22px;margin:0;display:inline-block}
@media (max-width:820px){
  .hero{grid-template-columns:1fr;gap:24px}
  .hero p{font-size:1rem}
  .hero-game{display:flex;align-items:center;gap:14px;padding:10px;transform:none;box-shadow:0 6px 0 rgba(16,40,58,.18)}
  .hero-game img{width:112px;flex:none}
  .hero-game b{margin:22px 0 0;font-size:1.2rem}
  .hero-game span:not(.tag){display:none}
  .hero-game .tag{top:16px;left:136px}
}

/* ---------- game cards ---------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:22px 16px}
.card{display:block;border-radius:var(--r-m)}
.thumb{display:block;position:relative;aspect-ratio:4/3;border-radius:var(--r-m);overflow:hidden;background:var(--k,var(--robin));transition:transform .15s,box-shadow .15s}
.thumb img{width:100%;height:100%;object-fit:cover}
.card:hover .thumb,.card:focus-visible .thumb{transform:translateY(-4px);box-shadow:0 6px 0 var(--k,var(--robin))}
.card b{display:block;margin-top:10px;font-weight:800;line-height:1.25}
.card small{display:flex;align-items:center;gap:6px;margin-top:3px;color:var(--muted);font-size:.85rem;font-weight:600}
.card small span{margin-left:auto}
@media (max-width:640px){
  .grid.row{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:44%;overflow-x:auto;scroll-snap-type:x mandatory;margin-inline:-20px;padding:6px 20px 8px;scroll-padding-inline:20px;scrollbar-width:none}
  .grid.row::-webkit-scrollbar{display:none}
  .grid.row>*{scroll-snap-align:start}
  .grid{grid-template-columns:repeat(2,1fr)}
}

/* ---------- ranked list ---------- */
.ranks{display:grid;grid-template-columns:repeat(3,1fr);gap:12px 20px}
.rank{display:flex;align-items:center;gap:14px;padding:10px 14px 10px 10px;border-radius:var(--r-m);background:var(--surface);border:1px solid var(--line)}
.rank:hover{border-color:var(--ink)}
.rank .n{font-family:var(--display);font-size:2rem;line-height:1;width:1.3em;text-align:center;color:var(--muted);flex:none}
.ranks li:nth-child(-n+3) .n{color:var(--yolk-deep)}
.rank img{width:76px;height:auto;aspect-ratio:4/3;object-fit:cover;border-radius:12px;flex:none}
.rank b{display:block;font-weight:800;line-height:1.2}
.rank small{color:var(--muted);font-weight:600;font-size:.85rem}
@media (max-width:900px){.ranks{grid-template-columns:repeat(2,1fr)}}
@media (max-width:600px){.ranks{grid-template-columns:1fr}}

/* ---------- category header ---------- */
.cat-head{margin-top:16px;display:flex;align-items:center;gap:20px;padding:clamp(20px,4vw,36px);border-radius:var(--r-l);background:color-mix(in srgb,var(--k) 16%,var(--surface));border:1px solid color-mix(in srgb,var(--k) 35%,var(--surface))}
.cat-ico{font-size:2.6rem;line-height:1;width:84px;height:84px;display:grid;place-items:center;border-radius:50%;background:var(--k);flex:none}
.cat-head p{margin-top:8px;max-width:60ch}
.count{color:var(--muted);font-weight:700}
@media (max-width:600px){.cat-ico{width:60px;height:60px;font-size:1.8rem}.cat-head{align-items:flex-start;gap:14px}}

/* ---------- breadcrumbs ---------- */
.crumbs ol{display:flex;flex-wrap:wrap;gap:6px;color:var(--muted);font-weight:700;font-size:.9rem}
.crumbs li+li::before{content:"/";margin-right:6px;opacity:.6}
.crumbs a{color:var(--link)}

/* ---------- game page ---------- */
.stage{margin-top:14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-l);padding:10px}
.player{position:relative;aspect-ratio:16/9;background:#101426;border-radius:20px;overflow:hidden}
.player iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.player .exit{position:absolute;top:10px;right:10px;z-index:2;display:none}
.player.fill{position:fixed;inset:0;z-index:60;border-radius:0;aspect-ratio:auto;max-height:none}
.player.fill .exit{display:inline-flex}
body.lock{overflow:hidden}
.bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 20px;padding:16px 10px 8px}
.bar h1{font-size:clamp(1.4rem,1rem + 1.6vw,2rem)}
.bar .meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:8px;color:var(--muted);font-weight:700;font-size:.92rem}
.bar .meta a{display:inline-flex;align-items:center;gap:6px;color:var(--ink)}
.bar-actions{display:flex;flex-wrap:wrap;gap:8px}
@media (max-width:700px){
  .stage{margin-inline:-12px;padding:8px;border-radius:22px}
  .player{aspect-ratio:3/4;max-height:74svh;width:100%}
  .bar-actions{width:100%}.bar-actions .btn{flex:1;padding:0 10px}
}
.cols{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:40px;margin-top:36px;align-items:start}
@media (max-width:900px){.cols{grid-template-columns:1fr}}
.howto{background:color-mix(in srgb,var(--yolk) 22%,var(--surface));border-radius:var(--r-m);padding:20px 22px;margin-bottom:28px}
.prose .howto h2{font:800 1.1rem/1.3 var(--text);margin:0 0 6px}
.side h2{margin-bottom:14px}
.side ul{display:grid;gap:10px}

/* ---------- prose ---------- */
.prose{max-width:68ch;font-size:1.06rem;line-height:1.7}
.prose h1{margin-bottom:16px}
.prose h2{font:800 1.3rem/1.3 var(--text);margin:32px 0 8px}
.prose p{margin-top:14px}
.prose a{color:var(--link);font-weight:700;text-decoration:underline;text-underline-offset:3px}
.date{color:var(--muted);font-weight:700;font-size:.92rem}
.page-head{margin-top:8px}
.page-head p{margin-top:10px;color:var(--muted);font-size:1.1rem;max-width:60ch}

/* ---------- blog ---------- */
.posts{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.post{display:flex;flex-direction:column;gap:8px;padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-m)}
.post:hover{border-color:var(--ink)}
.post b{font-weight:800;font-size:1.15rem;line-height:1.3}
.post span{color:var(--muted);font-size:.95rem;line-height:1.5}
.post small{margin-top:auto;padding-top:6px;color:var(--muted);font-weight:700}

/* ---------- ads ---------- */
.ad{margin:32px 0;min-height:110px;text-align:center}
.ad::before{content:"Advertisement";display:block;font-size:.72rem;color:var(--muted);margin-bottom:4px}

/* ---------- forms ---------- */
.form{max-width:620px;display:grid;gap:18px}
.form.card-box,.box{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-l);padding:clamp(20px,4vw,32px)}
.field{display:grid;gap:6px}
.field>span,.field>label{font-weight:800}
.field small{color:var(--muted);font-weight:600;line-height:1.4}
.form input:not([type=checkbox]):not([type=file]),.form select,.form textarea{width:100%;padding:11px 14px;border-radius:var(--r-s);border:2px solid var(--line);background:var(--bg)}
.form input:focus,.form select:focus,.form textarea:focus{outline:0;border-color:var(--focus)}
.form textarea{resize:vertical;line-height:1.5}
.check{display:flex;align-items:center;gap:10px;font-weight:800}
.check input{width:20px;height:20px;accent-color:var(--robin-deep)}
.hp{position:absolute;left:-9999px}
.note{padding:12px 16px;border-radius:var(--r-s);font-weight:700;border:2px solid;margin-bottom:18px;max-width:620px}
.note.ok{color:var(--ok);background:color-mix(in srgb,var(--ok) 10%,var(--surface))}
.note.err{color:var(--danger);background:color-mix(in srgb,var(--danger) 10%,var(--surface))}
.login{max-width:400px;margin:6vh auto 0}

/* ---------- empty states ---------- */
.empty{text-align:center;padding:48px 20px;background:var(--surface);border:2px dashed var(--line);border-radius:var(--r-l);margin-top:20px}
.empty p{color:var(--muted);margin:8px auto 18px;max-width:44ch}
.empty .h-sec{font-size:1.5rem}

/* ---------- admin ---------- */
.tabs{display:flex;gap:6px;overflow-x:auto;margin-bottom:28px;padding-bottom:4px}
.tabs .sp{margin-left:auto}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:20px 0 28px}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-m);padding:16px 20px}
.stat b{display:block;font-family:var(--display);font-weight:400;font-size:2rem;line-height:1.1}
.stat span{color:var(--muted);font-weight:700}
.table-wrap{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-m);overflow-x:auto}
table{width:100%;border-collapse:collapse}
th,td{padding:12px 16px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}
th{font-size:.85rem;color:var(--muted);font-weight:800}
tr:last-child td{border-bottom:0}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
td .t{display:flex;align-items:center;gap:12px;min-width:220px}
td .t img{width:56px;height:auto;aspect-ratio:4/3;object-fit:cover;border-radius:8px;flex:none}
td .t small{display:block;color:var(--muted)}
td.acts{white-space:nowrap;text-align:right}
td.acts form{display:inline}
.admin-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}

/* ---------- footer ---------- */
.foot{border-top:1px solid var(--line);background:var(--surface);padding-block:40px 28px}
.foot-in{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:32px}
.foot p{color:var(--muted);max-width:38ch;margin-top:10px}
.foot h2{font:800 .95rem/1.3 var(--text);margin-bottom:10px}
.foot li a{display:inline-block;padding:4px 0;color:var(--muted);font-weight:600}
.foot li a:hover{color:var(--ink)}
.foot .two{columns:2}
.foot .legal{max-width:none;margin-top:28px;padding-top:18px;border-top:1px solid var(--line);color:var(--muted);font-size:.9rem}
@media (max-width:720px){.foot-in{grid-template-columns:1fr 1fr}.foot-in>div:first-child{grid-column:1/-1}}

/* ---------- cookie notice ---------- */
.cookie{position:fixed;left:16px;right:16px;bottom:16px;z-index:50;max-width:560px;margin-inline:auto;background:var(--ink);color:var(--bg);border-radius:var(--r-m);padding:18px 20px;box-shadow:0 12px 32px rgba(0,0,0,.3)}
.cookie p{font-weight:600;line-height:1.45}
.cookie a{text-decoration:underline;text-underline-offset:3px}
.cookie div{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.cookie .btn:not(.play){background:transparent;color:inherit;border-color:color-mix(in srgb,var(--bg) 40%,transparent)}
.cookie :focus-visible{outline-color:var(--yolk)}

@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media (min-width:901px){.side{position:sticky;top:20px}}
.mail{color:var(--link);font-weight:700;text-decoration:underline;text-underline-offset:3px}
