:root {
  color-scheme: light;
  --paper: #f2f0e8;
  --panel: #fbfaf4;
  --ink: #171914;
  --muted: #73766d;
  --line: rgba(23, 25, 20, .2);
  --fine: rgba(23, 25, 20, .08);
  --orange: #ff5636;
  --yellow: #f2d64b;
  --blue: #5c88ff;
  --green: #b8ff4e;
  --purple: #9b7bff;
  --shadow: 0 24px 65px rgba(31, 32, 25, .08);
  --sans: "Segoe UI Variable Text", "Aptos", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Segoe UI Variable Display", "Aptos Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #11130f;
  --panel: #191c17;
  --ink: #f3f1e7;
  --muted: #aeb2a7;
  --line: rgba(243, 241, 231, .24);
  --fine: rgba(243, 241, 231, .08);
  --orange: #ff7154;
  --yellow: #f1da58;
  --blue: #769cff;
  --green: #baff55;
  --purple: #aa91ff;
  --shadow: 0 24px 65px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 16px; padding: 10px 14px; background: var(--ink); color: var(--paper); text-decoration: none; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header, main, .site-footer { width: min(1440px, calc(100% - 40px)); margin-inline: auto; }
.site-header { height: 72px; display: grid; grid-template-columns: 1fr auto auto; gap: 28px; align-items: center; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-size: .9rem; font-weight: 720; text-decoration: none; letter-spacing: -.02em; }
.brand img { width: auto; height: 32px; flex: none; object-fit: contain; }
.brand small { display: inline-flex; align-items: center; gap: .45em; color: var(--muted); font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em; }
.site-header nav { display: flex; gap: 24px; justify-self: end; }
.site-header nav a { color: var(--muted); font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }
.header-controls { display: flex; align-items: center; gap: 7px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; transition: transform .2s, background-color .2s; }
.icon-button:hover { transform: rotate(-7deg) scale(1.05); background: var(--panel); }
.menu-toggle { display: none; }
.menu-toggle svg path { transform-origin: center; transition: transform .18s ease, opacity .18s ease; }
.site-header[data-menu-open="true"] .menu-toggle svg path:first-child { transform: translateY(5px) rotate(45deg); }
.site-header[data-menu-open="true"] .menu-toggle svg path:nth-child(2) { opacity: 0; }
.site-header[data-menu-open="true"] .menu-toggle svg path:last-child { transform: translateY(-5px) rotate(-45deg); }
.language-button { font-family: var(--mono); font-size: .75rem; }
.icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.moon, html[data-theme="dark"] .sun { display: none; }
html[data-theme="dark"] .moon { display: block; }

.intro { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(36px, 7vw, 110px); align-items: start; padding: 24px 4px 36px; }
.intro-main { align-self: stretch; display: grid; grid-template-rows: auto 1fr; }
.eyebrow { margin: 0; color: var(--muted); font: .75rem/1.5 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.signal-dot { display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 1px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px color-mix(in srgb, var(--orange) 15%, transparent); }
.intro h1 { align-self: center; margin: 0; font: 650 clamp(2rem, 3.6vw, 3.1rem)/1.12 var(--display); letter-spacing: -.05em; }
.title-mark { display: inline; margin-left: .18em; }
.title-period { color: var(--orange); }
.intro-side { display: grid; gap: 28px; padding-bottom: 4px; }
.intro-side > p { max-width: 410px; margin: 0; padding-left: 24px; border-left: 2px solid var(--orange); font-size: clamp(1rem, 1.4vw, 1.17rem); line-height: 1.75; }
.intro-count { display: flex; align-items: center; gap: 17px; padding-top: 20px; border-top: 1px solid var(--line); }
.intro-count strong { font: 680 2.8rem/.9 var(--display); letter-spacing: -.07em; }
.intro-count span { color: var(--muted); font-size: .83rem; line-height: 1.6; }

.collection { padding-bottom: 56px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 0 4px 22px; }
.section-heading h2 { margin: 8px 0 0; font: 650 clamp(1.6rem, 2.3vw, 2.1rem)/1.2 var(--display); letter-spacing: -.04em; }
.section-number { color: var(--muted); font: .8rem var(--mono); letter-spacing: .08em; white-space: nowrap; }
.section-number span { margin-left: 22px; color: var(--orange); font: 1.4rem var(--sans); }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.game-card { min-width: 0; }
.game-link { height: 100%; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); text-decoration: none; box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.game-link:hover { transform: translateY(-5px); border-color: var(--ink); box-shadow: 0 28px 70px rgba(31, 32, 25, .14); }
.game-link:focus-visible { outline-offset: 3px; }
.art { position: relative; height: clamp(165px, 14vw, 215px); overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.art-code, .art-corner { position: absolute; z-index: 5; color: inherit; font: .7rem/1.4 var(--mono); letter-spacing: .08em; }
.art-code { top: 17px; left: 18px; }
.art-corner { right: 18px; bottom: 16px; text-align: right; }
.card-content { display: flex; flex: 1; flex-direction: column; padding: 18px 18px 17px; }
.card-topline { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font: .72rem var(--mono); letter-spacing: .05em; }
.card-content h3 { margin: 13px 0 8px; font: 680 clamp(1.7rem, 2vw, 2rem)/1.1 var(--display); letter-spacing: -.05em; }
.description { min-height: 3.4em; margin: 0 0 23px; color: var(--ink); font-size: 1rem; line-height: 1.7; }
.details { display: grid; gap: 11px; margin: auto 0 0; padding: 17px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.details div { display: grid; grid-template-columns: 53px minmax(0, 1fr); gap: 9px; align-items: start; }
.details dt { color: var(--muted); font: .73rem/1.65 var(--mono); white-space: nowrap; }
.details dd { min-width: 0; margin: 0; font-size: .875rem; line-height: 1.6; overflow-wrap: anywhere; }
.play-link { display: flex; align-items: center; justify-content: space-between; padding-top: 17px; color: var(--orange); font: 600 .8rem/1.5 var(--mono); }
.play-link > span:last-child { color: var(--orange); font: 1rem/1 var(--sans); transition: transform .2s; }
.game-link:hover .play-link > span:last-child { transform: translate(3px, -3px); }

.art-ghostnn { color: #171914; background: radial-gradient(circle at 52% 52%, #d1c6ff 0 10%, transparent 47%), linear-gradient(130deg, #a597fb, #ebe5ff); }
.art-ghostnn::before { content: ""; position: absolute; inset: 0; opacity: .4; background: linear-gradient(rgba(59, 43, 121, .24) 1px, transparent 1px), linear-gradient(90deg, rgba(59, 43, 121, .24) 1px, transparent 1px); background-size: 30px 30px; transform: perspective(300px) rotateX(24deg) scale(1.3); }
.network { position: absolute; inset: 0; }
.network::before, .network::after { content: ""; position: absolute; height: 2px; background: #594cad; transform-origin: left center; opacity: .65; }
.network::before { top: 45%; left: 7%; width: 89%; transform: rotate(10deg); }
.network::after { top: 68%; left: 18%; width: 71%; transform: rotate(-33deg); }
.network i { position: absolute; width: 13px; height: 13px; border: 3px solid #584bb2; border-radius: 50%; background: #e9e2ff; box-shadow: 0 0 0 5px rgba(255,255,255,.45); }
.network i:nth-child(1) { top: 43%; left: 7%; }.network i:nth-child(2) { top: 55%; left: 25%; }.network i:nth-child(3) { top: 62%; left: 70%; }.network i:nth-child(4) { top: 31%; left: 84%; }.network i:nth-child(5) { top: 72%; left: 18%; }.network i:nth-child(6) { top: 21%; left: 61%; }
.ghost { position: absolute; z-index: 2; top: 27%; left: 43%; width: 76px; height: 90px; border: 2px solid #171914; border-radius: 42px 42px 10px 10px; background: #fffdfa; box-shadow: 12px 13px 0 rgba(58, 42, 126, .23); transform: rotate(-8deg); clip-path: polygon(0 0,100% 0,100% 95%,84% 87%,67% 100%,50% 87%,33% 100%,15% 87%,0 96%); }
.ghost i { position: absolute; top: 36px; width: 7px; height: 10px; border-radius: 50%; background: #171914; }.ghost i:first-child { left: 22px; }.ghost i:last-child { right: 22px; }
.art-link { color: #e7eeff; background: radial-gradient(circle at 55% 52%, #223f9e, transparent 46%), linear-gradient(145deg, #0d1a3d, #11122d); }
.art-link::before { content: ""; position: absolute; inset: -20%; opacity: .5; background: linear-gradient(rgba(100, 147, 255, .15) 1px, transparent 1px), linear-gradient(90deg, rgba(100, 147, 255, .15) 1px, transparent 1px); background-size: 34px 34px; transform: rotate(-12deg); }
.circuit { position: absolute; border: 2px solid #5d96ff; opacity: .8; filter: drop-shadow(0 0 6px #5d96ff); }
.circuit-a { top: 42%; left: -6%; width: 57%; height: 23%; border-left: 0; border-bottom: 0; border-radius: 0 20px 0 0; }.circuit-b { top: 28%; right: -9%; width: 58%; height: 34%; border-right: 0; border-top: 0; border-radius: 0 0 0 20px; }.circuit-c { left: 21%; bottom: -5%; width: 53%; height: 27%; border-bottom: 0; border-right: 0; border-radius: 20px 0 0 0; }
.packet { position: absolute; z-index: 3; top: 47%; left: 48%; width: 34px; height: 34px; border: 2px solid #fff; background: var(--yellow); box-shadow: 0 0 0 9px rgba(242,214,75,.14), 0 0 30px rgba(242,214,75,.7); transform: rotate(45deg); }
.art-shift { color: #fff2df; background: linear-gradient(90deg, rgba(9,15,18,.5), transparent 65%), radial-gradient(circle at 66% 58%, #a85336 0 5%, #3c2e31 40%, #141b20 85%); }
.art-shift::before { content: ""; position: absolute; inset: 0; opacity: .25; background: repeating-linear-gradient(90deg, transparent 0 45px, #eab278 46px 47px, transparent 48px 90px); }
.arch { position: absolute; bottom: -30%; width: 42%; height: 105%; border: 19px solid #987158; border-bottom: 0; border-radius: 48% 48% 0 0; box-shadow: inset 0 0 20px #0c1014; }.arch-back { right: 16%; transform: scale(.75); opacity: .48; }.arch-front { right: -4%; }
.shift-light { position: absolute; right: 31%; top: 8%; width: 65px; height: 230px; background: linear-gradient(rgba(255,220,158,.72), transparent); filter: blur(17px); transform: rotate(22deg); }
.shift-title { position: absolute; z-index: 3; top: 35%; left: 12%; font: 800 clamp(2.7rem, 4vw, 4.4rem)/.9 var(--display); letter-spacing: -.075em; text-shadow: 4px 5px 0 #111b1c; }
.art-spell { color: #e9eaff; background: radial-gradient(circle at center, #5754bc 0 9%, #242564 46%, #17182e 90%); }
.art-spell::before { content: ""; position: absolute; inset: 0; opacity: .46; background: repeating-conic-gradient(from 0deg at 50% 51%, transparent 0 27deg, rgba(157,176,255,.22) 28deg 29deg, transparent 30deg 45deg); }
.spell-orbit { position: absolute; top: 50%; left: 50%; width: 210px; height: 210px; border: 1px solid #b8bfff; border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 30px rgba(181,169,255,.25), inset 0 0 30px rgba(181,169,255,.25); }.spell-orbit-a::before, .spell-orbit-b::before { content: "✦"; position: absolute; color: #f2d64b; font-size: 34px; text-shadow: 0 0 15px #f2d64b; }.spell-orbit-a::before { top: -25px; left: 80px; }.spell-orbit-b { width: 310px; height: 310px; border-style: dashed; opacity: .7; transform: translate(-50%,-50%) rotate(28deg); }.spell-orbit-b::before { right: 14px; bottom: 42px; font-size: 24px; }
.spell-core { position: absolute; top: 50%; left: 50%; color: #fff; font-size: 120px; line-height: 1; transform: translate(-50%,-54%); text-shadow: 0 0 20px #b7a2ff, 0 0 55px #6e60ff; }
.art-space { color: #f5edbd; background: linear-gradient(#13182c, #20274b); }
.art-space::before { content: ""; position: absolute; inset: 0; opacity: .7; background-image: radial-gradient(circle, #f5f1c9 1px, transparent 2px); background-size: 44px 37px; background-position: 12px 10px; }
.art-space::after { content: ""; position: absolute; left: -3%; right: -3%; bottom: 23%; height: 1px; background: rgba(245,237,189,.55); box-shadow: 0 16px rgba(245,237,189,.25), 0 32px rgba(245,237,189,.15); }
.alien { position: absolute; z-index: 2; top: 31%; color: var(--green); font: 700 64px/1 var(--mono); text-shadow: 5px 5px 0 #31491a; }.alien-a { left: 20%; }.alien-b { left: 43%; top: 38%; }.alien-c { right: 15%; }
.ship { position: absolute; z-index: 3; left: 48%; bottom: 9%; color: var(--orange); font: 700 50px/1 var(--mono); text-shadow: 0 0 18px var(--orange); }
.art-eco { color: #27372e; background: linear-gradient(180deg, #dceec5, #b8d9aa); }
.art-eco::before { content: ""; position: absolute; inset: 0; opacity: .4; background: linear-gradient(rgba(44,93,60,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(44,93,60,.22) 1px, transparent 1px); background-size: 33px 33px; }
.eco-sun { position: absolute; top: 24%; right: 20%; width: 92px; height: 92px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 15px rgba(242,214,75,.24); }
.eco-hill { position: absolute; bottom: -70%; border-radius: 50%; }.eco-hill-back { left: -10%; width: 105%; height: 115%; background: #77ae74; }.eco-hill-front { right: -22%; width: 95%; height: 100%; background: #3b7759; }
.eco-bars { position: absolute; bottom: 17%; left: 21%; display: flex; align-items: end; gap: 8px; height: 95px; transform: skewY(-5deg); }.eco-bars i { width: 26px; border: 2px solid #1e503a; background: #c0e98e; box-shadow: 7px 7px 0 #244f3b; }.eco-bars i:nth-child(1) { height: 34%; }.eco-bars i:nth-child(2) { height: 52%; }.eco-bars i:nth-child(3) { height: 72%; }.eco-bars i:nth-child(4) { height: 95%; }

.collection-note { display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "logo copy action"; align-items: center; gap: 20px; margin-bottom: 70px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.note-logo { grid-area: logo; width: 38px; height: 38px; object-fit: contain; }
.collection-note p { grid-area: copy; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.collection-note .email-link { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.collection-note .submit-link { grid-area: action; display: inline-flex; align-items: center; justify-self: end; gap: 8px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; font-size: .88rem; font-weight: 650; text-decoration: none; }
.collection-note .submit-link span { color: var(--orange); font-size: 1.2rem; }
.collection-note a:hover, .site-footer a:hover { color: var(--orange); }
.page-views { display: inline-flex; align-items: baseline; gap: 5px; color: var(--muted); font: inherit; white-space: nowrap; }
.page-views strong { color: var(--ink); font: inherit; font-weight: 650; letter-spacing: 0; }
.views-suffix, .counter-credit { color: var(--muted); font: inherit; }
.counter-credit { margin-left: 0; }
.counter-credit a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer-identity { display: inline-flex; align-items: baseline; gap: 14px; }
.footer-separator { color: var(--muted); }
.site-footer { min-height: 85px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font: .73rem var(--mono); }
.site-footer a { color: var(--ink); text-decoration: none; }

@media (max-width: 1200px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .art { height: 210px; }
}

@media (max-width: 780px) {
  .site-header { width: min(100% - 24px, 1440px); height: auto; min-height: 72px; position: relative; z-index: 20; grid-template-columns: 1fr auto; grid-template-rows: 1fr; grid-template-areas: "brand controls"; align-content: center; gap: 8px 12px; padding-block: 10px; }
  .site-header[data-menu-open="true"] { grid-template-rows: auto auto; grid-template-areas: "brand controls" "nav nav"; align-content: start; }
  .brand { grid-area: brand; gap: 8px; }
  .brand img { height: 28px; }
  .brand small { font-size: .8rem; }
  .header-controls { grid-area: controls; gap: 4px; }
  .menu-toggle { display: grid; }
  .site-header nav { display: none; grid-area: nav; justify-self: stretch; width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--panel); box-shadow: var(--shadow); }
  .site-header[data-menu-open="true"] nav { display: flex; flex-direction: column; gap: 0; }
  .site-header nav a { padding: 10px 8px; text-align: left; }
  .site-header nav a + a { border-top: 1px solid var(--fine); }
}

@media (max-width: 760px) {
  main, .site-footer { width: min(100% - 28px, 520px); }
  .intro { grid-template-columns: 1fr; gap: 24px; padding: 24px 2px 36px; }
  .intro-main { align-self: start; display: block; }
  .intro h1 { margin-top: 13px; font-size: clamp(1.8rem, 7vw, 2.5rem); }
  .title-mark { margin-left: .12em; }
  .intro-side { gap: 24px; }
  .intro-side > p { max-width: 460px; }
  .intro-count { padding-top: 18px; }
  .section-heading { padding-inline: 2px; }
  .section-number { font-size: .7rem; }
  .section-number span { display: none; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .art { height: clamp(155px, 34vw, 210px); }
  .card-content { padding: 16px 14px; }
  .card-topline { font-size: .65rem; }
  .card-content h3 { font-size: 1.45rem; }
  .description { min-height: 0; font-size: .92rem; }
  .details div { grid-template-columns: 42px minmax(0, 1fr); gap: 6px; }
  .details dt { font-size: .68rem; }
  .details dd { font-size: .78rem; }
  .collection { padding-bottom: 35px; }
  .collection-note { grid-template-columns: 38px minmax(0, 1fr); grid-template-areas: "logo copy" ". action"; gap: 12px; margin-bottom: 50px; padding: 18px; }
  .collection-note .submit-link { margin-top: 4px; }
  .site-footer { min-height: 95px; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 22px 0; }
}

@media (max-width: 370px) {
  .brand small { font-size: .72rem; }
}

@media (max-width: 340px) {
  .site-header { column-gap: 8px; }
  .brand { gap: 4px; }
  .brand small { font-size: .66rem; letter-spacing: .04em; }
}

@media (max-width: 520px) {
  .icon-button { width: 34px; height: 34px; }
  .game-grid { grid-template-columns: 1fr; }
  .art { height: clamp(205px, 56vw, 260px); }
  .card-content { padding: 19px 20px; }
  .card-topline { font-size: .72rem; }
  .card-content h3 { font-size: 1.7rem; }
  .details div { grid-template-columns: 53px minmax(0, 1fr); gap: 9px; }
  .details dt { font-size: .73rem; }
  .details dd { font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
