
:root{color-scheme:dark;background:#131c2e;color:#e8e8e8;font-family:'Pixelify Sans';font-size:22px;line-height:1.6}
*{box-sizing:border-box}
body{margin:0;overflow:hidden}
button,a{-webkit-tap-highlight-color:transparent}
a{color:inherit}
button{font-family:'Press Start 2P';font-size:9px;line-height:1.8;color:inherit;background:#131c2edb;border:2px solid #424c6e;padding:10px 12px;cursor:pointer}
button:hover,a:hover{filter:brightness(1.2);box-shadow:0 0 16px #e4a67222}
a:focus-visible,button:focus-visible,canvas:focus-visible{outline:3px solid #fee761;outline-offset:3px}
#stage{position:fixed;inset:0}
canvas{display:block;image-rendering:pixelated;touch-action:none;cursor:grab}
canvas:active{cursor:grabbing}
.masthead{position:fixed;top:24px;left:24px;right:24px;display:flex;align-items:center;justify-content:space-between;gap:20px;pointer-events:none}
.brand,.tools{pointer-events:auto}
.brand{text-decoration:none;font-family:'Press Start 2P';font-size:16px;line-height:1.8}
/* Keep the name readable over snow and sky as the valley pans. */
.brand strong{text-shadow:-1px -1px #131c2e,0 -1px #131c2e,1px -1px #131c2e,-1px 0 #131c2e,1px 0 #131c2e,-1px 1px #131c2e,0 1px #131c2e,1px 1px #131c2e}
.tools{display:flex;gap:10px}
#accessible-nav{position:fixed;z-index:15;right:24px;top:80px;width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 110px);overflow:auto;background:#131c2ef5;padding:24px;border:2px solid #424c6e}
#accessible-nav h2{font-family:'Press Start 2P';font-size:16px;margin-inline:8px}
#accessible-nav h3{font-family:'Press Start 2P';font-size:8px;letter-spacing:0;text-transform:uppercase;color:#e7b45f;margin:22px 8px 4px}
#accessible-nav h2+h3{margin-top:12px}
#accessible-nav a{display:block;padding:8px;text-decoration:none;border-bottom:1px solid #424c6e}
.skip{position:fixed;top:-200px;z-index:100;background:#fee761;color:#131c2e;padding:12px}
.skip:focus{top:12px}
.sr-nav{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.sr-nav:focus-within{position:fixed;z-index:50;inset:12px auto auto 12px;width:min(680px,calc(100vw - 24px));height:auto;max-height:calc(100dvh - 24px);overflow:auto;clip-path:none;padding:16px;background:#131c2ef5;border:2px solid #424c6e;font-family:Literata,serif;font-size:18px}
.sr-nav a{display:block;padding:10px 12px;min-height:44px;overflow-wrap:anywhere}
dialog{padding:0;width:100vw;max-width:100vw;margin:auto 0;border:0;border-top:3px solid #424c6e;border-bottom:3px solid #424c6e;max-height:calc(100dvh - 150px);background:#131c2ee8;color:#e8e8e8;overflow:hidden}
dialog[open]{display:flex;flex-direction:column}
dialog::backdrop{background:#131c2e22}
.panel-top{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:26px clamp(24px,5vw,80px);border-bottom:2px solid #424c6e55}
.panel-top h2{font-family:'Press Start 2P';font-size:clamp(13px,1.6vw,21px);line-height:1.8;margin:0;max-width:65ch}
.panel-top button{flex-shrink:0}
#panel-body{padding:28px clamp(24px,5vw,80px) 48px;overflow:auto;overscroll-behavior:contain;font-size:22px;line-height:1.6}
#panel-body>p{max-width:70ch}
.letter{color:#422f29;background-color:#ead4aa;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill='%23be8d59' fill-opacity='.15' d='M2 4h1v1H2zM18 15h2v1h-2zM7 27h1v1H7z'/%3E%3C/svg%3E")}
.letter button{background:transparent;color:#422f29;border-color:#8a6f30}
.projects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 48px}
.project{display:flex;gap:18px;padding:24px 0;text-decoration:none;border-bottom:2px solid #8a6f3044}
.project strong{display:block;font-family:'Press Start 2P';font-size:13px;line-height:1.8;margin-bottom:12px}
.project span span{display:block;max-width:65ch}
.number,time{font-family:'VT323';font-size:23px}
.section-title{font-family:'Press Start 2P';font-size:15px;line-height:1.8;margin:20px 0}.email,.text-link{color:#ffcd75}
.about-text{font-size:22px;line-height:1.6}
.email{overflow-wrap:anywhere}
#fade{position:fixed;inset:0;background:#000;opacity:0;pointer-events:none;z-index:2147483000;transition:opacity .6s}
#fade.paper-handoff{background:#f6efe4;transition:opacity .2s ease-in;pointer-events:auto}
#loading,#error{position:fixed;top:40%;left:10%;right:10%;text-align:center}
#audio-debug{position:fixed;bottom:12px;left:12px;z-index:100;background:#131c2eee;padding:12px;font:18px 'VT323';white-space:pre;pointer-events:none}
@media(prefers-reduced-motion:reduce){#fade{transition:none}}
@media(max-width:600px){.masthead{top:18px;left:16px;right:16px;align-items:flex-start}
.brand{font-size:9px;max-width:160px}
.tools{flex-direction:column;gap:6px}
button{font-size:8px;padding:8px}
dialog{height:100dvh;max-height:100dvh}
.panel-top{padding:22px 18px;gap:12px}
#panel-body{padding:22px 18px 40px}
.projects{grid-template-columns:1fr}
.project{gap:12px}
#accessible-nav{right:16px;top:110px}
}

/* Valley controls and project summaries. */
.pixel-button{display:inline-flex;align-items:center;text-decoration:none;font:9px/1.8 'Press Start 2P';padding:10px 12px;background:#131c2edb;border:2px solid #424c6e;white-space:nowrap}
#zoom-controls{position:fixed;right:24px;bottom:22px;display:flex;gap:6px}
#zoom-controls button{min-width:38px;font-size:14px}
body:not([data-view=valley]) #zoom-controls{display:none}
#panel-body,.project strong,.room p{font-family:'Literata',Georgia,serif;font-size:19px;line-height:1.65}
.project strong{font-size:23px;font-weight:600}
.number,.small-label{font-family:'Press Start 2P';font-size:9px;line-height:2}
.section-title{font-family:'Press Start 2P'}
.small-label{display:block;color:#c4ccda;margin-bottom:12px}
@media(max-width:600px){
 .masthead{top:16px;left:14px;right:14px;gap:10px}
 .brand{font-size:8px;max-width:140px;line-height:2}
 .tools{gap:5px;align-items:stretch}
 .tools button,.pixel-button{font-size:7px;padding:7px 9px;justify-content:center}
 #zoom-controls{right:14px;bottom:18px}
 #panel-body,.room p{font-size:18px;line-height:1.65}
}
.masthead{z-index:5}
@media(max-width:600px){}
.masthead{z-index:20}
#accessible-nav{z-index:25}

/* Round 4: plain client path and safe phone controls. */
:root{font-family:'Literata',Georgia,serif}
button,.pixel-button{font-size:10px;min-height:44px}
#thumb-bar{display:none}
.contact #panel-body{font:20px/1.7 'Literata',Georgia,serif}.proof{padding-left:24px}.proof li{margin:16px 0}.proof a{color:#ffcd75}.muted{color:#b9c6d6;font-size:17px}
.project-summary{height:calc(100dvh - 100px);max-height:calc(100dvh - 100px);margin:100px 0 0}.project-summary #panel-body>*{max-width:1000px}.project-summary img,.project-summary video{display:block;width:100%;height:auto;margin:26px 0;image-rendering:auto}.project-summary video{max-height:65vh}.project-links{display:flex;flex-wrap:wrap;gap:12px;margin:22px 0}.project-summary h3{font:12px/2 'Press Start 2P';margin-top:36px}.project-summary p,.project-summary li{font:19px/1.8 'Literata',Georgia,serif}
@media(max-width:599px){
 .masthead{top:14px;left:14px;right:14px;display:block}.brand{display:block;font-size:9px;max-width:180px;min-height:44px}.tools{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px;width:100%}.tools button,.tools .pixel-button{font-size:9px;padding:10px 7px;min-height:44px}.tools #sound,.tools #map-toggle{position:fixed;top:12px;min-height:44px;padding:7px;font-size:9px}.tools #sound{right:105px}.tools #map-toggle{right:12px}.brand{max-width:135px;font-size:9px;line-height:1.8;padding-right:6px}.tools #sound{top:12px}.tools #map-toggle{top:64px;right:12px}.tools #sound{right:12px}.tools{width:calc(100% - 110px);display:flex;flex-direction:column;align-items:flex-start;margin-top:4px}.tools .pixel-button{font-size:9px;min-height:44px;padding:7px 9px}
 #thumb-bar{position:fixed;z-index:22;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(3,1fr);gap:2px;background:#101a29;border-top:2px solid #424c6e;padding:8px 10px calc(8px + env(safe-area-inset-bottom))}#thumb-bar a{display:flex;align-items:center;justify-content:center;gap:9px;text-decoration:none;font:9px/1.8 'Press Start 2P';min-height:44px}#thumb-bar span{font:19px/1 monospace;color:#ffcd75}
 #zoom-controls{bottom:78px}#accessible-nav{top:168px;max-height:calc(100dvh - 250px)}.project-summary{margin-top:145px;height:calc(100dvh - 205px);max-height:calc(100dvh - 205px)}dialog:not(.project-summary){height:calc(100dvh - 62px);max-height:calc(100dvh - 62px);margin:0}.contact #panel-body{font-size:18px}.contact .email{font-size:16px}.panel-top h2{font-size:12px}.contact .panel-top{padding:18px}.contact #panel-body{padding:18px}.project-summary .panel-top h2{font-size:12px}.project-summary p,.project-summary li{font-size:18px}
 body:has(dialog[open]) #thumb-bar{display:none}
}

#cabin-interior~#thumb-bar{display:none}
body:has(#cabin-interior[data-visible]) .masthead,body:has(#cabin-interior[data-visible]) #thumb-bar{display:none}

/* Memory is shown by bookmarks and props, without counters in the reading UI. */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.book-posts{list-style:none;padding:0;margin:16px 0 32px}
.book-posts li{display:flex;align-items:center;gap:24px;border-bottom:1px solid #8b9bb433;padding:18px 0}
.book-posts li>a:first-child{position:relative;padding-left:22px;font:20px/1.7 'Literata',Georgia,serif;text-decoration:none}
.ribbon{display:inline-block;width:7px;height:18px;background:#b45a58;clip-path:polygon(0 0,100% 0,100% 100%,50% 78%,0 100%);vertical-align:middle}
.book-posts li>a:first-child .ribbon{position:absolute;left:0;top:7px}
.resume-ribbon{background:#e4a672;margin-right:9px}
.resume-post{flex-shrink:0;font:9px/2 'Press Start 2P';min-height:44px;display:flex;align-items:center}
.article{height:calc(100dvh - 108px);max-height:calc(100dvh - 108px);margin:108px 0 0;background:#131c2ef2}
.valley-prose,.article-end{max-width:68ch;margin:0 auto;font:20px/1.8 'Literata',Georgia,serif}
.valley-prose p{margin:0 0 1.2em}.valley-prose h2,.valley-prose h3{font-family:'Press Start 2P';font-size:14px;line-height:2}
.valley-prose img{max-width:100%;height:auto;image-rendering:auto}
.article-end{margin:44px auto 0;border-top:1px solid #8b9bb444;padding-top:22px}
.article-end nav{display:flex;flex-wrap:wrap;gap:16px 28px}.article-end a{color:#ffcd75}
/* An actual button anchored each frame to the smoke's world coordinates. */
#sound-note{position:fixed;z-index:4;display:grid;place-items:center;transform:translate(-50%,-100%);width:46px;height:44px;min-height:44px;padding:8px;color:#ead4aa;background:#262b44;border:2px solid #8b9bb4;box-shadow:3px 3px 0 #181425;image-rendering:pixelated}
#sound-note::after{content:'';position:absolute;bottom:-8px;left:19px;width:8px;height:8px;background:#262b44;border-right:2px solid #8b9bb4;border-bottom:2px solid #8b9bb4}
#sound-note[hidden]{display:none}#sound-note svg{pointer-events:none;shape-rendering:crispEdges}
@media(max-width:599px){.book-posts li{gap:12px;align-items:flex-start}.book-posts li>a:first-child{font-size:18px}.resume-post{font-size:8px}.article{height:calc(100dvh - 62px);max-height:calc(100dvh - 62px);margin:0}.valley-prose,.article-end{font-size:18px}}

/* Quiet, text-free game affordances. Decorative pixels have no selectors. */
:root{--pixel-hand:url('../art/pixel-hand.svg') 8 2;--cue-rim:#ead4aa80}
body[data-mood="noon"],body[data-mood="morning"]{--cue-rim:#c0cbdc80}
#world,#world:active{cursor:default}
a[href],button,[role="button"]{cursor:var(--pixel-hand),pointer}
a[href]:hover,button:hover{filter:none;box-shadow:0 0 0 1px var(--cue-rim)}
a[href],button{position:relative}
[data-scene-cue="glint"]::after{content:"";position:absolute;right:18%;top:26%;width:2px;height:2px;background:#ead4aa;pointer-events:none;animation:scene-glint 1.2s ease-in-out both}
[data-scene-cue="breath"]{animation:scene-breath 2.8s ease-in-out both}
a:active,button:active{transform:translateY(1px)}
@keyframes scene-glint{0%,100%{opacity:0}50%{opacity:.28;box-shadow:2px 0 #ead4aa44,-2px 0 #ead4aa44,0 2px #ead4aa44,0 -2px #ead4aa44}}
@keyframes scene-breath{0%,100%{filter:brightness(1)}50%{filter:brightness(1.055)}}
@media(prefers-reduced-motion:reduce){[data-scene-cue]{animation:none!important}[data-scene-cue]::after{display:none}a:active,button:active{transform:none}}

.pixel-tap{position:fixed;z-index:2147482999;width:3px;height:3px;background:#ead4aa;pointer-events:none;animation:tap-pixels .45s ease-out both}
@keyframes tap-pixels{0%{opacity:.35;box-shadow:3px 0 #ead4aa,-3px 0 #ead4aa,0 3px #ead4aa,0 -3px #ead4aa}100%{opacity:0;box-shadow:12px 0 #ead4aa,-12px 0 #ead4aa,0 12px #ead4aa,0 -12px #ead4aa}}

/* Final phone pass: controls keep their screen-space targets; art is untouched. */
@media(max-width:599px){
 .tools #sound,.tools #map-toggle{min-height:40px;min-width:100px}
 .tools #map-toggle{top:58px}
 .tools .pixel-button{min-height:40px}
 .projects{grid-template-columns:1fr}.project{gap:12px}.project strong{font-size:11px}
 .article .panel-top{padding:14px 16px;gap:12px}.article .panel-top h2{font-size:11px}
 .article #panel-body{padding:22px 20px 38px}.valley-prose{line-height:1.85}
}
@media(max-height:500px) and (min-width:600px){
 .masthead{top:12px;left:14px;right:14px;gap:12px}.brand{font-size:9px}.tools{gap:6px}
 .tools button,.tools .pixel-button{font-size:8px;padding:8px;min-height:40px}
 #zoom-controls{bottom:16px}#accessible-nav{top:64px;max-height:calc(100dvh - 80px)}
 .article{margin-top:64px;height:calc(100dvh - 64px);max-height:calc(100dvh - 64px)}
 .article .panel-top{padding:10px 20px}.article .panel-top h2{font-size:12px}
 .article #panel-body{padding:18px 24px 32px}.valley-prose{font-size:18px}
}

#zoom-controls button{min-width:40px;min-height:44px}
#sound{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.sound-icon{flex:none;shape-rendering:crispEdges}
#sound[data-enabled="false"] .sound-playing,#sound[data-enabled="true"] .sound-muted{display:none}
@media(max-width:600px){
 .masthead{top:10px;left:12px;right:12px;display:flex;align-items:center;gap:8px;height:44px}
 .masthead .brand{display:flex;min-height:40px;max-width:none;font-size:11px;white-space:nowrap;padding:0;line-height:1}
 .masthead .tools{display:flex;flex-direction:row;position:static;align-items:center;width:auto;gap:7px;margin:0}
 .masthead #work-button,.masthead #blog-button,.masthead #projects-button,.masthead .masthead-social{display:none}.masthead .contact-stack{display:contents}
 .masthead .tools #sound,.masthead .tools #map-toggle{position:static;min-width:40px;min-height:40px;top:auto;right:auto;margin:0;padding:6px;font-size:8px}
 .masthead .tools #sound{width:40px;height:40px;padding:6px}
 .sound-label{display:none}
 #accessible-nav{top:66px;max-height:calc(100dvh - 140px)}
 .project-summary{margin-top:66px;height:calc(100dvh - 126px);max-height:calc(100dvh - 126px)}
}
@media(max-width:359px){.masthead .brand{font-size:9px}.masthead .tools{gap:4px}.masthead{gap:4px}}
@media(pointer:coarse){#zoom-controls{display:none}}
.brand{display:flex;align-items:center;min-height:40px}
body:has(dialog[open]) .masthead,body:has(dialog[open]) #zoom-controls{visibility:hidden}
.article-end nav a,.book-posts li>a:first-child{min-height:40px;display:inline-flex;align-items:center}

/* Element review 2026-10-19: the letter is a sheet of paper, the mailbox takes a postcard,
   posts show their date and topic, the fire tells who he is. */
dialog.letter{width:min(760px,calc(100vw - 48px));max-width:760px;margin:auto;background-color:#f3e7cc;border:1px solid #c9ab76;box-shadow:0 18px 60px #0009;transform:rotate(-.4deg);transform-origin:left center;animation:letter-unfold .25s ease-out;background-image:repeating-linear-gradient(to bottom,transparent 0 31px,#d9c49a 31px 32px)}
dialog.letter .panel-top{border-bottom:1px solid #b89a6388}
.letter .projects{grid-template-columns:1fr}
.letter .salutation,.letter .signoff{font-style:italic;font-size:21px;margin:8px 0 18px}
.letter .signoff{text-align:right;margin:28px 8px 4px}
@keyframes letter-unfold{from{transform:rotate(-.4deg) scaleY(.15);opacity:.4}}
@media(prefers-reduced-motion:reduce){dialog.letter{animation:none}}
.about-jobs{list-style:none;padding:0;margin:0 0 8px;max-width:70ch}.about-jobs li{display:flex;flex-wrap:wrap;gap:4px 14px;padding:10px 0;border-bottom:1px solid #424c6e66}.about-jobs strong{font-weight:600}.about-jobs span{color:#b9c6d6}
.post-meta{font:20px/1.5 'Literata',Georgia,serif;max-width:68ch;margin:0 auto 18px;color:#b9c6d6}.post-meta small{font-size:15px}
@media(max-width:599px){
 dialog.letter{width:100vw;max-width:100vw;margin:0;transform:none;animation:none;border:0;box-shadow:none}
 .project strong{font-size:20px;line-height:1.3}.project span span{font-size:17px}
}

/* The sound invitation is drawn in the scene as a firefly; this button is only its hit area and keyboard target. */
#sound-note{background:transparent;border:0;box-shadow:none;color:transparent}#sound-note::after{display:none}#sound-note:focus-visible{outline:2px solid #fee761;outline-offset:2px}

/* The minus is a drawn bar, centred and as bright as the plus at every size. */
#zoom-controls button{color:#e8e8e8;display:flex;align-items:center;justify-content:center}
#zoom-out{font-size:0!important}#zoom-out::before{content:'';display:block;width:10px;height:2px;background:currentColor}

/* The mailbox reader is a letter to Divyansh on cream writing paper (mailbox-letter.js).
   Posting folds the sheet into an envelope; gentle italic notes instead of error boxes. */
dialog.mail-letter{--ink:#3b2a22;--ink-soft:#76563f;--rule:#d8c196;width:min(720px,calc(100vw - 48px));max-width:720px;max-height:calc(100dvh - 120px);margin:auto;color:var(--ink);background:#f3e7cc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill='%23be8d59' fill-opacity='.12' d='M2 4h1v1H2zM18 15h2v1h-2zM7 27h1v1H7z'/%3E%3C/svg%3E");border:1px solid #c9ab76;box-shadow:0 18px 60px #0009;transform:rotate(.3deg);animation:mail-unfold .25s ease-out}
@keyframes mail-unfold{from{transform:rotate(.3deg) scaleY(.15);opacity:.4}}
dialog.mail-letter .panel-top{border-bottom:1px solid #c9ab7688;padding-top:20px;padding-bottom:20px}
dialog.mail-letter .panel-top h2{color:var(--ink)}
dialog.mail-letter button{background:transparent;color:var(--ink);border-color:#a98a5c}
dialog.mail-letter #panel-body{position:relative;font:19px/32px 'Literata',Georgia,serif;color:var(--ink)}
.mail-letter .dateline{text-align:right;font-style:italic;font-size:16px;color:var(--ink-soft);margin:0 0 4px;max-width:none}
.mail-letter .salutation{font-style:italic;font-size:22px;margin:0 0 4px}
#letter-message{display:block;width:100%;min-height:calc(32px * 7);margin:0;padding:0 2px;border:0;resize:vertical;font:19px/32px 'Literata',Georgia,serif;color:#2f2119;caret-color:#2f2119;background:transparent repeating-linear-gradient(to bottom,transparent 0 31px,var(--rule) 31px 32px);background-attachment:local;outline:none}
.mail-letter input{font:19px 'Literata',Georgia,serif;color:#2f2119;background:transparent;border:0;border-bottom:1px solid #8a6f50;padding:4px 2px;min-height:40px;width:100%;outline:none;border-radius:0}
#letter-message:focus-visible{box-shadow:-14px 0 0 -12px #a98a5c}
.mail-letter input:focus-visible{border-bottom:2px solid var(--ink)}
.mail-letter [aria-invalid="true"]{background-color:#ecd7b0}
.letter-sign{display:grid;gap:0;width:min(330px,100%)}
.letter-sign .yours{font-style:italic;margin:0}
.sign-line{display:flex;flex-direction:column}
.sign-line span{font:italic 14px/1.6 'Literata',Georgia,serif;color:var(--ink-soft)}
.letter-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.letter-note{min-height:28px;margin:8px 0 0;font-style:italic;font-size:17px;line-height:1.6;color:#7b3a24;max-width:none}
.letter-note a{color:inherit}
.letter-note{scroll-margin-block:16px}
/* Signature on the right like a letter; the stamp to its left (DOM order keeps Post it after the email). */
.letter-foot{display:flex;flex-direction:row-reverse;align-items:flex-end;justify-content:space-between;gap:14px 24px;margin-top:12px}
.plain-address{margin:2px 0 0;font-size:15px;line-height:1.6;color:var(--ink-soft)}
dialog.mail-letter .plain-address .email{color:#6b3f22;font-size:15px}
dialog.mail-letter #copy-email{font-size:8px;min-height:32px;padding:4px 8px;margin-left:4px;vertical-align:middle}
dialog.mail-letter .stamp-button{position:relative;width:96px;height:112px;padding:62px 4px 6px;font:9px/1.5 'Press Start 2P';color:#f3e7cc;background:radial-gradient(circle at 50% 34%,#feae34 0 11px,#e4a67255 12px 15px,transparent 16px),linear-gradient(#5a6988,#3a4466);border:6px dotted #f3e7cc;outline:1px solid #c9ab76;box-shadow:2px 3px 0 #3b2a2233;transform:rotate(2.5deg);flex-shrink:0;margin:0 6px 4px 0}
dialog.mail-letter .stamp-button:hover{transform:rotate(0deg);box-shadow:2px 3px 0 #3b2a2255}
dialog.mail-letter .stamp-button:focus-visible{outline:3px solid #3b2a22;outline-offset:3px}
.letter-ps{margin-top:30px;padding-top:18px;border-top:1px dashed #c9ab76;font-size:17px;line-height:1.7}
.letter-ps p{margin:0 0 6px;max-width:62ch}.letter-ps .proof{margin:0}.letter-ps .proof li{margin:6px 0}dialog.mail-letter .letter-ps .proof a{color:#6b3f22}
/* Sending: the sheet folds into thirds and becomes an envelope; on success one line is written on it. */
.envelope{display:none;position:absolute;left:50%;top:120px;width:min(340px,82%);aspect-ratio:16/10;transform:translateX(-50%);background:#ead4aa;border:1px solid #b89a63;box-shadow:0 10px 26px #3b2a2244;align-items:flex-end;justify-content:center;padding:0 16px 14%;text-align:center}
.envelope::before{content:'';position:absolute;inset:0 0 42% 0;background:#e0c896;clip-path:polygon(0 0,100% 0,50% 100%);box-shadow:inset 0 1px #f3e7cc}
.envelope::after{content:'';position:absolute;top:10px;right:12px;width:26px;height:31px;background:radial-gradient(circle at 50% 40%,#feae34 0 4px,transparent 5px),linear-gradient(#5a6988,#3a4466);border:3px dotted #ead4aa}
.envelope-line{position:relative;font:italic 18px/1.5 'Literata',Georgia,serif;color:var(--ink);opacity:0;transition:opacity .6s ease .1s}
/* Transitions live on the sending state only, so a failed send brings the paper straight back. */
dialog.mail-letter.sending{background-color:transparent;background-image:none;border-color:transparent;box-shadow:none;transition:background-color .45s ease .3s,border-color .45s ease .3s,box-shadow .45s ease .3s}
dialog.mail-letter.sending .panel-top{opacity:0;transition:opacity .3s}
dialog.mail-letter.sending #panel-body{overflow:hidden}
dialog.mail-letter.sending .letter-sheet{background:#f3e7cc;outline:22px solid #f3e7cc;box-shadow:0 0 0 23px #c9ab7699,0 18px 50px 20px #0007;animation:fold-letter .75s ease-in forwards;transform-origin:50% 0;pointer-events:none}
dialog.mail-letter.sending .letter-ps{visibility:hidden}
dialog.mail-letter.sending .envelope{display:flex;animation:envelope-in .4s ease-out .5s both}
dialog.mail-letter.posted .envelope-line{opacity:1}
dialog.mail-letter.leaving .envelope{transition:transform .38s ease-in,opacity .38s ease-in;transform:translate(-50%,46px) scale(.55);opacity:0}
@keyframes fold-letter{0%{transform:none;opacity:1}40%{transform:perspective(900px) rotateX(58deg) scaleY(.66);opacity:1;filter:brightness(.95)}75%{transform:perspective(900px) rotateX(78deg) scaleY(.34);opacity:.9}100%{transform:translateY(60px) scale(.45,.2);opacity:0}}
@keyframes envelope-in{from{opacity:0;transform:translateX(-50%) scale(1.25,1.5)}}
@media(prefers-reduced-motion:reduce){
 dialog.mail-letter{animation:none}
 dialog.mail-letter.sending .letter-sheet{animation:letter-fade .25s linear forwards}
 dialog.mail-letter.sending .envelope{animation:letter-fade .25s linear reverse both}
 dialog.mail-letter.leaving .envelope{transition:opacity .2s;transform:translateX(-50%)}
 .envelope-line{transition:none}
 dialog.mail-letter .stamp-button,dialog.mail-letter .stamp-button:hover{transform:none}
}
@keyframes letter-fade{to{opacity:0}}
@media(max-width:599px){
 dialog.mail-letter{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;transform:none;animation:none;border:0;box-shadow:none}
 dialog.mail-letter .panel-top{padding:14px 16px}
 dialog.mail-letter #panel-body{padding:14px 18px 28px;font-size:18px}
 #letter-message{min-height:calc(32px * 6);font-size:18px}
 .letter-foot{flex-direction:column;align-items:stretch}.letter-sign{width:100%}
 dialog.mail-letter .stamp-button{width:84px;height:98px;padding-top:52px;align-self:flex-end}
 .envelope{top:24px}
}
/* r2: the name sits on the same navy plate as the buttons, so it stays legible
   over pale canvas, rock or snow (critique r2 #14). */
.masthead .brand{background:#131c2edb;border:2px solid #424c6e;padding:0 12px;min-height:44px;box-sizing:border-box;display:flex;align-items:center}
@media(max-width:600px){.masthead .brand{padding:0 8px;min-height:44px}.masthead .tools #sound,.masthead .tools #map-toggle{min-height:44px;min-width:44px}.masthead .tools #sound{width:44px;height:44px}}
@media(pointer:coarse){.masthead .tools button,.masthead .tools .pixel-button{min-height:44px}#zoom-controls button{min-width:44px;min-height:44px}}
/* Landscape touch laptops/phones also retain the full 44px control height. */
@media(max-height:500px) and (min-width:600px){.masthead .tools button,.masthead .tools .pixel-button{min-height:44px}}
#accessible-nav a{min-height:44px}
@media(max-width:600px),(max-height:500px),(pointer:coarse){
 dialog.mail-letter input{min-height:44px}
 dialog.mail-letter #copy-email{min-height:44px;min-width:44px}
 dialog.mail-letter .plain-address a,dialog.mail-letter .letter-note a,dialog.mail-letter .proof a,dialog.about a.email{display:inline-flex;align-items:center;min-height:44px}
}

/* Full-review fixes: one opaque, scrollable card with a deliberate bottom edge. */
dialog.letter,dialog.mail-letter,dialog.about{transform:none;max-height:calc(100dvh - 96px);height:auto;margin:auto;width:min(760px,calc(100vw - 48px))}
dialog::backdrop{background:rgba(10,14,24,.6)}
.panel-top{flex:none}
#panel-body{flex:1 1 auto;min-height:0;padding-bottom:48px;scroll-padding-block:24px}
#panel-body.more-below{mask-image:linear-gradient(#000 calc(100% - 32px),transparent)}
dialog.pointer-open #close-panel:focus-visible{outline:none}
dialog.letter{background-image:none;animation:none}
.letter .project{line-height:32px}
.letter .number{flex:0 0 22px;font-variant-numeric:tabular-nums}
dialog.about{color:#3a2a1c;background:#f1e4c4;border:1px solid #b89a63;box-shadow:0 18px 60px #0009}
dialog.about .panel-top{border-color:#b89a6388}
dialog.about button{color:inherit;background:transparent;border-color:#8a6f50}
.about-jobs li{display:block;border-color:#8a6f3044}
.about-jobs strong,.about-jobs span{display:block}
.about-jobs span{font-size:18px;color:#6b4f3a}
dialog.about .email{color:#6b3f22}
body:is([data-mood="deep"],[data-mood="evening"],[data-mood="predawn"]) dialog.about{background:#151c2e;color:#e8dfc8;border-color:#424c6e}
body:is([data-mood="deep"],[data-mood="evening"],[data-mood="predawn"]) .about-jobs span{color:#bbc2d0}
body:is([data-mood="deep"],[data-mood="evening"],[data-mood="predawn"]) dialog.about .email{color:#e9c46a}
.explore-caret{transform:translateY(-2px)}
#letter-message{resize:none}
#letter-message:focus-visible{box-shadow:none;border-bottom:2px solid #76563f}
.plain-address{display:flex;flex-wrap:wrap;align-items:center;gap:0 6px}
dialog.mail-letter #copy-email{margin-left:0;flex:none}
.plain-address .email{overflow-wrap:anywhere;min-width:0}
.plain-address .plain-more{display:flex;align-items:center;gap:0 6px;white-space:nowrap}
#zoom-in{padding-top:12px;padding-bottom:8px}
#zoom-controls{background:#131c2e;border:2px solid #424c6e;padding:2px;opacity:.95}
#fade.paper-handoff.night-handoff{background:#141a2a}
@media(pointer:coarse){#zoom-controls{display:none}}
@media(max-width:599px){
 dialog.letter,dialog.mail-letter,dialog.about{height:100dvh;max-height:100dvh;width:100vw;max-width:100vw;margin:0;border:0;border-radius:0}
 .letter #panel-body,.about #panel-body{padding:22px 18px 48px}
 .about-text{font-size:19px}
 .about-jobs span{font-size:17px}
 .plain-address{font-size:14px}
 dialog.mail-letter .plain-address .email{font-size:14px;flex:0 1 auto;max-width:calc(100% - 60px)}
 .plain-address .plain-sep{display:none}
 .plain-address #copy-status:empty{margin-left:-6px}
}
@media(max-height:500px) and (min-width:600px){
 .masthead{top:max(12px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right))}
}

/* First visit only: one small line that teaches the valley, gone after the first tap. */
#glow-hint{position:fixed;z-index:5;left:24px;bottom:26px;margin:0;font:8px/1.8 'Press Start 2P',monospace;color:#ead4aa;letter-spacing:.04em;padding:7px 11px;background:#131c2ee0;border:2px solid #424c6e;box-shadow:3px 3px 0 #181425;pointer-events:none;opacity:0;transition:opacity .8s ease}
#glow-hint.on{opacity:1}
#glow-hint[hidden],body:not([data-view=valley]) #glow-hint,body:has(dialog[open]) #glow-hint,body:has(#cabin-interior[data-visible]) #glow-hint{display:none}
@media(max-width:599px){#glow-hint{left:14px;bottom:calc(84px + env(safe-area-inset-bottom))}}
/* The room covers the whole valley page. Keep Tab and screen readers inside the room, not on the covered links behind it. */
body:has(#cabin-interior[data-visible]) :is(.skip,#who,.sr-nav,#stage,#sound-note,.masthead,#accessible-nav,#thumb-bar,#zoom-controls){visibility:hidden}
@media(prefers-reduced-motion:reduce){#glow-hint{transition:none}}

@media(pointer:coarse){
 #sound-note{touch-action:none}
 .masthead{top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}
 #thumb-bar{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
 dialog.letter,dialog.mail-letter,dialog.about{padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
 #accessible-nav{right:max(16px,env(safe-area-inset-right))}
}
@media(pointer:coarse) and (min-width:600px) and (max-height:500px){
 #glow-hint{left:max(16px,env(safe-area-inset-left));bottom:max(16px,env(safe-area-inset-bottom));max-width:180px}
}

/* Valley-only monitor grade; room canvases keep their existing colour. */
#world{filter:saturate(1.18) contrast(1.035);}

/* Owner 1 Nov: phone keyboard open - fit above it, shrink the writing box, keep Post it in reach. */
dialog.mail-letter .kb-post{display:none}
dialog.mail-letter.kb-open{top:var(--vvt,0);height:var(--vvh,100dvh)!important;max-height:var(--vvh,100dvh)!important;margin:0}
dialog.mail-letter.kb-open #letter-message{min-height:calc(32px * 3)!important;height:calc(32px * 3)}
dialog.mail-letter.kb-open .kb-post{display:block;flex:none;margin:0;width:100%;min-height:48px;border:0;border-top:1px solid #c9ab76;background:#3a4466;color:#f3e7cc;font:10px/1.6 'Press Start 2P',monospace;letter-spacing:.06em;cursor:pointer}
dialog.mail-letter.kb-open .stamp-button{display:none}
dialog.mail-letter.sending .kb-post{display:none}

/* Owner 1 Nov: Contact with socials under it, and a Work button. */
.masthead .contact-stack{display:flex;flex-direction:column;gap:6px;pointer-events:auto}
.masthead .masthead-social{display:flex;justify-content:space-between;gap:4px;pointer-events:auto}
.masthead .masthead-social a{display:grid;place-items:center;flex:1;height:28px;color:#e8e8e8;background:#131c2edb;border:2px solid #424c6e;text-decoration:none}
.masthead .masthead-social a:hover,.masthead .masthead-social a:focus-visible{color:#feae34;border-color:#e7b45f;outline:none}
.masthead #projects-button{pointer-events:auto}
@media(max-width:600px){.masthead .masthead-social,.masthead #projects-button{display:none}}
/* Owner 2 Nov: Contact and its socials read as one panel, same height as the buttons beside it. */
@media(min-width:601px){
.masthead .contact-stack{gap:0;background:#131c2edb;border:2px solid #424c6e;min-width:156px}
.masthead .contact-stack #work-button{border:0;background:none;flex:1;justify-content:center;min-height:40px}
.masthead .contact-stack #work-button:hover,.masthead .contact-stack #work-button:focus-visible{color:#feae34}
.masthead .masthead-social{gap:0;border-top:2px solid #424c6e}
.masthead .masthead-social a{border:0;background:none;height:30px}
.masthead .masthead-social a+a{border-left:2px solid #424c6e}
.masthead .masthead-social a:hover,.masthead .masthead-social a:focus-visible{background:#feae3422}
}
@media(min-width:601px){.masthead .tools>button{white-space:nowrap}}
/* Owner 5 Nov: slimmer desktop masthead buttons (less tall, less wide). */
@media(min-width:601px){
.masthead .tools{gap:8px;align-items:stretch}
.masthead .tools>.pixel-button,.masthead .tools>button{min-height:0;padding:6px 10px;font-size:8px;line-height:1.6}
.masthead .contact-stack{min-width:120px}
.masthead .contact-stack #work-button{min-height:0;padding:5px 10px;font-size:8px;line-height:1.6}
.masthead .masthead-social a{height:22px}
.masthead .masthead-social svg{width:11px;height:11px}
.masthead #sound{gap:6px}.masthead #sound .sound-icon{width:14px;height:14px}
}

/* Owner 12 Nov: pixel-grid name sizes; room for the existing controls on tablets. */
@media(max-width:600px){.masthead .brand{font-size:8px}}
@media(min-width:601px) and (max-width:1000px){.masthead .tools{flex-wrap:wrap;justify-content:flex-end}#accessible-nav{top:160px;max-height:calc(100dvh - 190px)}}
