:root{color-scheme:dark;font-family:"Yu Gothic","Hiragino Kaku Gothic ProN",sans-serif;color:#f2f4ec;background:#092d2c}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;overscroll-behavior:none}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}
button:focus-visible,a:focus-visible{outline:3px solid #f3d99f;outline-offset:5px}
#experience{height:100svh;min-height:560px;position:relative;overflow:hidden;isolation:isolate;background:#092d2c}
#world{touch-action:none;user-select:none;-webkit-user-select:none;position:absolute;inset:0;transform-origin:59% 36%;transition:transform 1600ms cubic-bezier(.2,.65,.2,1);will-change:transform}
#scene,#water{position:absolute;width:100%;height:100%;inset:0;object-fit:cover}
#water{opacity:0;transition:opacity .4s}
#world.ready #water{opacity:1}
.shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(2,23,23,.65),rgba(2,23,23,.13) 28%,transparent 43%,transparent 65%,rgba(2,23,23,.4) 82%,rgba(2,23,23,.88));z-index:1}
header{position:absolute;z-index:3;top:0;left:0;right:0;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:calc(22px + env(safe-area-inset-top)) 24px 0}
.brand{text-decoration:none;color:inherit;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:19px;letter-spacing:.07em;text-shadow:0 2px 12px #062323}
.brand span{display:block;font-family:"Yu Gothic",sans-serif;font-size:12px;margin-top:7px;letter-spacing:.12em;opacity:.8}
.nav{border:1px solid #ffffff50;border-radius:24px;padding:10px 15px;background:#082b2b70;backdrop-filter:blur(10px);font-size:14px;min-height:44px}
.intro{position:absolute;z-index:2;left:26px;top:calc(104px + env(safe-area-inset-top));pointer-events:none;transition:opacity .5s,transform .8s;text-shadow:0 2px 22px #052626}
.intro p{font-size:14px;line-height:1.8;letter-spacing:.08em;margin:0 0 12px;color:#e4ede5}
h1{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-weight:500;font-size:clamp(24px,6.8vw,33px);line-height:1.6;letter-spacing:.05em;margin:0}
footer{position:absolute;z-index:3;bottom:0;left:0;right:0;padding:0 28px calc(18px + env(safe-area-inset-bottom));text-align:center}
#hint{font-size:12px;letter-spacing:.04em;margin:0 0 15px;color:#e1e9e1;text-shadow:0 1px 8px #092d2c}
.primary{width:100%;max-width:340px;min-height:55px;border:1px solid #f6e9c999;border-radius:32px;background:#e8e7d9;color:#173d37;font-weight:700;letter-spacing:.15em;box-shadow:0 6px 30px #001e1e30;transition:background .2s,transform .2s}
.primary:active{transform:scale(.98)}
.utilities{display:flex;justify-content:center;gap:28px;margin-top:12px}
.utilities button{background:none;border:0;font-size:14px;min-height:44px;padding:6px;color:#d2e1d9}
#spots{position:absolute;inset:0;opacity:0;transition:opacity .6s .6s}
.spot{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%) scale(.66);display:flex;flex-direction:column;align-items:center;gap:7px;min-width:76px;min-height:70px;border:0;background:none;padding:10px 4px;white-space:nowrap;text-shadow:0 1px 8px #102b20}
.spot i{display:block;border:2px solid #fffae5;width:25px;height:25px;border-radius:50%;box-shadow:0 0 0 7px #fff4d82b,0 0 25px #ffe9a599;background:#fff8dd33;animation:breathe 3s ease-in-out infinite}
.spot span{background:#103b32ed;border:1px solid #e5ecd340;border-radius:16px;padding:5px 10px;font-size:14px}
@keyframes breathe{50%{box-shadow:0 0 0 10px #fff4d81b,0 0 30px #ffe9a5bb}}
.arrival{position:absolute;z-index:2;top:calc(110px + env(safe-area-inset-top));width:100%;text-align:center;font-size:14px;opacity:0;transition:opacity .4s;pointer-events:none;text-shadow:0 2px 15px #052626}
body.exploring #world{transform:scale(1.52)}
body.exploring #intro{opacity:0;transform:translateY(-10px)}
body.exploring #spots{opacity:1}
body.exploring .arrival{opacity:1;transition-delay:.7s}
body.still *,body.still *::before,body.still *::after{animation:none!important;transition-duration:0s!important;transition-delay:0s!important}
dialog{color:#eef3e9;background:#123c35;border:1px solid #d7e4cd33;border-radius:26px 26px 0 0;width:min(100%,500px);max-height:78svh;margin:auto auto 0;padding:22px 26px calc(32px + env(safe-area-inset-bottom));box-shadow:0 -12px 90px #001b1b80;line-height:1.9}
dialog::backdrop{background:#031b1c88;backdrop-filter:blur(5px)}
.panel-top{display:flex;align-items:center;justify-content:space-between;font-size:12px;letter-spacing:.08em;color:#b9d0bf}
#close{background:#ffffff0c;border:1px solid #ffffff25;width:44px;height:44px;border-radius:50%;font-size:26px;line-height:1}
h2{font-family:"Yu Mincho",serif;font-weight:500;font-size:28px;margin:22px 0 16px}
#panelBody p{font-size:16px;margin:0 0 18px}
#panelBody small{color:#bed0c4;display:block;font-size:14px}
.work-link{display:flex;justify-content:space-between;align-items:center;color:#f3f1df;text-decoration:none;padding:16px 0;border-top:1px solid #ffffff25;font-size:17px}
.work-link span{font-size:13px;color:#b7cec3}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(min-width:700px){#experience{max-width:480px;margin:auto;box-shadow:0 0 120px #020e0c}body{background:radial-gradient(ellipse at 50% 30%,#16473e,#051d1c 75%)}}
@media(max-height:700px){.intro{top:90px}.intro p{display:none}h1{font-size:24px}footer{padding-bottom:8px}#hint{margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* Move through the entrance before the interior page takes over. */
#doorway{position:absolute;inset:0;z-index:6;opacity:0;pointer-events:none;overflow:hidden;background:#302619;transition:opacity .65s .9s}
#doorway img{width:100%;height:100%;object-fit:cover;transform:scale(1.07)}
body.entering-room #world{transform:translateY(12%) scale(3.1);transition:transform 1.5s cubic-bezier(.4,0,.25,1);filter:brightness(.8)}
body.entering-room #doorway{opacity:1}
body.entering-room header,body.entering-room footer,body.entering-room #intro{opacity:0;transition:opacity .3s}
button.work-link{width:100%;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}#panelBody details{margin:18px 0}#panelBody summary{cursor:pointer;line-height:1.7}

/* Draft consultation notebook: choices first, short explanations second. */
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)){background:linear-gradient(110deg,#f4ebd7,#fff9e9 55%,#ece0c5);color:#343e33;border:1px solid #c6af7c;border-radius:22px 22px 0 0;padding:18px 20px 26px;max-height:90svh;box-shadow:0 -10px 75px #181d15a0,inset 6px 0 #d8c8a780}
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)) .panel-top{color:#5c6b57}
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)) #close{color:#465842;border-color:#87987d;background:transparent}
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)) h2{font-size:24px;margin:14px 0 16px;line-height:1.4}
#consultNotebook{line-height:1.5}
#consultNotebook h3{font-size:18px;font-weight:600;margin:16px 0 8px;outline:none}
.note-progress{display:flex;align-items:center;gap:7px;color:#6b755f}
.note-progress span{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#e0d9c6;font-size:11px}
.note-progress span.done{background:#3e6051;color:#fff8e5}
.note-progress i{height:1px;width:18px;background:#b8b99f}
#consultNotebook .note-progress small{font-size:11px;color:#6b755f;margin-left:auto}
#consultNotebook p.note-intro{font-size:12px;margin:0 0 14px;color:#64735d}
.note-options{display:grid;gap:8px}
.note-choice{display:flex;align-items:center;gap:12px;width:100%;min-height:61px;text-align:left;border:1px solid #c3c9b5;border-radius:12px;background:#fffdf38f;color:#344a3a;padding:10px 12px;font-family:inherit;cursor:pointer;line-height:1.4}
.note-choice>span:nth-child(2){flex:1}
.note-choice em{font-style:normal;display:grid;place-items:center;flex:0 0 31px;height:34px;border-radius:8px;background:#e1e6d5;color:#52664a;font-size:21px}
.note-choice b{font-size:14px;font-weight:600}
#consultNotebook .note-choice small{font-size:11px;color:#70795f;margin-top:3px}
.note-choice:hover,.note-choice.selected{background:#e6eddc;border-color:#657e5a}
.note-check{color:#60744d;font-size:19px}
.note-actions{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:16px 0 6px}
.note-actions button,.note-unsure{font:inherit;color:#506348;background:transparent;border:0;padding:10px 4px;cursor:pointer;min-height:44px;font-size:13px}
.note-actions .note-primary{background:#365d4c;color:#fff8e7;border-radius:12px;padding:12px 16px;border:1px solid #365d4c}
.note-actions button:disabled{opacity:.4;cursor:default}
#consultNotebook p.note-foot{font-size:11px;color:#73745e;margin:14px 0 0;line-height:1.6}
.note-label{display:block;font-size:12px;margin:14px 0 8px;color:#5d7155}
#consultMessage{box-sizing:border-box;width:100%;min-height:240px;resize:vertical;background:#fffdf4;border:1px solid #c6c5ad;border-radius:10px;color:#344a3a;padding:12px;font:14px/1.7 inherit;font-family:inherit;font-size:14px;line-height:1.7}
#consultNotebook #noteCopyStatus{font-size:12px;color:#3d654d;margin:8px 0}
#consultNotebook button:focus-visible{outline:2px solid #45684d;outline-offset:2px}
@media(max-height:650px){dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)){max-height:94svh}dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)) h2{font-size:21px;margin:10px 0}.note-choice{min-height:53px;padding:8px 10px}#consultNotebook h3{margin-top:10px}.note-options{gap:6px}}

/* Warm timber and paper echo the lakeside workroom. */
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)){background:#f6e9ce url("consult-desk-paper.png") center top/100% 100% no-repeat;background-attachment:local;border:1px solid #85603c;border-radius:14px 14px 0 0;padding-left:clamp(24px,7vw,34px);padding-right:clamp(24px,7vw,34px);box-shadow:0 -12px 80px #1f160cc0,inset 0 0 0 1px #f5dca46b;color:#3f4432}
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard))::backdrop{background:#201b1480;backdrop-filter:blur(3px)}
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)) .note-choice{background:#fffaf0b8;border-color:#b9a77d99;box-shadow:0 2px 5px #6445210c}
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)) .note-choice:hover,dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)) .note-choice.selected{background:#e4ead6ed;border-color:#657e5a}
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)) .note-choice em{background:#dce3cebd}
dialog:has(:is(#consultNotebook,#nagiDesk,#worksDesk,#profileCard)) #close{background:#fff9e4b3}
#consultNotebook .note-guide{display:flex;align-items:center;gap:10px;margin:8px 0 0;min-height:96px}#consultNotebook .note-guide h3{flex:1;margin:0;line-height:1.5}#consultNotebook .note-guide img{flex:0 0 76px;width:76px;height:100px;object-fit:contain;pointer-events:none}@media(max-height:650px){#consultNotebook .note-guide{min-height:80px}#consultNotebook .note-guide img{width:64px;height:84px;flex-basis:64px}}

#nagiDesk{line-height:1.6}
.nagi-welcome{display:flex;align-items:center;gap:14px;margin:12px 0 22px}
.nagi-welcome img{flex:0 0 100px;width:100px;height:140px;object-fit:contain}
.nagi-bubble{position:relative;flex:1;background:#fffdf0c9;border:1px solid #c7b995;border-radius:17px;padding:14px 12px;box-shadow:0 3px 10px #75562812}
.nagi-bubble:before{content:"";position:absolute;left:-7px;top:45%;width:12px;height:12px;transform:rotate(45deg);background:#fffaf0;border-left:1px solid #c7b995;border-bottom:1px solid #c7b995}
#panelBody .nagi-bubble p{font-size:14px;line-height:1.7;margin:0}
#panelBody .nagi-bubble p+p{margin-top:8px;font-weight:600}
#panelBody .nagi-caption{font-size:13px;margin:0 0 12px;color:#64735d}
#panelBody #nagiDesk details{margin:0}
#nagiDesk summary{list-style:none}#nagiDesk summary::-webkit-details-marker{display:none}
#nagiDesk small{font-size:11px;color:#70795f;margin-top:3px}
#nagiDesk .nagi-answer{padding:14px 12px 2px;border-left:2px solid #bbc9a8;margin:8px 8px 10px}
#nagiDesk .nagi-answer p{font-size:14px;margin:0 0 12px}
#panelBody .nagi-foot{font-size:11px;color:#70745f;margin:18px 0 0}
#nagiDesk :is(button,summary):focus-visible{outline:2px solid #45684d;outline-offset:3px}
@media(max-width:350px){.nagi-welcome{gap:10px}.nagi-welcome img{width:76px;height:112px;flex-basis:76px}.nagi-bubble{padding:12px 8px}#panelBody .nagi-bubble p{font-size:13px}}

/* Paper cards on the workroom's little collection shelf. */
#panelBody .works-intro{font-size:14px;line-height:1.8;color:#64705a;margin:0 0 22px}
.works-shelf{display:grid;gap:22px;padding-bottom:8px}
.works-card{position:relative;display:flex;align-items:center;gap:16px;padding:16px 14px 20px;border:1px solid #b7a17c;border-radius:10px 10px 5px 5px;background:#fffaf0e0;color:#3d4c39;text-decoration:none;box-shadow:0 7px 0 -1px #a67c4e,0 10px 0 -1px #755334,0 15px 12px -8px #59402265;transition:transform .18s,background .18s}
.works-card:hover{transform:translateY(-2px);background:#fffdf5}
.works-card:focus-visible{outline:3px solid #45684d;outline-offset:5px}
.works-art{position:relative;flex:0 0 82px;height:94px;display:grid;place-items:center;border-radius:7px;overflow:hidden;background:linear-gradient(145deg,#cdd8bd,#e7e8d2);box-shadow:inset 0 0 0 1px #657a4b20}
.works-lens{position:absolute;width:33px;height:33px;border:4px solid #52664b;border-radius:50%;left:17px;top:18px;background:#fffbe889;transform:rotate(-35deg)}
.works-lens:after{content:"";position:absolute;width:8px;height:27px;top:30px;left:12px;border-radius:4px;background:#75603f}
.works-mark{position:absolute;left:30px;top:15px;font-size:25px;color:#52664b;font-family:Georgia,serif}
.works-rank{background:linear-gradient(145deg,#e4d5ad,#f2e5c6)}
.works-medal{display:grid;place-items:center;width:48px;height:48px;border:3px double #ad8849;border-radius:50%;color:#886735;background:#f5e8be;font-size:29px;box-shadow:0 4px 0 #baa066}
.works-info{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:6px;line-height:1.5}
#worksDesk .works-info small{font-size:11px;color:#6e785f;letter-spacing:.1em}
.works-info strong{font-size:17px;font-weight:600}
.works-open{display:flex;align-items:center;gap:18px;font-size:12px;margin-top:4px;color:#fff8e8;background:#49634b;border-radius:20px;padding:7px 12px}
#panelBody .works-foot{font-size:11px;color:#74725c;margin:24px 0 0}
@media(max-width:350px){.works-card{gap:10px;padding:13px 10px 17px}.works-art{flex-basis:64px;height:84px}.works-info strong{font-size:15px}.works-open{padding:7px 10px;gap:8px}.works-lens{left:10px}.works-mark{left:23px}}
@media(prefers-reduced-motion:reduce){.works-card{transition:none}.works-card:hover{transform:none}}
/* Short conversations about Osamu, on the same warm paper as Nagi's guide. */
#profileCard .nagi-welcome{margin-top:0;margin-bottom:16px}
.profile-questions{display:grid;gap:10px}
.profile-question{border:1px solid #b9a77d99;background:#fffaf0b8;border-radius:12px;overflow:hidden;box-shadow:0 2px 5px #6445210c}
.profile-question summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px;padding:14px 13px;list-style:none;cursor:pointer;font-size:14px;font-weight:600;line-height:1.6;color:#344a3a}
.profile-question summary::-webkit-details-marker{display:none}
.profile-question summary i{position:relative;flex:0 0 16px;height:16px}
.profile-question summary i:before,.profile-question summary i:after{content:"";position:absolute;background:#63785a;left:2px;top:7px;width:12px;height:1px}
.profile-question summary i:after{transform:rotate(90deg)}.profile-question[open] summary i:after{transform:none}
.profile-question[open] summary{background:#e4ead680}
.profile-answer{padding:14px 15px 16px}
#panelBody .profile-answer p{font-size:14px;line-height:1.9;margin:0;color:#506047}
#panelBody .profile-invite{font-size:12px;margin:23px 0 10px;color:#65705b}
#profileCard .note-choice small{font-size:11px;color:#70795f;margin-top:4px}
#profileCard :is(button,summary):focus-visible{outline:2px solid #45684d;outline-offset:-3px}
.profile-back{display:block;min-height:44px;margin:12px auto 0;padding:8px 12px;font:inherit;font-size:12px;color:#586b4d;background:none;border:0;cursor:pointer}
@media(max-width:350px){.profile-question summary{font-size:13px;padding:12px 10px;gap:6px}#profileCard .note-choice{gap:8px}}
#panelBody .profile-question{margin:0}
