:root {
  color-scheme: dark;
  --ink: #e4edfa;
  --muted: #a8bcd3;
  --mint: #adf7d8;
  --edge: #435f7d;
  --desk-width: 1240px;
  font-family: 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #100e12; color: var(--ink); }
a { color: inherit; }
[hidden] { display: none !important; }
a:focus-visible { outline: 3px solid #fbee9b; outline-offset: 3px; }
h1:focus, .screen:focus { outline: none; }
.skip-link { position: absolute; top: .5rem; left: 1rem; z-index: 5; padding: .65rem; background: #172b3c; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.room {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 34%, #62716d88 2%, #353a3e88 43%, transparent 72%),
    repeating-linear-gradient(90deg, #b9b99b09 0 1px, transparent 1px 84px),
    linear-gradient(180deg, #212629 0%, #292e31 56%, #1d2024 100%);
}

.room-header, .room-footer {
  width: 100%;
  max-width: var(--desk-width);
  margin: 0 auto;
  padding: 1.25rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.room-header { position: relative; z-index: 2; }
.wordmark { display: inline-flex; align-items: center; gap: .08em; text-decoration: none; font-size: .95rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.wordmark > span { color: var(--mint); }
.wordmark-logo { width: 1.5rem; height: 2rem; flex: none; margin-right: .5rem; object-fit: contain; }
.room-link, .room-footer a { text-underline-offset: .24em; }
.room-link { color: #e4edec; font-size: .91rem; }
.room-footer { position: relative; z-index: 1; color: #e1d7c8; font-size: .875rem; align-items: start; }

.desk {
  position: relative;
  isolation: isolate;
  flex: 1;
  padding: 1rem 1.75rem 10.25rem;
}
.desk::before {
  position: absolute;
  z-index: -1;
  inset: 72% 0 -5rem;
  content: '';
  border-top: 4px solid #201c1c;
  background:
    radial-gradient(ellipse at 48% 3%, #67503e 0%, transparent 69%),
    repeating-linear-gradient(1deg, #160d0c1c 0 1px, transparent 1px 13px),
    linear-gradient(#44372f 0%, #2a211e 65%, #171316);
  box-shadow: 0 -9px 28px #110e155e;
}

.computer { position: relative; z-index: 1; width: min(100%, 1000px); margin-inline: auto; }
.monitor {
  position: relative;
  padding: 26px 30px 0;
  border: 2px solid #282526;
  border-radius: 32px 32px 24px 24px;
  background: linear-gradient(145deg, #e7dabe, #c0b199 63%, #a5957e 100%);
  box-shadow: inset 0 2px 2px #f9edce, inset 3px 0 3px #f2e2c6, inset -4px -7px #786c60, 0 9px 0 #282528, 10px 24px 40px #130e16aa;
}
.bezel {
  position: relative;
  padding: 9px;
  border: 2px solid #574f45;
  border-radius: 24px;
  background: #1d2226;
  box-shadow: 0 2px 2px #fff1d3a6, inset 0 3px 5px #06070a;
}
.screen {
  position: relative;
  height: 516px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 15px;
  background: radial-gradient(ellipse at 62% 34%, #253d5f, #10233d 57%, #0b1526);
  box-shadow: inset 0 0 25px #02060d;
}
.screen::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 20px #0004;
  background: repeating-linear-gradient(180deg, transparent 0 3px, #080f191c 3px 4px);
}
.system-bar, .taskbar { display: flex; flex: none; align-items: center; gap: .75rem; background: #0d192b; font-size: .875rem; }
.system-bar { justify-content: space-between; min-height: 2.7rem; padding: .2rem 1.05rem; border-bottom: 1px solid var(--edge); }
.system-name { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: bold; }
.brand-pixel { width: 16px; height: 16px; background: var(--mint); display: inline-block; flex: none; clip-path: polygon(37% 0, 63% 0, 63% 37%, 100% 37%, 100% 63%, 63% 63%, 63% 100%, 37% 100%, 37% 63%, 0 63%, 0 37%, 37% 37%); }
.system-description { color: var(--muted); font-size: .78rem; letter-spacing: .11em; }
.taskbar { padding: .45rem .75rem; min-height: 2.65rem; border-top: 1px solid var(--edge); }
.taskbar a { background: #203852; padding: .25rem .65rem; text-decoration: none; border: 1px solid #536780; }
.taskbar span { color: var(--muted); }

.desktop { display: grid; grid-template-columns: 5.75rem minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); flex: 1; min-height: 0; padding: 1.15rem 1.05rem 1rem .2rem; }
.desktop-nav { display: grid; gap: .33rem; align-content: start; padding-top: .25rem; }
.desktop-nav a { display: grid; justify-items: center; align-content: center; gap: .35rem; width: 4.4rem; min-height: 4.55rem; margin-inline: auto; border: 1px solid transparent; font-size: .875rem; text-decoration: none; }
.desktop-nav a:hover, .desktop-nav a[aria-current] { border-color: #6c9bb1; background: #29485d; }
.icon { width: 30px; height: 26px; display: block; position: relative; }
.icon-home { background: #b3f3d9; clip-path: polygon(0 41%, 50% 0, 100% 41%, 88% 41%, 88% 100%, 61% 100%, 61% 63%, 37% 63%, 37% 100%, 12% 100%, 12% 41%); }
.icon-games { height: 22px; margin-block: 2px; background: #f7d27d; clip-path: polygon(12% 0, 88% 0, 88% 15%, 100% 15%, 100% 92%, 68% 92%, 61% 74%, 39% 74%, 32% 92%, 0 92%, 0 15%, 12% 15%); }
.icon-games::before { content: ''; position: absolute; top: 5px; left: 4px; width: 10px; height: 10px; background: #1c3144; clip-path: polygon(33% 0, 67% 0, 67% 33%, 100% 33%, 100% 67%, 67% 67%, 67% 100%, 33% 100%, 33% 67%, 0 67%, 0 33%, 33% 33%); }
.icon-games::after { content: ''; position: absolute; top: 6px; right: 5px; width: 4px; height: 4px; background: #1c3144; box-shadow: -4px 4px #1c3144; }
.icon-log { width: 22px; background: #a0c8f6; clip-path: polygon(0 0, 72% 0, 100% 25%, 100% 100%, 0 100%); }
.icon-log::before { content: ''; position: absolute; top: 8px; left: 5px; width: 10px; height: 2px; background: #1c3144; box-shadow: 0 5px #1c3144, 0 10px #1c3144; }
.icon-mail { height: 20px; margin-block: 3px; background: #e7b2c5; }
.icon-mail::after { content: ''; position: absolute; inset: 0; background: #1c3144; clip-path: polygon(0 7%, 50% 54%, 100% 7%, 100% 21%, 50% 69%, 0 21%); }

.window { min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid #7593b0; background: #14263c; box-shadow: 5px 5px #071426ab; }
.window-bar { background: #345578; padding: .42rem .65rem; min-height: 2rem; display: flex; flex: none; justify-content: space-between; align-items: center; color: #fafcff; font-size: .8rem; font-weight: bold; letter-spacing: .13em; }
.window-bar > span { display: flex; gap: .55rem; align-items: center; }
.window-bar i { width: .58rem; height: .58rem; background: var(--mint); }
.window-bar a { display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; letter-spacing: 0; line-height: 1; border: 1px solid #b0c8d8; text-decoration: none; }
.window-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #536d88 transparent;
  background: linear-gradient(130deg, #182c45, #101e32 68%);
}
.window-content:focus-visible { outline: 2px solid #fbee9b; outline-offset: -2px; }
.panel { flex: none; min-width: 0; margin-block: auto; padding: clamp(1.15rem, 3vw, 2rem); }
.panel h1 { margin: 0 0 .65rem; color: #f0f5fb; font-size: clamp(1.7rem, 3.55vw, 3rem); line-height: .98; letter-spacing: -.067em; }
.panel h1 em { color: var(--mint); font-style: normal; }
.panel p { max-width: 42ch; margin: .75rem 0 1.2rem; color: #ccdaea; font-size: 1rem; line-height: 1.42; }
.panel .eyebrow { color: var(--mint); font-size: .8rem; font-weight: bold; letter-spacing: .14em; margin: 0 0 .65rem; text-transform: uppercase; }
.home-panel.has-featured, .detail-panel.has-image { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .76fr); gap: 1.2rem; align-items: center; }
.home-panel { padding-block: clamp(1rem, 2.4vw, 1.5rem); }
.home-copy { min-width: 0; }
.home-panel h1 { font-size: clamp(2.1rem, 4.6vw, 4.1rem); }
.home-greeting { display: flex; align-items: center; gap: clamp(.45rem, 1vw, .8rem); margin-bottom: .12em; }
.home-mascot { width: clamp(2.55rem, 6vw, 4.65rem); height: auto; flex: none; filter: drop-shadow(0 0 1px #adf7d880) drop-shadow(0 1px 1px #080f1c); }
.home-panel h1 em { font-size: clamp(1.75rem, 3.7vw, 2.75rem); }
.pixel-button { display: inline-block; background: var(--mint); color: #162835; border: 1px solid #b6e9d5; box-shadow: 3px 3px #46796e; text-decoration: none; padding: .6rem .7rem; font-size: .875rem; font-weight: bold; }
.pixel-button:hover { background: #e1f9e9; }
.featured, .game-tile { display: block; min-width: 0; text-decoration: none; background: #172944; border: 1px solid #536f8e; }
.featured:hover, .game-tile:hover { border-color: var(--mint); }
.featured-image { height: 158px; overflow: hidden; background: #0f1322; }
.featured-image img, .tile-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: var(--image-position, center); }
.featured-copy, .tile-copy { display: grid; gap: .3rem; padding: .75rem; }
.featured-status { color: #f7d27d; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.featured-copy strong, .tile-copy strong { font-size: 1.05rem; color: #eff5fa; }
.featured-copy span:last-child, .tile-copy span { color: #b6cbe1; font-size: .875rem; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-top: 1rem; }
.tile-image { height: 125px; }
.text-link { display: inline-block; color: var(--mint); text-underline-offset: .22em; font-size: .9rem; }
.text-link + h1 { margin-top: .75rem; }
.panel .game-status { font-size: .875rem; color: #f7d27d; }
.game-detail-image { display: block; max-height: 278px; width: 100%; object-fit: contain; background: #0d1728; border: 1px solid var(--edge); }
.content-links { display: flex; flex-wrap: wrap; gap: .65rem 1rem; }
.content-links a { max-width: 100%; overflow-wrap: anywhere; }
.journal { list-style: none; padding: 0 0 0 .95rem; margin: 1rem 0 0; border-left: 2px solid var(--edge); }
.journal li + li { margin-top: .7rem; }
.journal h2 { color: var(--mint); font-size: .95rem; margin: 0; }
.journal p { max-width: 66ch; margin: .2rem 0 0; }

.case-controls { display: flex; align-items: center; justify-content: end; min-height: 48px; gap: .7rem; padding-inline: 3px; }
.case-mark { margin-right: auto; color: #332d29; font-size: .875rem; font-weight: bold; letter-spacing: .16em; }
.case-mark span { color: #326e64; margin-left: .3em; }
.case-vents { width: 64px; height: 9px; background: repeating-linear-gradient(90deg, #73695d 0 3px, #c6b89c 3px 6px); margin-right: .5rem; }
.power-light { width: 8px; height: 6px; border-radius: 2px; background: #a6ed99; box-shadow: 0 0 7px #5ef785, 0 0 0 2px #362d25; }
.power-switch { width: 18px; height: 13px; border: 1px solid #6a6055; border-radius: 2px; background: #b9ab95; box-shadow: 0 2px #766b61; }
.stand { margin: 4px auto 0; width: 44%; height: 28px; position: relative; border-radius: 0 0 17px 17px; background: linear-gradient(180deg, #625751, #9c8a74 67%, #66574b); }
.stand::after { content: ''; position: absolute; inset: 19px -20% -9px; border-radius: 10px 10px 5px 5px; background: linear-gradient(#b6a38b, #82705f 80%); box-shadow: 0 5px 17px #100c12bd; }

.wall-note { position: absolute; top: 24%; left: max(2%, calc(50% - 650px)); padding: 1rem .58rem .5rem; background: #dbb775; color: #2e291d; line-height: 1.1; font-weight: bold; box-shadow: 5px 8px 12px #110e1688; transform: rotate(-9deg); }
.wall-note span { position: absolute; width: 54%; height: 13px; top: -4px; left: 23%; background: #ddd2ab8a; transform: rotate(5deg); }
.speaker {
  position: absolute;
  z-index: 2;
  bottom: 6.65rem;
  width: 4.35rem;
  height: 6rem;
  padding: .46rem .46rem .32rem;
  border: 1px solid #4b4237;
  border-radius: 7px;
  background: linear-gradient(135deg, #dac8aa, #a0927d 82%);
  box-shadow: inset 1px 2px #f1dfbd, inset -4px -2px #837462, 5px 6px 16px #110b12ba;
}
.speaker-left { left: max(2%, calc(50% - 590px)); transform: rotate(-3deg); }
.speaker-right { right: max(2%, calc(50% - 590px)); transform: rotate(3deg); }
.speaker-grille {
  height: 75%;
  border: 2px solid #211f23;
  border-radius: 4px;
  background:
    radial-gradient(circle at 1px 1px, #141316 0 .7px, transparent .85px) 0 0 / 3px 3px,
    radial-gradient(circle at 50% 69%, #574f4a 0 16%, #27262a 18% 33%, #575049 36%, transparent 39%),
    radial-gradient(circle at 50% 19%, #57504d 0 12%, transparent 16%),
    #39353a;
  box-shadow: inset 0 0 7px #0a080c;
}
.speaker-right .speaker-controls { display: flex; justify-content: end; gap: 7px; align-items: center; height: 25%; padding-inline: 3px; }
.speaker-right .speaker-controls::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #9ceaa7; box-shadow: 0 0 5px #99ef9c, 0 0 0 1px #607055; }
.speaker-right .speaker-controls::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(63deg, transparent 47%, #dac8aa 48% 57%, transparent 59%) 3px 1px / 5px 5px no-repeat, linear-gradient(#5c5349, #2b2726); box-shadow: 0 1px 2px #332c24; }

.keyboard {
  --key-height: 16px;
  --key-gap: 3px;
  position: absolute;
  z-index: 3;
  bottom: 1.55rem;
  left: 47%;
  display: grid;
  grid-template-columns: minmax(0, 15fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 9px;
  width: min(65%, 660px);
  padding: 11px 13px 13px;
  border: 1px solid #524537;
  border-radius: 9px;
  background: linear-gradient(145deg, #d0bea0, #b4a286 68%, #a09076);
  box-shadow: inset 0 2px #eddbb9, inset 0 -4px #9a896f, 0 6px #5d4e41, 6px 13px 20px #110c13b3;
  transform: translateX(-50%) perspective(550px) rotateX(25deg) rotateZ(-1.4deg);
}
.key-bank, .key-row { display: flex; gap: var(--key-gap); }
.key-bank { min-width: 0; flex-direction: column; }
.key-row:first-child { margin-bottom: 3px; }
.keycap {
  flex: var(--key-units) 1 0;
  min-width: 0;
  height: var(--key-height);
  display: grid;
  place-content: center;
  border: 1px solid #796d5c;
  border-radius: 3px;
  background: linear-gradient(#e7d8bb 0 72%, #baac92 73%);
  box-shadow: 0 1px #514337, inset 0 1px #f6e9ce;
  color: #383027;
  font: 700 clamp(5px, .64vw, 8px)/1 'Courier New', monospace;
  white-space: nowrap;
}
.keycap[data-type="modifier"] { background: linear-gradient(#b9ad96 0 72%, #92846f 73%); box-shadow: 0 1px #514337, inset 0 1px #d4c6af; }
.keycap[data-type="escape"] { background: linear-gradient(#c38a76 0 72%, #965c4e 73%); box-shadow: 0 1px #513a32, inset 0 1px #e2a994; color: #2e221f; }
.keycap[data-type="gap"] { visibility: hidden; }
.keycap[data-type="tall"] { position: relative; z-index: 1; height: calc(2 * var(--key-height) + var(--key-gap)); margin-bottom: calc(-1 * (var(--key-height) + var(--key-gap))); }
.keycap[data-type="indicators"] { border-color: #9b8c76; background: #574a40; box-shadow: inset 0 1px 3px #302821; color: #9ceaa7; letter-spacing: .15em; }

.mouse-pad {
  position: absolute;
  z-index: 2;
  right: max(2%, calc(50% - 505px));
  bottom: 1.75rem;
  width: 7rem;
  height: 5rem;
  border: 1px solid #16131a;
  border-radius: 8px;
  background: repeating-linear-gradient(125deg, #3e4047 0 1px, #35373f 1px 3px);
  box-shadow: inset 0 0 0 2px #5a5960, 0 3px #201c24, 4px 9px 13px #120d15a3;
  transform: perspective(500px) rotateX(22deg) rotateZ(5deg);
}
.desk-mouse {
  position: relative;
  width: 2.8rem;
  height: 4.15rem;
  margin: .35rem auto 0;
  border: 1px solid #615446;
  border-radius: 38% 38% 46% 46% / 24% 24% 38% 38%;
  background:
    linear-gradient(90deg, transparent 48%, #756657 49% 51%, transparent 52%) top center / 100% 36% no-repeat,
    linear-gradient(180deg, #e0ceb0 0 34%, #746657 35% 37%, #c6b497 38%, #ae9c80 100%);
  box-shadow: inset 2px 0 3px #ecdbbe, inset -2px -4px #917f67, 3px 5px 7px #151017aa;
}
.desk-mouse::before { content: ''; position: absolute; right: 50%; bottom: 100%; width: 53px; height: 38px; border-right: 2px solid #242027; border-top: 2px solid #242027; border-radius: 0 20px 0 0; box-shadow: 1px -1px #433a3d; }
.mouse-wheel { position: absolute; top: 7px; left: calc(50% - 3px); width: 6px; height: 11px; border: 1px solid #49413a; border-radius: 3px; background: repeating-linear-gradient(#6c635b 0 1px, #514941 1px 2px); }

@media (min-width: 1131px) { .speaker { bottom: 8.7rem; } }
@media (max-width: 1130px) { .wall-note { display: none; } }
@media (max-width: 900px), (orientation: portrait) and (max-width: 1024px), (pointer: coarse) and (max-width: 1366px), (orientation: landscape) and (max-height: 520px) and (max-width: 950px) {
  .desk { padding: .8rem 1.5rem 2.65rem; }
  .desk::before { inset: 32% 0 -5rem; }
  .computer { width: min(100%, 820px); }
  .wall-note, .speaker, .keyboard, .mouse-pad, .stand, .case-controls { display: none; }
  .monitor {
    padding: 18px;
    border-color: #6e747d;
    border-radius: 28px;
    background: linear-gradient(150deg, #292e37, #13161c 66%);
    box-shadow: inset 0 0 0 2px #101116, 0 5px 0 #0e1015, 10px 24px 40px #110d12aa;
  }
  .monitor::before {
    content: '';
    position: absolute;
    top: 7px;
    left: calc(50% - 3px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 60% 38%, #65819d, #2f3d5b 32%, #06080d 67%);
  }
  .bezel { padding: 0; border: 1px solid #06080d; border-radius: 12px; background: #0c1422; box-shadow: none; }
  .screen { height: 470px; border-radius: 11px; }
  .screen::after { background: none; box-shadow: none; }
}

@media (max-width: 720px) {
  .desktop { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding: 0 .65rem .65rem; }
  .desktop-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: .4rem 0; }
  .desktop-nav a { width: 100%; min-height: 3.65rem; }
}

@media (max-width: 600px), (orientation: landscape) and (max-height: 520px) and (max-width: 950px) {
  .room-header, .room-footer { padding-inline: .85rem; }
  .room-header { padding-block: .9rem; }
  .room-footer { padding-top: .1rem; flex-wrap: wrap; }
  .desk { padding: .2rem .65rem 1.25rem; }
  .computer { width: min(100%, 410px); }
  .monitor {
    padding: 25px 8px 18px;
    border: 2px solid #697480;
    border-radius: 32px;
    background: linear-gradient(135deg, #252b36, #11141a 56%);
    box-shadow: inset 0 0 0 2px #0c0e12, 0 5px 0 #121116, 7px 13px 24px #100d13aa;
  }
  .monitor::before {
    top: 8px;
    left: calc(50% - 22px);
    width: 44px;
    height: 10px;
    border-radius: 7px;
    background: radial-gradient(circle at 86% 50%, #63788c 0, #2d3b57 2px, #080b11 4px);
  }
  .monitor::after {
    content: '';
    position: absolute;
    bottom: 7px;
    left: 35%;
    width: 30%;
    height: 3px;
    border-radius: 2px;
    background: #828b95;
  }
  .bezel { border-radius: 17px; }
  .screen { height: clamp(27rem, 100svh - 10rem, 44rem); border-radius: 16px; }
  .system-bar { padding-inline: .6rem; }
  .system-description { font-size: .69rem; letter-spacing: .04em; }
  .desktop { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding: 0 .5rem .65rem; }
  .desktop-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: .4rem 0; }
  .desktop-nav a { width: 100%; min-height: 3.65rem; font-size: .8rem; }
  .home-panel.has-featured, .detail-panel.has-image { grid-template-columns: 1fr; }
  .featured { display: flex; flex-direction: column-reverse; }
  .featured-image { height: 125px; }
  .panel { margin-block: 0; padding: 1rem .8rem; }
  .game-grid { gap: .5rem; }
  .tile-image { height: 94px; }
  .tile-copy { padding: .5rem; }
  .tile-copy strong { font-size: .92rem; }
  .tile-copy span { font-size: .78rem; }
}

@media (orientation: landscape) and (max-height: 520px) and (max-width: 950px) and (min-width: 601px) {
  .computer { width: min(100%, 650px); }
  .screen { height: clamp(18rem, 100svh - 6rem, 24rem); }
  .home-panel.has-featured, .detail-panel.has-image { grid-template-columns: minmax(0, 1fr) minmax(0, .76fr); }
}
