:root {
  color-scheme: dark;
  --background: #111312;
  --surface: #1a1c1a;
  --border: #30332e;
  --text: #f2f1e9;
  --muted: #a0a49a;
  --accent: #f78253;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--background);
  color: var(--text);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, input { color: inherit; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 10; padding: 14px; background: var(--accent); color: #111; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 96px; padding: 0 5.5%; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 23px; font-weight: 750; letter-spacing: -1px; }
.brand-mark { background: var(--accent); color: #171a14; height: 35px; width: 35px; display: grid; place-content: center; border-radius: 9px; font-size: 29px; line-height: 1; padding-bottom: 5px; }
.brand-suffix { color: #878d82; font-size: 14px; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
nav { display: flex; align-items: center; gap: 30px; font-size: 13px; }
nav a { padding: 12px 0; color: var(--muted); }
nav a:hover, nav .nav-active { color: var(--text); }
.nav-active::before { content: ''; display: inline-block; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; margin-right: 9px; vertical-align: middle; }
.header-note { font-size: 12px; color: #c7cbbf; display: flex; align-items: center; gap: 9px; }
.status-dot { width: 6px; height: 6px; background: #a8c478; border-radius: 50%; box-shadow: 0 0 0 4px #a8c4780c; }
.page-shell, .site-footer { max-width: 1440px; margin: auto; padding-inline: 5.5%; }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; padding-block: 76px 78px; }
.eyebrow, .tiny-label { font-family: "Courier New", monospace; font-size: 10px; font-weight: 600; letter-spacing: 1.7px; }
.eyebrow { color: var(--muted); margin: 0 0 21px; }
.hero-copy .eyebrow { display: flex; align-items: center; gap: 9px; }
.hero-copy .eyebrow span { height: 7px; width: 7px; background: var(--accent); }
h1 { font-size: clamp(44px, 5.2vw, 76px); line-height: 1.04; letter-spacing: -3.5px; margin: 0; font-weight: 750; }
h1 span { color: var(--accent); }
.hero-description { color: #a9aea2; font-size: 14px; line-height: 1.9; margin: 24px 0 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 25px; min-height: 46px; padding: 12px 20px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 600; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #171a14; }
.button-primary:hover { background: #ff956b; }
.button span { font-size: 18px; }
.button-secondary { background: #1d201b; border-color: #353a30; color: #e0e5d5; }
.button-secondary:hover { background: #2b3025; }
.hero-meta { margin-top: 25px; display: flex; align-items: center; gap: 13px; font-family: "Courier New", monospace; font-size: 10px; color: #999e92; }
.meta-divider { background: #575b51; height: 3px; width: 3px; border-radius: 50%; }
.hero-art { border: 1px solid #3f4532; min-width: 0; background: #20271d; border-radius: 14px; display: flex; flex-direction: column; position: relative; overflow: hidden; transform: rotate(-2deg); transition: transform .25s; }
.hero-art:hover { transform: rotate(0); }
.art-topline { display: flex; justify-content: space-between; gap: 8px; margin: 23px 25px 0; font-family: "Courier New", monospace; font-size: 9px; letter-spacing: 1px; color: #a5b28b; }
.maze { height: 255px; position: relative; overflow: hidden; margin-block: 10px; background-image: radial-gradient(#a4b97b22 1px, transparent 1px); background-size: 20px 20px; }
.maze-line { position: absolute; border: 2px solid #677f41; border-radius: 14px; box-shadow: inset 0 0 0 5px #20271d, inset 0 0 0 7px #4a5b31; }
.maze-one { left: -30px; top: 22px; width: 48%; height: 56px; }
.maze-two { right: -20px; top: 22px; width: 42%; height: 56px; }
.maze-three { left: 22px; bottom: 14px; width: 46%; height: 59px; }
.maze-four { right: -20px; bottom: -26px; width: 39%; height: 100px; }
.pac-shape { display: block; width: 72px; height: 72px; background: #eacc64; border-radius: 50%; clip-path: polygon(0 0, 100% 0, 100% 14%, 48% 50%, 100% 86%, 100% 100%, 0 100%); }
.maze > .pac-shape { position: absolute; top: 104px; left: 15%; filter: drop-shadow(0 5px 10px #eacc6420); }
.pellets { display: flex; align-items: center; gap: 22px; }
.pellets i { display: block; width: 7px; height: 7px; background: #eadcae; border-radius: 50%; }
.maze > .pellets { position: absolute; left: 39%; top: 136px; }
.ghost-shape { display: flex; gap: 7px; justify-content: center; align-items: center; width: 57px; height: 65px; padding-bottom: 9px; background: #e99477; border-radius: 28px 28px 0 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 82% 83%, 65% 100%, 49% 83%, 32% 100%, 16% 83%, 0 100%); }
.ghost-shape i { width: 14px; height: 19px; background: #f6f0da; border-radius: 8px; position: relative; }
.ghost-shape i::after { content: ''; position: absolute; left: 1px; top: 5px; width: 6px; height: 9px; border-radius: 3px; background: #333c35; }
.maze > .ghost-shape { position: absolute; top: 108px; right: 12%; }
.bonus { position: absolute; top: 89px; right: 22%; font-family: monospace; font-size: 14px; color: #a2b978; transform: rotate(10deg); }
.art-bottomline { background: #272f21; border-top: 1px solid #3b4530; padding: 22px 25px; display: flex; align-items: center; justify-content: space-between; }
.art-bottomline .tiny-label { color: #acba96; font-size: 8px; }
.art-bottomline strong { display: block; margin-top: 6px; font-size: 22px; letter-spacing: -.5px; }
.round-arrow { width: 40px; height: 40px; border: 1px solid #6c7c54; border-radius: 50%; display: grid; place-content: center; font-size: 23px; color: #c5d3ac; }
.library { border-top: 1px solid var(--border); padding-top: 40px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading .eyebrow { margin-bottom: 10px; font-size: 9px; }
h2 { font-size: 32px; font-weight: 650; letter-spacing: -1px; margin: 0; }
h2 > span { color: var(--accent); }
.library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-block: 28px 24px; }
.filters { display: flex; align-items: center; gap: 8px; }
.filter { border: 1px solid transparent; border-radius: 6px; padding: 10px 15px; background: transparent; color: #acb1a5; font-size: 12px; }
.filter:hover { background: #21241f; }
.filter.active { background: #f0f0e7; color: #21241d; }
.filter span { margin-left: 8px; background: #d7dacf; padding: 1px 5px; border-radius: 3px; font-size: 10px; }
.search { display: flex; align-items: center; gap: 9px; border: 1px solid var(--border); background: #181b17; padding: 0 12px; border-radius: 6px; color: #959b8a; }
.search span { font-size: 24px; transform: rotate(-30deg); }
.search input { width: 170px; min-width: 0; border: 0; outline: none; background: transparent; padding: 11px 0; font-size: 12px; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.search input::placeholder { color: #989e91; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.game-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: #191c18; transition: transform .2s, border-color .2s; }
.game-card:hover { transform: translateY(-5px); border-color: #727c61; }
.card-art { height: 200px; position: relative; overflow: hidden; display: grid; place-items: center; }
.card-tag { position: absolute; z-index: 1; top: 15px; left: 15px; font: 8px "Courier New", monospace; letter-spacing: 1px; padding: 6px 8px; border: 1px solid #ffffff26; border-radius: 4px; background: #11111130; color: #f3f0e0; }
.play-badge { position: absolute; bottom: 14px; right: 14px; border-radius: 50%; width: 31px; height: 31px; background: #0003; display: grid; place-content: center; font-size: 10px; border: 1px solid #ffffff26; }
.card-copy { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card-copy .tiny-label { font-size: 8px; color: #a0a993; margin: 0 0 9px; text-transform: uppercase; }
.card-title { display: flex; align-items: center; justify-content: space-between; }
.card-title h3 { font-size: 23px; letter-spacing: -.7px; font-weight: 600; margin: 0; }
.card-title > span { color: #9da690; font-size: 21px; }
.card-description { color: #a4ab9b; font-size: 12px; line-height: 1.8; margin: 10px 0 20px; flex: 1; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #2e3429; padding-top: 15px; font-size: 11px; }
.card-bottom > span:first-child { font-size: 9px; padding: 4px 7px; background: #252c21; color: #b4c3a3; text-transform: capitalize; border-radius: 3px; }
.card-bottom > span:last-child { color: #b7c3a8; }
.card-bottom > span:last-child span { margin-left: 7px; }
.card-pacman .card-art { background: #2c3423; }
.mini-maze { width: 80%; display: flex; align-items: center; justify-content: center; gap: 15px; border-block: 3px double #6d8146; padding-block: 18px; transform: rotate(-5deg); }
.mini-maze .pac-shape { width: 56px; height: 56px; flex-shrink: 0; }
.mini-maze .pellets { gap: 13px; }
.mini-maze .pellets i { height: 5px; width: 5px; }
.mini-maze .ghost-shape { width: 42px; height: 48px; gap: 4px; flex-shrink: 0; }
.mini-maze .ghost-shape i { width: 11px; height: 15px; }
.card-minesweeper .card-art { background: #283632; }
.mini-mines { display: grid; grid-template-columns: repeat(3, 38px); gap: 5px; transform: rotate(-10deg) translateY(8px); }
.mini-mines i { height: 38px; display: grid; place-content: center; font: bold 21px monospace; color: #b3c8ac; background: #51695d; border: 1px solid #7b9988; box-shadow: 2px 3px 0 #1d2b24; border-radius: 3px; }
.mini-mines i:empty { background: #798f7c; }
.mini-mines .flag { color: #ffd79b; background: #365045; }
.card-2048 .card-art { background: #463528; }
.mini-tiles { display: grid; grid-template-columns: repeat(2, 59px); gap: 7px; transform: rotate(9deg) translateY(7px); }
.mini-tiles i { height: 59px; display: grid; place-content: center; border-radius: 6px; background: #e9ddbf; color: #645941; font-size: 25px; font-style: normal; font-weight: 700; box-shadow: 2px 3px 0 #292315; }
.mini-tiles i:nth-child(2) { background: #d8ad73; color: #fff6df; }
.mini-tiles i:nth-child(3) { background: #ce7652; color: #fff6df; }
.mini-tiles i:nth-child(4) { background: #e9c657; color: #514313; font-size: 21px; }
.card-snake .card-art { background: #2c3927; background-image: linear-gradient(#90a8730a 1px, transparent 1px), linear-gradient(90deg, #90a8730a 1px, transparent 1px); background-size: 18px 18px; }
.mini-snake { position: relative; width: 180px; height: 100px; }
.snake-body { position: absolute; width: 110px; height: 72px; border: 24px solid #b4cb7e; border-right: none; top: 15px; left: 15px; border-radius: 13px 0 0 13px; }
.snake-head { position: absolute; width: 37px; height: 29px; background: #c9e18e; border-radius: 0 8px 8px 0; top: 12px; left: 101px; }
.snake-head::before, .snake-head::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #344322; position: absolute; right: 9px; top: 6px; }
.snake-head::after { top: 19px; }
.snake-food { position: absolute; width: 19px; height: 19px; background: #e99971; border-radius: 5px; right: 0; top: 18px; transform: rotate(10deg); }
.card-memory .card-art { background: #393247; }
.mini-memory { display: grid; grid-template-columns: repeat(2, 48px); gap: 8px; transform: rotate(-10deg) translateY(6px); }
.mini-memory i { height: 59px; display: grid; place-content: center; border: 1px solid #b5a1cd; border-radius: 5px; color: #e0c4ff; background: #665278; font: 29px Georgia, serif; box-shadow: 2px 3px 0 #292135; }
.mini-memory i:first-child, .mini-memory i:last-child { background: #c0afd3; color: #534264; }
.card-sudoku .card-art { background: #1d2b33; }
.mini-sudoku { display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 46px); gap: 3px; padding: 5px; border: 3px solid #7fa6bd; border-radius: 4px; background: #16232a; box-shadow: 3px 4px 0 #0c1418; transform: rotate(-8deg) translateY(6px); }
.mini-sudoku i { display: grid; place-content: center; font: 600 21px "Courier New", monospace; font-style: normal; color: #d3e7f3; background: #223640; border: 1px solid #35525f; }
.mini-sudoku i:nth-child(2), .mini-sudoku i:nth-child(6) { color: #9fd0ea; }
.mini-sudoku i:nth-child(4) { background: #2c4c5c; color: #eaf7ff; }
.mini-sudoku i:nth-child(8) { color: #8fb9d2; }
.mini-sudoku i:empty { background: #1a2b33; }
.bottom-note { display: flex; align-items: center; gap: 20px; margin-block: 48px; padding: 25px 28px; border: 1px dashed #3c4433; border-radius: 8px; }
.note-symbol { font-size: 36px; color: #acba8b; }
.bottom-note strong { font-size: 13px; font-weight: 500; }
.bottom-note p { font-size: 11px; color: var(--muted); margin: 7px 0 0; line-height: 1.7; }
.bottom-note > .tiny-label { margin-left: auto; font-size: 8px; color: #939f83; }
.site-footer { min-height: 86px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 13px; }
.footer-dot { color: var(--accent); }
.footer-muted, .site-footer a { color: #9aa18f; font-size: 10px; }
.footer-muted { margin-left: 16px; }
.site-footer a:hover { color: var(--text); }
.empty-state { color: var(--muted); padding: 36px 0; }
.playing { overflow: hidden; }
.player { width: min(1200px, 96vw); height: 94dvh; max-width: none; max-height: none; padding: 0; border: 1px solid #414739; background: #111312; color: var(--text); border-radius: 14px; overflow: hidden; }
.player::backdrop { background: #050705e8; backdrop-filter: blur(8px); }
.player:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; }
.player-shell { height: 100%; display: flex; flex-direction: column; }
.player-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--border); background: #191d17; }
.player-header .tiny-label { color: #a4b194; margin: 0 0 5px; font-size: 8px; }
.player-header h2 { font-size: 23px; }
.player-actions { display: flex; gap: 8px; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #424b38; border-radius: 6px; color: #d0d8c5; background: #252c20; font-size: 21px; }
.icon-button:hover { background: #3d4932; }
.close-button { background: #53372a; border-color: #79503c; color: #ffc6a6; font-size: 16px; }
.frame-container { position: relative; flex: 1; min-height: 0; background: #111312; }
#game-frame { width: 100%; height: 100%; border: 0; display: block; }
.load-status { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1; background: #292f23; color: #e1e9d6; padding: 12px 20px; border-radius: 6px; font-size: 13px; width: max-content; max-width: 90%; text-align: center; }
.player-footer { display: flex; gap: 20px; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 11px; }
.player-footer p { margin: 0; line-height: 1.5; }
.player-footer > span { color: #9ba88d; font-size: 10px; text-align: right; }
.document-page { max-width: 850px; margin: auto; padding: 70px 24px; line-height: 1.8; }
.document-page h1 { font-size: 48px; margin: 25px 0; letter-spacing: -2px; }
.document-page h2 { margin-top: 32px; font-size: 23px; }
.document-page p, .document-page li { color: #b3bba9; }
.document-page a:not(.button) { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1500px) { .site-header { padding-inline: max(5.5%, calc((100% - 1280px) / 2)); } }
@media (max-width: 1000px) {
  .hero { gap: 36px; }
  .brand-suffix { display: none; }
  .card-copy { padding: 18px; }
  .hero-art .pellets { gap: 13px; }
  .hero-art .ghost-shape { right: 8%; }
  .hero-art .pac-shape { left: 9%; }
  .card-art { height: 180px; }
  .mini-maze { gap: 10px; width: 90%; }
  .mini-maze .pellets { gap: 9px; }
  .bottom-note > .tiny-label { display: none; }
}
@media (max-width: 760px) {
  .site-header { min-height: 78px; }
  .header-note { display: none; }
  .hero { gap: 28px; padding-block: 52px; }
  h1 { font-size: 47px; letter-spacing: -2.5px; }
  .hero-copy .eyebrow { font-size: 8px; letter-spacing: .8px; }
  .hero-description { font-size: 12px; }
  .hero-meta { font-size: 8px; gap: 7px; }
  .art-topline { margin: 20px 15px 0; font-size: 7px; }
  .maze { height: 225px; }
  .maze > .pac-shape { width: 54px; height: 54px; top: 111px; }
  .maze > .ghost-shape { width: 42px; height: 49px; top: 112px; }
  .maze > .pellets { gap: 12px; left: 36%; }
  .maze > .pellets i { width: 5px; height: 5px; }
  .art-bottomline { padding: 18px 15px; }
  .art-bottomline strong { font-size: 18px; }
  .art-bottomline .tiny-label { font-size: 6px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .footer-muted { display: none; }
}
@media (max-width: 540px) {
  .site-header { gap: 14px; }
  .brand { font-size: 21px; gap: 8px; }
  nav { gap: 17px; font-size: 11px; }
  .brand-mark { height: 30px; width: 30px; font-size: 25px; }
  .hero { grid-template-columns: 1fr; gap: 38px; padding-block: 40px; }
  h1 { font-size: 58px; }
  .hero-description { font-size: 14px; }
  .hero-meta { font-size: 10px; }
  .hero-copy .eyebrow { font-size: 9px; }
  .hero-art { margin: 0 4px; }
  .maze { height: 190px; }
  .maze > .pac-shape { top: 81px; left: 18%; }
  .maze > .ghost-shape { top: 84px; right: 18%; }
  .maze > .pellets { top: 106px; left: 40%; }
  .maze-one, .maze-two { top: 11px; height: 45px; }
  .maze-three { bottom: -5px; height: 45px; }
  .maze-four { bottom: -40px; }
  .bonus { top: 64px; }
  .art-bottomline { padding: 18px 22px; }
  .art-bottomline strong { font-size: 20px; }
  .art-topline { margin-inline: 22px; }
  .library { padding-top: 30px; }
  h2 { font-size: 27px; }
  .section-heading .button { padding: 10px 12px; font-size: 11px; gap: 10px; min-height: 40px; }
  .library-toolbar { flex-wrap: wrap; margin-top: 22px; }
  .filters { flex: 1; }
  .filter { padding: 9px 14px; }
  .search { width: 100%; }
  .search input { width: 100%; }
  .game-grid { gap: 12px; }
  .card-art { height: 158px; }
  .card-tag { font-size: 6px; top: 10px; left: 10px; }
  .card-copy { padding: 15px 12px; }
  .card-title h3 { font-size: 19px; }
  .card-title > span { font-size: 16px; }
  .card-copy .tiny-label { font-size: 6px; letter-spacing: 1px; }
  .card-description { font-size: 11px; }
  .card-bottom { font-size: 9px; gap: 4px; }
  .card-bottom > span:first-child { font-size: 8px; }
  .mini-maze { transform: scale(.75) rotate(-5deg); width: 220px; gap: 12px; }
  .mini-mines, .mini-tiles, .mini-memory { scale: .8; }
  .mini-sudoku { scale: .8; }
  .mini-snake { scale: .7; }
  .bottom-note { padding: 20px 16px; gap: 13px; margin-block: 30px; }
  .bottom-note strong { font-size: 12px; }
  .bottom-note p { font-size: 10px; }
  .site-footer { font-size: 12px; min-height: 80px; }
  .site-footer a { max-width: 145px; text-align: right; line-height: 1.7; font-size: 9px; }
  .player { margin: 0; width: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .player-header { padding: 12px; }
  .player-header h2 { font-size: 21px; }
  .player-actions { gap: 5px; }
  .icon-button { width: 35px; height: 35px; }
  .player-footer { padding: 10px 12px; font-size: 10px; }
  .player-footer > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
