*{box-sizing:border-box}body{margin:0;background:#edf3fd;color:#273247;font-family:"Aptos","Segoe UI",system-ui,sans-serif}button,input,select{font:inherit}button,a,input,select,summary{outline-offset:5px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #315fa8}a{color:inherit;text-decoration:none}button{min-height:44px;border:1px solid #dce2ed;background:#ffffff;color:#273247;border-radius:14px;padding:10px 18px;cursor:pointer;font-weight:700;transition:background .15s}button:hover{background:#f3effb}button:disabled{opacity:.5;cursor:default}button[aria-pressed=true]{background:#315fa8;color:white;border-color:#315fa8}.world-shell{max-width:1320px;padding:0 42px;margin:auto}header{height:90px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dce2ed;font-size:14px}.brand{font-size:20px;font-weight:bold}.brand span{color:#675099;margin-right:8px}.heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:32px 0 24px}.eyebrow{font-size:11px;font-weight:bold;letter-spacing:2.3px;color:#606b80;margin:0 0 9px}h1{font-size:38px;letter-spacing:-1.5px;margin:0;font-weight:700}h1 span{font-size:24px;color:#675099;vertical-align:top;margin-left:15px}.wallet{background:#fff7db;border:1px solid #ead695;border-radius:30px;padding:12px 20px;white-space:nowrap}.wallet span{color:#856917;font-size:25px;vertical-align:middle}.wallet strong{font-size:22px}.wallet small{margin-left:5px}.toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:14px;flex-wrap:wrap}.toolbar>div{display:flex;gap:8px}#save-status{font-size:12px;margin-left:auto;color:#246752}.room-frame{border:9px solid #ffffff;box-shadow:0 5px 0 #cfdaed,0 12px 35px #315fa815;border-radius:23px;overflow:hidden;background:#dceafc;position:relative}#game{aspect-ratio:2;width:100%;touch-action:none}canvas{display:block;touch-action:none}#room-caption{text-align:center;font-size:12px;margin:0;padding:10px;background:#ffffff;color:#606b80;letter-spacing:.3px}.below-room{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:24px 3px}.room-label{display:flex;flex-direction:column;gap:5px;font-size:14px}.room-label span{font-size:12px;color:#606b80}.object-picker{display:flex;gap:12px;align-items:center;font-size:12px}select{max-width:240px;padding:11px;border:1px solid #dce2ed;background:#ffffff;border-radius:12px;color:inherit}#selected{background:#f3effb;border-radius:20px;padding:20px;display:flex;gap:25px;align-items:center;margin:18px 0}#selected[hidden]{display:none}#selected>div:first-child{flex:1;min-width:200px}h2{font-size:20px;margin:0 0 8px}#selected-state{font-size:13px;line-height:1.6;margin:0}#actions{display:flex;gap:8px;flex-wrap:wrap;flex:1}#actions button{font-size:12px;padding:9px 14px}details{font-size:12px;line-height:1.7;margin-top:20px}summary{cursor:pointer}.lock-form{text-align:right}.quiet{background:transparent;border:none;font-size:12px;font-weight:normal}footer{text-align:center;font-size:12px;color:#606b80;padding:30px}.portrait-note{display:none}dialog{border:1px solid #dce2ed;border-radius:25px;background:#edf3fd;color:inherit;width:min(850px,94vw);max-height:85vh;padding:28px;box-shadow:0 20px 80px #34212538}dialog::backdrop{background:#483e4d66;backdrop-filter:blur(3px)}.drawer-heading{display:flex;justify-content:space-between;align-items:center}#drawer-note{font-size:13px;line-height:1.6}#drawer-items{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}#drawer-items article{background:#ffffff;border:1px solid #dce2ed;border-radius:18px;padding:18px;text-align:center;display:flex;flex-direction:column;align-items:center}#drawer-items img{height:110px;width:130px;object-fit:contain;margin-bottom:8px}#drawer-items h3{font-size:14px;flex:1}#drawer-items button{font-size:12px;padding:9px} .busy #actions button,.busy #drawer-items button{pointer-events:none;opacity:.5}.welcome{text-align:center;margin:50px auto;max-width:600px}.welcome h1{font-size:48px;line-height:1.1}.welcome>img{max-width:100%;height:auto;margin:24px 0 0;border-radius:24px}.welcome p{line-height:1.7;font-size:14px}.welcome form{display:flex;flex-direction:column;max-width:300px;gap:12px;margin:25px auto}.welcome input{padding:12px;border:1px solid #dce2ed;border-radius:10px}.welcome form button{background:#315fa8;color:white} [role=alert]{color:#a1473b}@media(max-width:800px){.world-shell{padding:0 18px}header{height:68px}.heading{margin:23px 0 20px}h1{font-size:30px}.wallet{padding:9px 12px}.wallet small{display:none}#selected{flex-direction:column;align-items:stretch}.toolbar button{padding:9px 12px}.room-frame{border-width:5px;border-radius:16px}#drawer-items{grid-template-columns:repeat(2,1fr)}}@media(max-width:550px){.world-shell{padding:0 12px}.heading{gap:8px}h1{font-size:26px}.eyebrow{font-size:9px;letter-spacing:1.2px}.brand{font-size:17px}.portrait-note{display:block;font-size:12px;line-height:1.5;color:#606b80}.below-room{align-items:flex-start;flex-direction:column}.object-picker{width:100%}.object-picker select{flex:1;max-width:none}#save-status{width:100%;margin:0}dialog{padding:18px}#drawer-items article{padding:10px}#drawer-items img{width:95px;height:90px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Shared Issey’s Room design tokens; kept scoped to this standalone game. */
:root{--ink:#273247;--muted:#606b80;--blue:#6b9fe8;--blue-dark:#315fa8;--blue-light:#edf3fd;--lavender:#a995e8;--lavender-light:#f3effb;--mint:#77cdb5;--mint-light:#edf8f3;--yellow:#f4d77b;--line:#dce2ed}#edit{border-color:var(--blue)}#inventory{background:var(--lavender-light)}#shop{background:var(--mint-light)}#save-status{line-height:1.6}#room-caption{min-height:38px}button:focus-visible{outline-color:var(--blue-dark)}

#keyboard-objects{display:flex;flex-wrap:wrap;gap:8px;padding:14px 0}#keyboard-objects button{font-size:13px}#keyboard-objects button[aria-pressed=true]{background:var(--blue-dark);color:white}.keyboard-object-list:focus-within{border-radius:12px;outline:2px solid var(--blue);outline-offset:5px}.character-position{font-size:12px;color:var(--muted)}#put-away-dialog{max-width:480px}#put-away-dialog button{margin:6px}canvas:focus-visible{outline:4px solid var(--blue-dark);outline-offset:-5px}

.environment-note{font-size:.85rem;color:#53657a;text-transform:capitalize}#discovery-note{color:#6a5592;min-height:1em}#living-dialog{width:min(650px,92vw)}#living-content{display:grid;gap:12px;max-height:45vh;overflow:auto}#living-content article{padding:12px;background:#eef4fb;border-radius:12px}#book-form{display:grid;gap:12px;margin-top:20px}#book-form[hidden]{display:none}#book-form label{display:grid;gap:5px}#book-form input,#book-form select{font:inherit;padding:10px;border:2px solid #b7c8de;border-radius:8px}#living-dialog h3{margin:0 0 8px}#living-dialog button{min-height:44px}

.toolbar>div{flex-wrap:wrap;max-width:100%}#book-form input,#book-form select{min-width:0;width:100%}#living-content article{overflow-wrap:anywhere}
.toolbar>div{flex-basis:100%}#save-status{flex:1 0 100%;margin-left:0;min-height:20px}

/* One in-world interaction surface; closed overlays never receive gestures. */
.room-frame>.toolbar{padding:10px 12px 0;margin:0;background:#fff}.room-frame .toolbar>div{flex-basis:auto}.room-frame #save-status{flex:1;min-width:130px}.world-tools{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:8px 12px;background:#f3f6fc}.world-tools button,.world-tools select{font-size:12px;padding:6px 10px;min-height:38px}.world-tools label{font-size:12px}.world-tools .object-picker{width:auto;gap:4px;margin-left:auto}.world-tools .object-picker select{max-width:160px}#real-clock{font-size:12px;font-variant-numeric:tabular-nums}.room-frame #selected{position:absolute;z-index:5;margin:0;width:min(310px,calc(100% - 8px));padding:12px;display:block;background:#ffffffed;border:1px solid #c9dcec;box-shadow:0 6px 20px #33446622;border-radius:16px;max-height:48%;overflow:auto}.room-frame #selected[hidden]{display:none}.room-frame #selected>div:first-child{min-width:0}.room-frame #selected h2{font-size:15px}.room-frame #selected-state{font-size:11px;line-height:1.35;margin-bottom:7px}.room-frame #actions{gap:4px}.room-frame #actions button{padding:6px 8px;font-size:11px;min-height:38px}.room-frame dialog{position:fixed;inset:auto;margin:0;padding:18px;overflow:auto;z-index:20}.room-frame dialog form{display:grid;gap:10px;margin-top:16px}.room-frame dialog label{display:grid;gap:4px}.room-frame dialog input{min-width:0;width:100%;padding:9px;border:1px solid #b7c8de;border-radius:9px;font:inherit}.room-frame dialog select{max-width:100%}.room-frame dialog article{padding:10px;border-radius:12px;background:#fff;margin:6px 0}.room-frame dialog article button{margin:3px;font-size:12px}.calendar-navigation{display:flex;gap:8px;align-items:center;justify-content:space-between}.calendar-navigation h3{text-align:center;font-size:15px}.calendar-navigation button{font-size:12px;padding:8px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.calendar-grid button{font-size:12px;overflow:hidden;text-overflow:ellipsis;padding:6px 2px;min-height:42px}.calendar-grid .today{border:3px solid #315fa8;background:#e1efff}.week-grid{display:grid;grid-template-columns:repeat(7,minmax(100px,1fr));overflow:auto;gap:6px}.week-grid h3{font-size:12px}.week-grid p{font-size:12px}#clock-reading{font-size:32px;font-variant-numeric:tabular-nums}.room-frame #controls-guide{position:absolute;z-index:10;top:100px;left:8px;right:8px;max-height:65%;overflow:auto;margin:0;background:#fff9ef;padding:14px;border-radius:14px}.room-frame #controls-guide:not([open]){display:none}.room-frame .keyboard-object-list{margin:0;padding:4px 12px;background:#fff}.room-frame #keyboard-objects{position:absolute;left:8px;right:8px;bottom:28px;z-index:9;background:#fff;border-radius:12px;padding:8px;max-height:45%;overflow:auto;opacity:0;pointer-events:none}.room-frame .keyboard-object-list:focus-within #keyboard-objects{opacity:1;pointer-events:auto}.room-frame .keyboard-object-list:focus-within{outline:0}.room-frame #living-content{max-height:none;overflow:visible}.room-frame .object-picker{font-size:12px}.below-room{margin:14px 3px}@media(max-width:800px){.room-frame #selected{width:270px;max-height:44%}.room-frame .toolbar button{font-size:11px;min-height:36px;padding:6px 8px}.world-tools{gap:4px;padding:6px}.world-tools .object-picker select{max-width:135px}}@media(max-width:550px){.room-frame #selected-state{display:none}.room-frame #selected h2{margin:0 0 5px}.room-frame .object-picker{margin:0}.room-frame dialog{padding:12px}}
.world-shell>header{height:64px}.heading{margin:20px 0 14px}.environment-note{margin:6px 0}#discovery-note:empty{display:none}.room-frame #game{height:min(calc((100vw - 100px)/2),calc(100dvh - 440px));min-height:160px;max-height:600px;aspect-ratio:auto}
.learning-clock{position:relative;width:180px;height:180px;border:8px solid #e7bd77;border-radius:50%;background:#fff4dd;margin:16px auto}.learning-clock span{position:absolute;transform:translate(-50%,-50%);font-size:15px;font-weight:bold}.clock-hand{position:absolute;width:4px;bottom:50%;left:calc(50% - 2px);height:48px;background:#60748e;border-radius:4px;transform-origin:50% 100%}.clock-hand.minute{height:64px;width:3px;background:#315fa8}

/* Object actions use the existing overlay; details appear only through Inspect. */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.room-frame #selected{display:flex;flex-direction:row;align-items:flex-start;gap:4px;width:max-content;max-width:calc(100% - 8px);padding:5px;margin:0;border:0;border-radius:24px;background:#edf3fbe8;box-shadow:0 3px 12px #3344661f;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.room-frame #selected>div:first-child{min-width:0;flex:initial}.room-frame #actions{flex:initial;display:flex;align-items:center;gap:5px;flex-wrap:wrap;max-width:360px;min-width:0}
.room-frame #selected button{min-width:44px;min-height:44px;padding:8px 13px;border:1px solid #cbd9e8;border-radius:24px;font-size:12px;line-height:1.2;background:#fffaf0;white-space:nowrap}
.room-frame #actions button:nth-child(2n){background:#e5f2ed}.room-frame #actions button:nth-child(3n){background:#eee8f8}
.room-frame #selected button:hover{border-color:#809cbe;background:#dceafc}.room-frame #selected button:focus-visible{outline:3px solid #315fa8;outline-offset:-3px}
.room-frame #selected #close-selection{flex:none;padding:8px;background:#f8faff;font-size:20px}
.room-frame .object-adjustments{display:flex;flex-wrap:wrap;gap:4px;flex-basis:100%;padding-top:4px;border-top:1px solid #d2ddec}
.room-frame #selected .object-adjustments button{padding:6px 10px}
@media(max-width:550px){.room-frame #selected{border-radius:20px;padding:4px}.room-frame #actions{max-width:none;gap:4px}.room-frame #selected button{padding:8px 10px}}
