@font-face {
  font-family: 'Pixelify Sans';
  src: url('/waitlist/fonts/PixelifySans.ttf') format('truetype');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #eee7d5;
  --muted: #d0d3bb;
  --accent: #dfc28c;
  --nav-height: 70px;
  --pixel: 'Pixelify Sans', monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: #131820; color: var(--ink); font: 20px/1.45 var(--pixel); font-synthesis: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
img { image-rendering: pixelated; }
.level-view { position: fixed; inset: 0; pointer-events: none; }
.level-view canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.level-view::after {
  position: absolute; inset: 0; content: '';
  background: linear-gradient(90deg, #0b100ef0 0, #0b100eab 32%, transparent 68%), radial-gradient(ellipse, transparent 40%, #080e0d59);
}
.site-nav {
  position: sticky; z-index: 4; top: 0; min-height: var(--nav-height);
  padding: 12px clamp(16px, 4vw, 60px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: #0c100ef2; border-bottom: 1px solid #4e503e;
}
.site-nav nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px clamp(14px, 2vw, 30px); font-size: 18px; }
.site-nav a { display: flex; gap: 7px; align-items: baseline; }
.site-nav a small { color: #a1ad8d; font-size: 13px; }
.route-hud {
  position: fixed; z-index: 2; right: clamp(16px, 4vw, 60px); bottom: 24px;
  display: grid; grid-template-columns: 20px 1fr; gap: 6px 12px; align-items: center;
  width: 226px; padding: 12px;
  border: 6px solid transparent; border-image: url('/sprites/925.png') 5 fill / 6px / 0 stretch;
  color: var(--ink); font-size: 16px; line-height: 1.2; text-transform: uppercase; pointer-events: none;
}
.route-hud img { grid-row: 1/3; }
.route-hud progress { grid-column: 2; display: block; width: 100%; height: 4px; margin: 0; appearance: none; border: 0; background: #383b2d; }
.route-hud progress::-webkit-progress-bar { background: #383b2d; }
.route-hud progress::-webkit-progress-value { background: #b4b586; }
.route-hud progress::-moz-progress-bar { background: #b4b586; }
main, footer { position: relative; z-index: 3; }
main { pointer-events: none; }
.chapter { min-height: 122svh; scroll-margin-top: var(--nav-measured-height, var(--nav-height)); padding-inline: clamp(22px, 6vw, 100px); }
.copy-track { display: flex; flex-direction: column; min-height: 95svh; }
.chapter-copy {
  position: sticky; top: max(calc(var(--nav-measured-height, var(--nav-height)) + 28px), 16svh);
  width: min(520px, 43vw); margin-top: max(32px, calc(16svh - var(--nav-measured-height, var(--nav-height))));
  padding: 0; pointer-events: auto; transition: opacity 180ms ease;
}
.on-street .chapter-copy:not(:focus-within) { opacity: 0; pointer-events: none; }
.chapter-number { margin: 0; color: #c3cba8; font-size: 16px; line-height: 1.3; text-transform: uppercase; letter-spacing: .04em; }
h1, h2 { margin: 18px 0 0; font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: 0; text-shadow: 3px 3px #080e0a; }
#home h1 { margin: 14px 0 24px; font-size: clamp(52px, 5.8vw, 84px); }
.chapter-copy > h2 { font-size: clamp(44px, 4.8vw, 68px); }
h1 em, h2 em { color: #d6cfaa; font-style: normal; }
h1 em { color: var(--accent); }
.chapter-copy > p:not(.chapter-number) { margin: 24px 0; max-width: 36ch; color: var(--muted); font-size: 22px; line-height: 1.45; text-shadow: 1px 2px #080e0a; }
.news-feed { margin: 0 0 22px; padding: 14px 18px; border: 8px solid transparent; border-image: url('/sprites/925.png') 5 fill / 8px / 0 stretch; box-shadow: 5px 6px #080d0a70; }
.news-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.news-header h2 { margin: 0; color: #ccd3b7; font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: .03em; text-shadow: none; }
#news-connection { color: #b4cba3; font-size: 16px; white-space: nowrap; }
.news-context { margin: 5px 0 9px; font-size: 14px; line-height: 1.3; color: #adb69b; }
.notification-stack { min-height: 230px; }
.news-feed article { display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; padding: 12px 0; border-top: 1px solid #50513f; animation: notification-arrive 300ms ease-out both; }
.news-feed article:first-child { border-top: 0; }
.news-feed time { padding-top: 1px; color: #ceb484; font-size: 14px; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-feed h3 { margin: 0; color: #eee7d5; font-size: 18px; font-weight: 500; line-height: 1.25; }
.news-feed article p { grid-column: 2; margin: 0; font-size: 16px; line-height: 1.35; color: #c2c8af; }
.news-feed[data-offline] #news-connection, .news-feed article p.message-failed { color: #e0ae88; }
.news-feed[data-offline] .message-notice { border-color: #795d46; }
.message-pending { grid-column: 2; display: flex; gap: 8px; align-items: center; min-height: 22px; color: #c2c8af; font-size: 16px; line-height: 1.3; }
.loading-dots { display: inline-flex; gap: 3px; align-items: center; }
.loading-dots i { width: 3px; height: 3px; background: #b1c4a4; animation: message-loading 1.2s ease-in-out infinite; }
.loading-dots i:nth-child(2) { animation-delay: .18s; }
.loading-dots i:nth-child(3) { animation-delay: .36s; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 10px 22px; background: #d5c49a; color: #202719; border: 2px solid #eee0b9; border-right-color: #817353; border-bottom-color: #817353; font-size: 20px; line-height: 1.2; font-weight: 600; }
.button:hover { color: #202719; background: #e4d7b3; }
.button:disabled { opacity: .65; cursor: wait; }
.play { box-shadow: 3px 4px #080e0a; }
.walking-icon { display: block; width: 24px; height: 30px; background: url('/sprites/476.png') center top/24px auto no-repeat; image-rendering: pixelated; animation: survivor-step 500ms steps(1) infinite; }
.chapter-copy > p.scroll-tip, .chapter-copy > p.play-meta { margin: 18px 0 0; color: #b0bc9c; font-size: 16px; line-height: 1.3; }
.status { display: flex; align-items: baseline; gap: 8px; }
.dot { display: inline-block; flex-shrink: 0; width: 5px; height: 5px; background: #a5bd91; }
.status[data-blackout] .dot, .server-status[data-offline] .dot { background: #d99d76; }
#scene-state { color: #d3ba90; font-size: 16px; line-height: 1.4; }
.scene-artifact { display: flex; align-items: center; gap: 24px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #6e775466; }
.scene-artifact img { object-fit: contain; filter: drop-shadow(4px 6px #080e0a); }
.artifact-caption { display: block; margin-bottom: 10px; color: #c1c9ac; font-size: 18px; line-height: 1.3; }
.rack-tokens { display: flex; flex-shrink: 0; gap: 7px; }
.rack-mini { display: block; width: 26px; height: 51px; background: url('/sprites/909.png') -19px -7px/128px 128px no-repeat; image-rendering: pixelated; filter: saturate(.3) brightness(1.2); transition: filter 180ms, opacity 180ms; }
.rack-mini[data-offline] { filter: saturate(0) brightness(.3); opacity: .6; }
.scene-artifact .server-status { margin: 0; color: #c1cdb0; font-size: 18px; line-height: 1.4; }
.server-status .dot { margin-right: 6px; }
.inventory-preview { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; }
.inventory-preview img { width: 96px; height: 66px; filter: drop-shadow(3px 3px #080e0a); }
.inventory-preview span { color: #bdc6a8; font-size: 18px; line-height: 1.3; }
.gear-list { margin: 0; }
.gear-list > div { display: grid; grid-template-columns: 72px 1fr; gap: 3px 18px; padding: 14px 0; border-top: 1px solid #505b43; }
.gear-list dt { grid-column: 2; color: #e0d0a5; font-size: 22px; line-height: 1.2; }
.gear-list dd { grid-column: 2; margin: 0; color: #d0d3bb; font-size: 20px; line-height: 1.35; }
.supply-icon { position: relative; grid-column: 1; grid-row: 1/3; align-self: center; width: 64px; height: 44px; background: url('/sprites/925.png') center/100% 100%; image-rendering: pixelated; }
.supply-lamp::after { content: ''; position: absolute; left: 28px; top: 14px; width: 8px; height: 22px; background: #8b8266; border-left: 2px solid #3a372d; border-right: 2px solid #14160f; box-shadow: 0 -4px #c9c7a5, 0 -6px #eee4b8, 2px 2px #070906; }
.supply-power::after { content: ''; position: absolute; left: 24px; top: 14px; width: 18px; height: 20px; background: #bcb79c; border: 2px solid #514d3c; box-shadow: 2px 2px #090b08; }
.supply-power::before { content: ''; position: absolute; z-index: 1; left: 29px; top: 20px; width: 6px; height: 3px; background: #79a19a; box-shadow: 0 5px #5a6753; }
#servers { min-height: 138svh; }
#signup { min-height: 100svh; }
#signup .copy-track { min-height: 86svh; }
.shelter-channel { display: flex; align-items: center; gap: 16px; }
.shelter-channel img { filter: drop-shadow(4px 4px #080d0a); }
.fields { display: flex; gap: 10px; margin-top: 28px; }
.fields input { flex: 1; min-width: 0; padding: 12px 10px; color: var(--ink); background: #171c15e8; border: 0; border-bottom: 2px solid #87946b; font-size: 20px; }
.fields input::placeholder { color: #b7bca5; }
.fields .button { flex-shrink: 0; font-size: 18px; white-space: nowrap; }
#form-message { margin: 12px 0 0; font-size: 18px; }
#form-message[data-state='success'] { color: #d3e4a4; }
#form-message[data-state='error'] { color: #ffad92; }
footer { padding: 20px; background: #0c100ff0; border-top: 1px solid #404635; color: #adb99b; font-size: 16px; line-height: 1.5; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes notification-arrive { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes message-loading { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }
@keyframes survivor-step { 0%, 50%, 100% { background-image: url('/sprites/476.png'); } 25% { background-image: url('/sprites/477.png'); } 75% { background-image: url('/sprites/478.png'); } }
.motion-paused .phone-notice, .motion-paused .walking-icon { animation: none; }
.motion-paused .loading-dots i { animation-play-state: paused; }
@media (min-width: 761px) and (max-width: 1100px) {
  #home .chapter-copy { width: min(520px, 48vw); }
}
@media (min-width: 761px) and (max-height: 800px) {
  #home .chapter-copy { top: calc(var(--nav-measured-height, var(--nav-height)) + 20px); margin-top: 20px; }
  #home h1 { margin-bottom: 18px; }
}
@media (max-width: 760px) {
  :root { --nav-height: 68px; }
  body { font-size: 18px; }
  .site-nav { padding: 10px 16px; gap: 14px; }
  .site-nav nav { gap: 4px 14px; font-size: 16px; line-height: 1.25; }
  .site-nav a small { display: none; }
  .route-hud { top: calc(var(--nav-measured-height, var(--nav-height)) + 12px); bottom: auto; right: 16px; width: 180px; padding: 8px; font-size: 14px; grid-template-columns: 15px 1fr; gap: 4px 9px; }
  .route-hud img { width: 12px; height: auto; }
  .level-view::after { background: linear-gradient(0deg, #09110df2 0, #09110db0 40%, transparent 76%); }
  .chapter { --copy-space: 440px; padding-inline: 22px; }
  #home { --copy-space: 650px; }
  #gear { --copy-space: 560px; }
  #demo { --copy-space: 420px; }
  #signup { --copy-space: 460px; }
  .copy-track, #signup .copy-track { min-height: 103svh; }
  .chapter-copy {
    top: max(calc(var(--nav-measured-height, var(--nav-height)) + 24px), calc(100svh - var(--copy-space)));
    margin-top: max(32px, calc(100svh - var(--copy-space) - var(--nav-measured-height, var(--nav-height))));
    width: 100%;
  }
  #home h1 { font-size: 48px; line-height: 1; margin: 12px 0 16px; }
  .chapter-copy > h2 { font-size: 48px; line-height: 1; margin-top: 14px; }
  #gear h2 { font-size: 44px; }
  .chapter-number { font-size: 15px; letter-spacing: .02em; }
  .chapter-copy > p:not(.chapter-number) { margin: 18px 0; font-size: 20px; line-height: 1.4; }
  .news-feed { padding: 10px 12px; border-width: 6px; border-image-width: 6px; margin-bottom: 16px; }
  .news-header h2 { font-size: 20px; }
  .news-context { font-size: 13px; }
  .notification-stack { min-height: 220px; }
  .news-feed article { grid-template-columns: 58px 1fr; gap: 4px 8px; padding: 10px 0; }
  .news-feed h3 { font-size: 18px; }
  .news-feed article p, .message-pending { font-size: 16px; }
  .news-feed time { font-size: 14px; }
  .button { padding: 10px 18px; font-size: 20px; }
  .chapter-copy > p.scroll-tip, .chapter-copy > p.play-meta { margin-top: 16px; font-size: 16px; line-height: 1.3; }
  .scene-artifact { margin-top: 22px; padding-top: 18px; gap: 18px; }
  .fuel-artifact img { width: 35px; height: 52px; }
  .artifact-caption { font-size: 18px; }
  #scene-state { font-size: 15px; }
  .rack-tokens { gap: 5px; }
  .scene-artifact .server-status { font-size: 18px; }
  .inventory-preview { gap: 10px; margin: 20px 0 12px; }
  .inventory-preview img { width: 80px; height: 55px; }
  .inventory-preview span { font-size: 16px; }
  .gear-list > div { grid-template-columns: 64px 1fr; gap: 3px 14px; padding: 12px 0; }
  .gear-list dt { font-size: 20px; }
  .gear-list dd { font-size: 18px; }
  .shelter-channel { gap: 12px; }
  .shelter-channel img { width: 19px; height: auto; }
  .fields { gap: 8px; margin-top: 22px; }
  .fields input { font-size: 18px; padding-inline: 8px; }
  .fields .button { font-size: 17px; padding-inline: 12px; }
  footer { font-size: 14px; padding: 16px; }
}
@media (max-width: 360px) {
  .chapter { padding-inline: 16px; }
  #home h1, .chapter-copy > h2 { font-size: 44px; }
  #gear h2 { font-size: 38px; }
  .site-nav nav { font-size: 15px; gap: 4px 10px; }
  .news-feed { padding-inline: 8px; }
  .news-feed article { grid-template-columns: 58px 1fr; gap: 4px 6px; }
  .news-feed h3 { font-size: 17px; }
  .fields { flex-wrap: wrap; }
  .fields input { min-width: 150px; }
}
@media (max-height: 600px) {
  .chapter-copy { top: calc(var(--nav-measured-height, var(--nav-height)) + 20px); margin-top: 32px; }
  .chapter { min-height: max(122svh, 750px); }
}
@media (prefers-reduced-motion: reduce) {
  .chapter-copy, .rack-mini { transition: none; }
  .phone-notice, .walking-icon, .loading-dots i { animation: none; }
}
/* Separate inventory-style navigation buttons. */
.site-nav { background: none; border: 0; padding-block: 16px; pointer-events: none; }
.site-nav nav { gap: 10px; }
.site-nav a, .wallet-trigger { pointer-events: auto; min-height: 46px; padding: 7px 14px; border: 7px solid transparent; border-image: url('/sprites/925.png') 5 fill / 7px / 0 stretch; color: #eee7d5; font-size: 18px; line-height: 1.1; }
.site-nav a:hover, .site-nav a:focus-visible { color: #e5d59e; filter: brightness(1.3); }
.site-nav a small { color: #b3bf9b; }
.wallet-trigger { display: flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; background: none; color: #dcc998; cursor: pointer; }
.wallet-trigger[data-connected] { color: #bfdaa4; }
.solana-mark { width: 20px; height: 14px; position: relative; background: linear-gradient(0deg,transparent 0 1px,#c7cfaa 1px 4px,transparent 4px 6px,#a8bd9e 6px 9px,transparent 9px 11px,#839e86 11px 14px); transform: skewX(-18deg); }
.wallet-dialog { position: fixed; width: min(460px,calc(100% - 32px)); max-height: calc(100svh - 40px); overflow-y: auto; padding: 26px; border: 10px solid transparent; border-image: url('/sprites/925.png') 5 fill / 10px / 0 stretch; color: var(--ink); font: 20px/1.4 var(--pixel); background: #1a1f17; box-shadow: 8px 10px #050a0780; }
.wallet-dialog::backdrop { background: #050c0be0; }
.wallet-dialog h2 { font-size: 36px; line-height: 1.1; margin: 14px 0; }
.wallet-dialog p { margin: 12px 0; }
.wallet-close { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.wallet-close button { border: 0; border-bottom: 1px solid #7a8660; background: none; color: #c0c9ac; font-size: 18px; cursor: pointer; }
#wallet-options { display: grid; gap: 10px; }
#wallet-options button, .wallet-account-actions button, #wallet-install a { padding: 12px 16px; border: 2px solid #8c9870; background: #27321e; color: #e1d8b9; font: inherit; text-align: left; }
#wallet-options button:hover, #wallet-install a:hover { background: #39482c; }
#wallet-options button:disabled { opacity: .6; cursor: wait; }
#wallet-account label { display: block; font-size: 16px; color: #b8c6a4; }
#wallet-address { width: 100%; margin: 8px 0 16px; padding: 12px 8px; border: 1px solid #718358; background: #111b0d; color: #e1d8b9; font: 16px var(--pixel); }
.wallet-account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#wallet-install { font-size: 18px; color: #c5ceb4; }
#wallet-install a { display: inline-block; margin: 8px 8px 0 0; }
#wallet-message { color: #dbc18c; font-size: 18px; min-height: 1.4em; }
@media (max-width: 1100px) and (min-width: 761px) {
  .site-nav { padding-inline: 22px; gap: 10px; }
  .site-nav nav { gap: 8px; }
  .site-nav a, .wallet-trigger { border-width: 6px; border-image-width: 6px; padding: 6px 9px; font-size: 16px; }
  .site-nav a small { display: none; }
}
@media (max-width: 760px) {
  .site-nav { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .site-nav nav { display: flex; flex-wrap: nowrap; flex-basis: 100%; min-width: 0; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: thin; scrollbar-color: #737e5d transparent; }
  .site-nav a { flex-shrink: 0; padding: 7px 10px; border-width: 6px; border-image-width: 6px; font-size: 16px; }
  .wallet-trigger { margin-left: auto; min-height: 40px; padding: 6px 12px; border-width: 6px; border-image-width: 6px; font-size: 16px; }
  .route-hud { width: 164px; }
  .wallet-dialog { padding: 20px 16px; }
  .wallet-dialog h2 { font-size: 32px; }
}
/* The scroll journey supplies the scene navigation; keep only the wallet action. */
.site-nav { position: fixed; top: 18px; right: 22px; z-index: 6; display: block; min-height: 0; padding: 0; width: auto; }
@media (max-width: 760px) { .site-nav { top: 12px; right: 16px; padding: 0; } .wallet-trigger { margin: 0; } }
