@charset "UTF-8";
#book-search{display:block;width:100%;min-height:44px;margin-top:6px;padding:10px;border:1px solid #a89983;border-radius:3px;font:inherit;background:#fffaf0;color:#382f25}#book-count{font-size:11px;margin-bottom:0}#book-cover{position:relative;overflow:hidden}#book-cover-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fffaf0}.book-detail>div:last-child{min-width:0;overflow-wrap:anywhere}#book-intro-label{font-size:11px;color:#214638}#book-author{font-weight:700;color:#514637}#book-dialog label{font-size:12px}#book-dialog #book-description{font-size:14px;color:#382f25;line-height:1.8}#book-dialog .book-detail{align-items:flex-start;margin-top:22px;gap:15px}
#cancel-handoff{position:absolute;left:50%;bottom:174px;transform:translateX(-50%);z-index:2;min-height:44px;background:#fffaf0}#counter-book-title{font:normal 22px/1.5 Batang,Georgia,serif;border-top:1px solid #65534330;padding-top:18px}
:root{color-scheme:light;--ink:#382f25;--paper:#eee9df;--wood:#6d513a;--line:#65534330}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{font-family:"Malgun Gothic","Apple SD Gothic Neo",sans-serif;color:var(--ink);background:#c2b9a7}button,a{-webkit-tap-highlight-color:transparent}button,a.light,a.primary{font:inherit;cursor:pointer}button{color:inherit;border:0;background:none}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:3px solid #936b3b;outline-offset:4px}button:disabled{opacity:.4;cursor:default}#room,#world{position:absolute;inset:0}#world{touch-action:none;outline:none}canvas{display:block;width:100%;height:100%;touch-action:none}
header{position:absolute;top:max(22px,env(safe-area-inset-top));left:30px;right:30px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}header>*{pointer-events:auto}.wordmark{font-family:Batang,"Times New Roman",serif;font-size:18px;letter-spacing:-.7px}.wordmark span{font-family:"Malgun Gothic",sans-serif;font-size:9px;letter-spacing:1px;display:block;margin-top:7px;color:#685e50}.light{border:1px solid #5c4b3738;padding:11px 16px;background:#eee9dfd9;border-radius:3px;font-size:12px;backdrop-filter:blur(8px)}.light:hover{background:#fffaf0}.room-title{position:absolute;top:112px;left:30px;pointer-events:none}.eyebrow{font:9px/1.6 Georgia,serif;letter-spacing:2px;color:#75634b}.room-title h1{font:normal clamp(25px,3.2vw,43px)/1.4 Batang,Georgia,serif;margin:12px 0 8px;letter-spacing:-2px}.room-title p{font-size:12px;line-height:1.9;margin:0;color:#6d6254}
.places{position:absolute;top:104px;right:30px;display:flex;flex-direction:column;gap:6px}.places button{text-align:left;background:#f1ece1dd;padding:12px 15px;border:1px solid #66523c20;border-radius:3px;font-size:12px;backdrop-filter:blur(8px)}.places button span{font:italic 12px Georgia,serif;margin-right:14px;color:#92816c}.places button:hover{background:#fffaf0}.places button[aria-current=true]{border-color:#806247;background:#f4edde}#status{position:absolute;bottom:121px;left:50%;transform:translateX(-50%);max-width:calc(100% - 64px);width:max-content;font-size:12px;line-height:1.7;text-align:center;padding:8px 16px;border-radius:3px;background:#f1ece1e6;pointer-events:none}
.controls{position:absolute;left:30px;right:30px;bottom:49px;display:flex;align-items:center;gap:17px;pointer-events:none}.controls>*{pointer-events:auto}.controls p{font-size:11px;line-height:1.9;margin:0}.controls p span{font-size:10px;color:#6f6454}.controls>#reset{margin-left:auto}.pad{display:grid;grid-template-columns:repeat(3,35px);grid-template-rows:repeat(2,30px);gap:3px}.pad button{border:1px solid #74634c38;background:#f3eee4df;border-radius:3px;font:17px Georgia,serif;touch-action:none;user-select:none}.pad button:active{background:#d0bd9c}.pad button:first-child{grid-column:2}.pad button:nth-child(2){grid-row:2;grid-column:1}.pad button:nth-child(3){grid-row:2;grid-column:2}.pad button:nth-child(4){grid-row:2;grid-column:3}footer{position:absolute;left:30px;right:30px;bottom:max(14px,env(safe-area-inset-bottom));display:flex;justify-content:space-between;font-size:9px;letter-spacing:.3px;color:#625543}footer button{font-size:10px;text-decoration:underline;text-underline-offset:3px}#fallback{position:absolute;top:44%;left:20%;right:20%;padding:25px;background:var(--paper);font-size:14px;line-height:1.8}
dialog{border:1px solid #b5a58b;border-radius:5px;background:#f5f0e6;color:var(--ink);padding:38px;width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;box-shadow:0 20px 80px #241b2240}dialog::backdrop{background:#2d261b66;backdrop-filter:blur(5px)}dialog h2{font:normal 26px/1.5 Batang,Georgia,serif;letter-spacing:-1px;margin:13px 0 17px}dialog p{font-size:12px;line-height:1.9;color:#73634f}dialog a:not(.light):not(.primary){text-decoration:underline;text-underline-offset:3px}.close{position:absolute;right:13px;top:10px;font-size:26px;width:36px;height:36px}.links{display:grid;gap:10px;margin-top:26px}.links a{text-align:center;padding:15px 10px;font-size:13px}.primary{background:#5c4633;color:#fff6e9;border:1px solid #5c4633;border-radius:3px}.address{border-top:1px solid var(--line);padding-top:16px;margin-top:20px}dialog .fine{font-size:10px;color:#8d7c65}
.room-title{padding:12px 16px;background:#f1ece1e8;border:1px solid #66523c20;border-radius:3px;backdrop-filter:blur(8px);max-width:calc(100% - 60px)}
.room-title h1{font-size:clamp(25px,3vw,37px);margin:7px 0 4px}.host-link{display:flex;align-items:center;gap:16px;min-height:44px;margin-top:8px;border-top:1px solid var(--line);font-size:11px;pointer-events:auto}.host-link small{font-size:10px;color:#6d6254;white-space:nowrap}
.light,.places button,.wordmark,footer button{min-height:44px}.wordmark{display:flex;flex-direction:column;justify-content:center}.close{width:44px;height:44px}.pad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:4px}.pad button{min-width:44px;min-height:44px}.controls{bottom:68px}#status{bottom:173px}footer{align-items:center}
.header-actions{display:flex;gap:6px}.header-actions .light{padding:10px 12px}.book-detail{display:flex;align-items:center;gap:20px}.book-detail h3,#book-carry h3{font:normal 20px/1.5 Batang,Georgia,serif;margin:0}.book-detail p{margin:8px 0}#book-cover{width:100px;min-width:100px;height:132px;padding:18px 10px;border-radius:1px 4px 4px 1px;box-shadow:3px 4px 0 #d4cbbb;color:#433f33}#book-cover span{display:block;font:17px/1.6 Batang,Georgia,serif}#book-cover small{font-size:7px}.book-buttons{display:flex;flex-wrap:wrap;gap:8px}.book-buttons button{min-height:44px;padding:11px 13px;font-size:12px}#book-carry{border-top:1px solid var(--line);margin-top:22px;padding-top:20px}.sample-note{font-size:11px;color:#786752}#read-text{font:18px/2.1 Batang,Georgia,serif;color:var(--ink);margin:30px 0;white-space:pre-line}.page-controls{display:flex;align-items:center;justify-content:space-between;gap:10px}.page-controls span{font-size:12px;white-space:nowrap}[hidden]{display:none!important}
@media(max-width:650px){header{top:max(16px,env(safe-area-inset-top));left:18px;right:18px}.wordmark{font-size:16px}.wordmark span{font-size:8px}.room-title{top:84px;left:18px;padding:10px 12px;max-width:calc(100% - 36px)}.room-title .eyebrow{font-size:7px;letter-spacing:1.2px}.room-title h1{font-size:25px;margin:6px 0 3px}.room-title p{font-size:10px;line-height:1.7}.host-link{font-size:10px;gap:12px;margin-top:5px}.host-link small{font-size:9px}.places{top:auto;bottom:calc(213px + env(safe-area-inset-bottom));left:18px;right:18px;flex-direction:row;gap:5px}.places button{flex:1;min-width:0;padding:10px 3px;text-align:center;font-size:10px;white-space:nowrap}.places button span{display:none}#status{bottom:calc(163px + env(safe-area-inset-bottom));font-size:10px;max-width:calc(100% - 36px);padding:7px 11px;margin:0}.controls{left:18px;right:18px;bottom:calc(64px + env(safe-area-inset-bottom));gap:12px}.controls p{display:none}.controls>#reset{font-size:10px;padding:10px 12px}.pad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:4px}footer{left:18px;right:18px;bottom:max(12px,env(safe-area-inset-bottom));font-size:8px}footer>span{display:none}footer button{margin-left:auto;font-size:9px}dialog{padding:31px 24px}dialog h2{font-size:23px}#fallback{left:8%;right:8%;font-size:12px}}
@media(max-width:650px) and (max-height:690px){.room-title{top:76px}.room-title .eyebrow,.room-title p{display:none}.room-title h1{font-size:22px;margin:0}.host-link{margin-top:2px}.places{bottom:calc(207px + env(safe-area-inset-bottom))}}
@media(max-height:500px) and (min-width:651px){.room-title{top:82px;padding:8px 12px}.room-title .eyebrow,.room-title p{display:none}.room-title h1{font-size:24px;margin:0}.controls p{display:none}.places{top:84px}#status{bottom:167px}}
.room-title{top:85px;padding:6px 12px}.room-title .eyebrow,.room-title p{display:none}.room-title h1{font-size:20px;margin:0}.host-link{margin:0;border:0}.wordmark{background:#f1ece1e8;padding:5px 10px;border-radius:3px}body{word-break:keep-all}
@media(max-width:650px){header{left:12px;right:12px;gap:8px;top:max(10px,env(safe-area-inset-top));align-items:flex-start}.wordmark{font-size:14px;padding:5px 8px;flex-shrink:0}.wordmark span{font-size:7px;letter-spacing:0}.header-actions{justify-content:flex-end;gap:4px;flex-wrap:wrap;max-width:225px}.header-actions .light,.header-actions .avatar-toggle{font-size:10px;padding:9px}.room-title{top:108px;left:18px;padding:4px 10px}.room-title h1{font-size:18px}.host-link{font-size:10px;min-height:44px}.places{top:192px;bottom:auto}.controls{bottom:64px}#status{bottom:166px}}
@media(max-height:500px){.room-title{top:74px}.places{top:76px;bottom:auto;left:auto;right:16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:min(340px,52vw);max-width:none;gap:6px}.places button{min-height:44px;padding:8px 5px;text-align:center;white-space:normal}.places button span{display:none}.host-link{min-height:44px}#status{top:178px;bottom:auto;max-width:45%;margin:0}}
.places button{min-height:44px}
footer .story-link{display:inline-flex;align-items:center;min-height:44px;font-size:10px;text-decoration:underline;text-underline-offset:3px}
@media(max-width:650px){footer{gap:8px}footer .story-link{font-size:9px;flex-shrink:0}footer button{font-size:8px;text-align:right}}
@media(min-height:501px){#status{top:108px;bottom:auto;margin:0}footer{bottom:max(4px,env(safe-area-inset-bottom));background:#eee9dfed;padding:0 8px;border-radius:3px}}
@media(max-width:650px) and (min-height:501px){#status{top:244px;bottom:auto;font-size:10px}#room[data-outside=true] #status{top:274px}}
#book-genre-filters{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}#book-genre-filters button{font:700 14px/1.4 "Malgun Gothic",sans-serif;min-height:44px;padding:10px 13px;border:1px solid #7d7767;border-radius:3px;background:#fffaf0;color:#17261e}#book-genre-filters button[aria-pressed=true]{background:#214638;color:#fffaf0;border-color:#214638}#book-category{display:block;font:700 14px/1.5 "Malgun Gothic",sans-serif;color:#214638;margin-bottom:6px}dialog .genre-note{font-size:13px;color:#514c40}
@media(max-width:650px){#book-dialog{padding:30px 18px}#book-dialog .book-detail{gap:12px}#book-cover{width:78px;min-width:78px;height:108px}#book-dialog .book-detail h3{font-size:19px}}
@media(max-width:650px) and (min-height:501px){.places{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.places button{white-space:normal}#status{top:292px}#room[data-outside=true] #status{top:322px}}
.book-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:18px 0}.book-navigation button{flex-shrink:0}.book-navigation span{font-size:13px;text-align:center;font-variant-numeric:tabular-nums}#book-dialog{width:min(760px,calc(100vw - 32px))}#book-dialog #book-cover{width:240px;min-width:240px;height:320px;touch-action:pan-y pinch-zoom;user-select:none}#book-dialog .book-detail{gap:24px}#book-empty{padding:24px 0;color:var(--ink)}
@media(max-width:650px){#book-dialog .book-detail{flex-direction:column;align-items:stretch;gap:22px}#book-dialog #book-cover{width:min(240px,100%);min-width:0;height:320px;align-self:center}.book-navigation .light{padding:10px;font-size:12px}}
#book-prescription-offer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;margin:16px 0;background:#e6efe4;border:1px solid #aac4ad;border-radius:10px;color:#254f3e}
#book-prescription-offer p{margin:0;font-size:14px;font-weight:600}
#book-prescription-offer a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border-radius:8px;background:#254f3e;color:#fffaf0;font-size:14px;font-weight:700;text-decoration:none;text-align:center;flex-shrink:0}
#book-prescription-offer a:focus-visible{outline:3px solid #b96a32;outline-offset:3px}
@media(max-width:650px){#book-prescription-offer{flex-direction:column;align-items:stretch;gap:8px}#book-prescription-offer p{text-align:center}#book-prescription-offer a{flex-shrink:1}}

/* 화면 회전 뒤에도 캔버스의 이전 픽셀 폭이 모바일 화면을 확대하지 않게 한다. */
#world canvas{display:block;width:100%!important;height:100%!important}

#book-tea-tools{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(82px + env(safe-area-inset-bottom));z-index:8;display:flex;gap:4px}#book-tea-tools[hidden],body:has(dialog[open]) #book-tea-tools{display:none}#book-tea-tools button{min-height:44px;padding:6px 12px;border-radius:12px;background:#f5ecdc;color:#503c27;border:1px solid #b89a76}#book-tea-menu{margin:16px 0;border:0;padding:0}#book-tea-menu legend{margin-bottom:8px}

@media(max-width:700px){#book-tea-tools{left:auto;right:10px;transform:none;bottom:calc(84px + env(safe-area-inset-bottom))}}

dialog.story-room{position:fixed;inset:0;isolation:isolate;padding:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;overflow:hidden;border:0;border-radius:0;background:#343c3b;color:#f8f3e4;box-sizing:border-box;font-family:Georgia,"Malgun Gothic",serif}
.story-room::backdrop{background:#1d2827}
.story-room .story-view{position:absolute;inset:0;outline:none;touch-action:none;user-select:none;cursor:grab;background-color:#929b91;background-repeat:no-repeat;filter:saturate(.58) contrast(.93)}
.story-room[data-world="water"] .story-view{filter:saturate(.52) brightness(.83) contrast(.94)}
.story-room .story-view:active{cursor:grabbing}
.story-view canvas{width:100%;height:100%;display:block}
.story-room::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(0deg,rgba(22,34,33,.83),transparent 34%,transparent 84%,rgba(26,37,35,.12)),url("assets/story-grain.png");background-size:auto,128px 128px}
.story-room p,.story-room .walk-hint,.story-room button{position:absolute;z-index:1}
.story-room p{pointer-events:none;left:50%;bottom:calc(76px + env(safe-area-inset-bottom));transform:translateX(-50%);width:min(34em,85vw);margin:0;text-align:center;font-size:clamp(15px,1.55vw,20px);line-height:1.8;word-break:keep-all;color:#fff6e4;text-shadow:0 1px 7px #25332e}
.story-room .walk-hint{pointer-events:none;left:0;right:0;text-align:center;bottom:calc(23px + env(safe-area-inset-bottom));font:13px/1.6 system-ui;color:#eee6d4}
.story-room button{color:#fff9e9;background:#283832ae;border:1px solid #eee0c077;cursor:pointer}
.story-room .story-exit{right:16px;top:calc(12px + env(safe-area-inset-top));width:44px;height:44px;border-radius:50%;font-size:21px}
.story-room .story-step{left:50%;bottom:calc(17px + env(safe-area-inset-bottom));transform:translateX(-50%);padding:10px 20px;border-radius:22px;white-space:nowrap}
.story-room .walk-alternative:not(:focus-visible){clip-path:inset(50%);width:1px;height:1px;pointer-events:none;overflow:hidden}
.story-near{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:32;padding:11px 18px;border-radius:18px;background:#35473e;color:#fff0cf;border:1px solid #dfbf85;white-space:nowrap}.story-near[hidden]{display:none}

dialog.story-threshold{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;padding:0;margin:0;pointer-events:auto;background:radial-gradient(ellipse at 50% 46%,#fff6d8 0%,#f6e5bc 50%,#d8c9aa 100%);opacity:var(--crossing,0)}
.story-threshold::backdrop{background:transparent}
.story-room.story-arriving::before{content:"";position:absolute;inset:0;background:#fff1cc;z-index:3;pointer-events:none;animation:ink-arrival 1s ease-out forwards}
@keyframes ink-arrival{from{opacity:1}to{opacity:0}}
.story-room .walk-help{top:calc(16px + env(safe-area-inset-top));left:16px;border-radius:22px;padding:9px 15px}
.walk-guide{position:absolute;z-index:2;left:50%;top:22%;transform:translateX(-50%);width:min(78%,340px);padding:14px 18px;border-radius:10px;background:#243730df;color:#fff3d9;text-align:center;pointer-events:none}
.walk-guide strong,.walk-guide span{display:block;word-break:keep-all}.walk-guide span{font-size:14px;margin-top:5px}
.story-room:has(.walk-guide:not([hidden])) .walk-hint{visibility:hidden}
@media(prefers-reduced-motion:reduce){dialog.story-threshold{background:#403e39}.story-room.story-arriving::before{background:#403e39;animation-duration:.2s}}

@font-face{font-family:StoryMyeongjo;src:url('assets/fonts/NanumMyeongjo-Regular.ttf') format('truetype');font-display:swap}
body .story-room p,body .story-return-note p{font-family:StoryMyeongjo,'AppleMyungjo',Batang,serif!important}
.story-return-note{position:fixed;z-index:34;bottom:calc(100px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:max-content;max-width:min(36rem,calc(100vw - 32px));box-sizing:border-box;padding:16px 22px;border-left:3px solid #c1944e;border-radius:3px 12px 12px 3px;background:#fff7e7;color:#493d31;box-shadow:0 4px 18px #25190f38;text-align:center;animation:note-arrival .65s ease-out}
.story-return-note[hidden]{display:none}
.story-return-note p{margin:0 0 12px;font-size:clamp(17px,2vw,21px);line-height:1.65;word-break:keep-all}
.story-return-note div{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 10px}
.story-return-note button{border:0;border-bottom:1px solid #b59b70;background:transparent;color:#4e483c;padding:8px 3px;cursor:pointer}
@keyframes note-arrival{from{opacity:0;translate:0 6px}to{opacity:1;translate:0}}
@media(prefers-reduced-motion:reduce){.story-return-note{animation:none}}

#book-dialog .book-detail{display:grid;grid-template-columns:minmax(72px,32%) minmax(0,1fr);align-items:start;gap:clamp(12px,3vw,24px);margin:16px 0}
#book-dialog .book-detail[hidden],#book-dialog:has(#book-detail[hidden]) #book-introduction,#book-dialog[data-recommended] :is(.book-navigation,#book-more){display:none}
#book-dialog #book-cover{width:100%;min-width:0;height:auto;aspect-ratio:3/4;align-self:start}
#book-dialog #book-title{margin:5px 0;overflow-wrap:anywhere}
#book-dialog #pick-note{font-size:13px;line-height:1.5}
#book-more{margin-top:18px}#book-more summary{padding:12px 0;cursor:pointer;font-weight:700}
#secret-detail{margin:8px 0 16px}
