:root { color-scheme: dark; font-family: "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif; color: #dddaca; background: #141d1c; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 20%, #2c3730, #141d1c 75%); }
main { width: min(1280px, 96vw, calc((100svh - 180px) * 16 / 9)); margin: 24px auto; }
header, footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header { margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 14px; }
.seal { display: grid; place-items: center; width: 42px; height: 44px; background: #9b493a; color: #f3e0bf; border: 1px solid #c57857; font: 26px serif; border-radius: 3px; }
h1 { margin: 0; color: #f0e6ce; font: 25px "Noto Serif TC", "PMingLiU", serif; letter-spacing: 4px; }
h1 span { font-size: 19px; letter-spacing: 2px; }
p { margin: 7px 0 0; font-size: 11px; letter-spacing: 3px; color: #a8ae9e; }
.badge { font-size: 10px; letter-spacing: 2px; color: #b5bdab; border: 1px solid #495044; padding: 9px 12px; border-radius: 24px; }
i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #adb98b; margin-right: 7px; vertical-align: middle; }
#stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #141d1c; border-radius: 5px; box-shadow: 0 20px 60px #0005, 0 0 0 1px #b8a57433; }
#game { position: absolute; inset: 0; }
#game canvas { display: block; touch-action: none; }
#decode-world { position: absolute; inset: 0; pointer-events: none; }
.decode-area { position: absolute; border: 1px dashed #ddbd764d; border-radius: 45%; background: #f6e7b408; box-shadow: inset 0 0 35px #e4c27d0c; }
.word-fragment, .semantic-dot, .story-direction { position: absolute; transform: translate(-50%, -100%); text-align: center; color: #f4e7c4; }
.word-fragment b { display: grid; place-items: center; width: clamp(30px, 4vw, 51px); height: clamp(34px, 4.8vw, 59px); border: 1px solid #c6a15f; color: #443c2a; font: clamp(23px, 2.9vw, 37px) "PMingLiU", serif; background: linear-gradient(135deg, #f5ead0, #e5d4ac); border-radius: 3px 6px 2px 4px; box-shadow: 0 3px 9px #3d33164d, 0 0 10px #e4bf6440; animation: paper-float 2.8s ease-in-out infinite; }
.word-fragment.attuned b { box-shadow: 0 0 16px #f0c85fa0; }
.word-fragment.decoded b { animation: seal-word .8s ease-out; color: #665021; background: #f2e4bc; }
.word-fragment small { display: block; max-width: 100px; padding: 3px 5px; margin-top: 5px; color: #f4e6bd; background: #173b38dc; font-size: clamp(9px, 1.05vw, 13px); white-space: nowrap; }
.semantic-dot { min-width: 30px; }
.semantic-dot > i { display: block; width: 14px; height: 8px; border: 1px solid #e4c788; margin: 0 auto 5px; background: #f0d69c8a; box-shadow: 0 0 13px #e3b65b99; animation: clue-breathe 1.7s ease-in-out infinite; }
.semantic-dot small { display: block; max-width: 105px; padding: 4px 7px; background: #173b38e8; border: 1px solid #b99b6170; font: clamp(10px, 1.15vw, 15px)/1.3 "Microsoft JhengHei", sans-serif; }
.physical-clue small { background: #e9ddbddf; color: #443822; border-color: #ad8b4d; }
.story-direction { padding: 8px 12px; border-bottom: 2px solid #d2b679; background: #173b38df; min-width: 70px; }
.story-direction b { font: 28px serif; color: #e1be72; }
.story-direction small { display: block; font: clamp(10px, 1.3vw, 16px)/1.45 "PMingLiU", serif; white-space: nowrap; }
#decode-focus { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse, #10282333 30%, #102823a8 100%); pointer-events: none; }
.reconstruction { max-width: 88%; padding: 18px 24px; border-block: 1px solid #d6b87a; background: #173b38ef; text-align: center; color: #f5e8c8; }
.meaning-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px 15px; font: clamp(10px, 1.2vw, 15px) serif; }
.meaning-row span { opacity: 0; animation: ink-reveal .5s var(--reveal) forwards; }
.reconstruction h2 { font: clamp(24px, 3vw, 36px) serif; letter-spacing: 7px; margin: 18px 0 12px; opacity: 0; animation: ink-reveal .7s 1.8s forwards; }
.reconstruction p { color: #f5e8c8; font-size: clamp(12px, 1.6vw, 20px); letter-spacing: 2px; opacity: 0; animation: ink-reveal 1s 2.6s forwards; }
.reconstruction small { display: block; color: #e9c67e; margin-top: 12px; font-size: 15px; letter-spacing: 3px; opacity: 0; animation: ink-reveal .5s 3.6s forwards; }
.du-glow { color: #f1cf8b; text-shadow: 0 0 9px #d9ab5580; animation: clue-breathe 2s ease-in-out infinite; }
#result.sentence-reveal h2 { font-size: clamp(27px, 3.3vw, 42px); }
@keyframes paper-float { 50% { transform: translateY(-4px); } }
@keyframes clue-breathe { 50% { opacity: .72; } }
@keyframes seal-word { 35% { box-shadow: 0 0 22px #f3cf77; transform: scale(1.06); } }
@keyframes ink-reveal { to { opacity: 1; } }
@media (max-width: 900px) { .semantic-dot small { max-width: 76px; } .story-direction { min-width: 53px; padding: 5px 7px; } .reconstruction { padding: 12px 16px; } .reconstruction h2 { margin: 12px 0 8px; } .meaning-row { gap: 7px 10px; } }
@media (max-width: 600px) { .word-fragment small { max-width: 80px; white-space: normal; } .semantic-dot small { max-width: 65px; padding: 3px 5px; } .reconstruction { padding: 9px 12px; } .reconstruction h2 { margin: 8px 0; } .reconstruction small { font-size: 12px; margin-top: 7px; } }
#loading { position: absolute; inset: 0; display: grid; place-content: center; background: #18211eee; font-size: 14px; line-height: 1.8; padding: 24px; white-space: pre-line; text-align: center; }
#loading[hidden] { display: none; }
.location { position: absolute; right: 14px; top: 12px; padding: 6px 10px; border: 1px solid #e5dfc23b; border-radius: 3px; background: #1d261c80; color: #fff4dd; font-size: 10px; letter-spacing: 2px; pointer-events: none; }
footer { margin-top: 17px; font-size: 11px; color: #aeb5a4; letter-spacing: 1px; }
kbd { display: inline-grid; place-items: center; min-width: 21px; height: 23px; margin-right: 3px; border: 1px solid #5b6252; border-radius: 3px; font: 11px system-ui; }
.or { margin: 0 8px; color: #697563; }
.companion { color: #c7c7aa; white-space: nowrap; }
.touch-help { display: none; }
#joystick { display: none; position: absolute; left: max(16px, env(safe-area-inset-left)); bottom: 16px; width: clamp(76px, 15vw, 112px); aspect-ratio: 1; border-radius: 50%; background: #18232230; border: 1px solid #ffffeb55; touch-action: none; user-select: none; -webkit-user-select: none; }
.joystick-ring { position: absolute; inset: 12%; border: 1px solid #ffffeb25; border-radius: 50%; pointer-events: none; }
#stick { position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; border: 1px solid #ffffeb80; border-radius: 50%; background: #e3e5ca66; box-shadow: 0 2px 8px #0002; pointer-events: none; }
.quest-hud { position: absolute; left: 14px; top: 12px; max-width: 76%; display: flex; align-items: center; gap: 10px; pointer-events: none; }
#momo-bubble { position: absolute; transform: translate(-50%, -100%); padding: 7px 10px; max-width: min(48%, 300px); white-space: normal; color: #f2e7cf; background: #173b38ef; border: 1px solid #b89d68; border-radius: 5px; font-size: clamp(10px, 1.3vw, 13px); pointer-events: none; }
#momo-bubble::after { content: ''; position: absolute; left: 50%; top: 100%; border: 5px solid transparent; border-top-color: #b89d68; }
#task { padding: 8px 13px; border-left: 2px solid #c4a56b; background: #173b38d9; color: #f1e7cf; font: 13px "PMingLiU", "Microsoft JhengHei", serif; letter-spacing: 1px; transition: padding .4s, font-size .4s; }
#task.fresh { padding: 12px 17px; font-size: 17px; color: #f5d99b; }
#distance { color: #f3e3b8; background: #173b38d9; padding: 6px 9px; font-size: 12px; white-space: nowrap; }
#interact-hint { position: absolute; bottom: 15%; left: 50%; transform: translateX(-50%); padding: 7px 13px; color: #f1dcab; background: #173b38da; border: 1px solid #c4a56b70; font: 13px serif; pointer-events: none; }
.touch-action { position: absolute; right: max(18px, env(safe-area-inset-right)); border: 1px solid #ecd5a58a; color: #fff0cd; background: #173b3899; touch-action: none; user-select: none; -webkit-user-select: none; font: 20px "PMingLiU", serif; }
#dash { bottom: 18px; width: 62px; height: 62px; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 4px #173b3820; }
#dash.cooling { opacity: .48; background: conic-gradient(#6b805b66 var(--charge), #173b3899 0); }
#dash.active { color: #ffe6a5; background: #8e764d99; box-shadow: 0 0 15px #e9c67555; }
#dash:disabled { cursor: default; }
#interact { display: none; bottom: 92px; padding: 10px 15px; border-radius: 4px; font-size: 15px; cursor: pointer; }
#dialogue { position: absolute; bottom: 16px; left: 21%; width: 58%; padding: 15px 20px; background: #173b38f2; border: 1px solid #c4a56b; border-radius: 3px; box-shadow: 0 6px 24px #0005; color: #f2e7d0; }
#speaker { color: #e3c483; font: 14px serif; letter-spacing: 3px; }
#dialogue p { color: #f2e7d0; font-size: 14px; letter-spacing: 1px; margin: 10px 0; line-height: 1.65; }
#dialogue-next { display: block; margin-left: auto; border: 0; border-bottom: 1px solid #bfa36b; background: transparent; padding: 3px 5px; color: #dfc58c; font: 12px serif; cursor: pointer; }
#dialogue-next span { margin-left: 8px; }
#result { position: absolute; inset: 0; display: grid; align-items: start; justify-items: center; padding-top: 15%; pointer-events: none; transition: background .55s; }
#result.dim { background: #10232144; }
#result.result-low { align-items: end; padding-top: 0; padding-bottom: 5%; }
#result > div { padding: 20px 30px; text-align: center; color: #f2e6c9; border-top: 1px solid #d7b56e; border-bottom: 1px solid #d7b56e; background: #173b38ed; }
#result h2 { font: 28px serif; letter-spacing: 5px; margin: 0; color: #f0d19b; }
#result p { margin: 10px 0; font-size: 14px; letter-spacing: 1px; color: #f2e6c9; }
#result small { font-size: 12px; letter-spacing: 2px; }
[hidden] { display: none !important; }
@media (any-pointer: coarse), (max-width: 900px) { #interact:not([hidden]) { display: block; } #interact-hint { display: none; } #dash { width: 56px; height: 56px; } .quest-hud { left: 9px; top: 9px; } #task { font-size: 12px; padding: 6px 9px; } #task.fresh { font-size: 14px; padding: 8px 11px; } #dialogue { left: 18%; width: 64%; bottom: 10px; padding: 10px 13px; } #dialogue p { font-size: 12px; margin: 6px 0; } }
@media (max-width: 600px) { .location { display: none; } #task { font-size: 10px; } #task.fresh { font-size: 11px; } #distance { font-size: 10px; padding: 4px 6px; } #dash { width: 44px; height: 44px; bottom: 12px; right: 12px; font-size: 17px; } #interact { bottom: 65px; right: 12px; font-size: 12px; padding: 7px 10px; } #dialogue { left: 3%; width: 78%; padding: 7px 10px; bottom: 8px; } #result { padding-top: 12%; } #result > div { padding: 10px 15px; } #result h2 { font-size: 21px; } #result p { font-size: 12px; } #result small { font-size: 10px; } }
@media (any-pointer: coarse), (max-width: 900px) { #joystick { display: block; } .desktop-help { display: none; } .touch-help { display: inline; } }
@media (max-width: 600px) { main { width: 96vw; } h1 { font-size: 21px; } h1 span { font-size: 15px; } .badge { display: none; } .brand { gap: 10px; } header { margin-bottom: 14px; } footer { font-size: 10px; } }
@media (max-height: 520px) and (orientation: landscape) { main { width: min(96vw, calc((100svh - 74px) * 16 / 9)); margin: 6px auto; } header { margin-bottom: 5px; } .seal { width: 26px; height: 28px; font-size: 19px; } h1, h1 span { font-size: 15px; } .brand p, .badge, .location { display: none; } footer { margin-top: 5px; font-size: 9px; } kbd { height: 16px; min-width: 16px; font-size: 9px; } #joystick { width: 76px; left: 12px; bottom: 12px; } }

#decode-world { container-type: inline-size; }
#market-dusk { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgb(222 121 39 / var(--warmth, 0)), rgb(222 121 39 / var(--warmth, 0))), linear-gradient(rgb(28 26 48 / var(--shade, 0)), rgb(28 26 48 / var(--shade, 0))), radial-gradient(ellipse at center, transparent 42%, rgb(20 22 38 / var(--edge, 0))); }
#market-timer { padding: 6px 9px; color: #f4e3be; background: #173b38e8; font: 13px serif; white-space: nowrap; }
#market-timer.urgent { color: #ffd0a5; border: 1px solid #d8915a; animation: clue-breathe .7s ease-in-out infinite; }
#closing-world { position: absolute; inset: 0; pointer-events: none; container-type: inline-size; }
#closing-focus { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; background: #14242044; }
.market-beat { color: #f5e4c2; text-align: center; padding: 15px 25px; background: #173b38ed; border-block: 1px solid #bd9e62; max-width: 90%; }
.market-beat h2 { font: clamp(35px, 5vw, 65px) "PMingLiU", serif; letter-spacing: .25em; margin: 5px 0; }
.market-beat p { font-size: 16px; color: #f1e1c2; letter-spacing: 2px; }
.market-beat h2.second-sentence, .reconstruction h2.second-sentence { font-size: clamp(16px, 2.5vw, 30px); letter-spacing: 2px; }
#closing-focus .reconstruction p { max-width: 620px; line-height: 1.6; }
.return-stall, .closed-stall, .road-sign, .event-zone { position: absolute; transform: translate(-50%, -100%); background: #173b38e6; border: 1px solid #c3a570; color: #efdcb1; padding: 5px 8px; font: 13px/1.4 serif; text-align: center; white-space: nowrap; }
.road-sign { color: #dfc79c; font-size: 11px; background: #674d34bb; padding: 3px 6px; }
.closed-stall { background: #64533de8; color: #e3d5b4; letter-spacing: 3px; }
.event-zone { padding: 9px 12px; min-width: 65px; }
.event-zone.remembered { background: #716039ed; box-shadow: 0 0 15px #e6bb66aa; }
#closing-world .contact-ring { position: absolute; top: 100%; left: 50%; width: 6.5cqw; height: 3.5cqw; border-radius: 50%; border: 1px solid #e3c58b; background: #e4c37d33; transform: translate(-50%, -50%); margin: 0; animation: clue-breathe 1.8s infinite; }
@media (max-width: 900px) { #market-timer { font-size: 11px; padding: 5px 7px; } .quest-hud { max-width: 96%; gap: 5px; } .event-zone, .return-stall, .closed-stall { font-size: 11px; padding: 5px 7px; } .road-sign { font-size: 9px; } }
@media (max-width: 600px) { #market-timer { font-size: 10px; } .quest-hud { flex-wrap: wrap; gap: 3px; } .event-zone { min-width: 48px; font-size: 10px; } .market-beat { padding: 10px 14px; } .market-beat p { font-size: 12px; } }
#decode-help { position: absolute; left: 50%; bottom: 13px; transform: translateX(-50%); width: 58%; max-width: 620px; padding: 10px 14px; background: #173b38ed; border: 1px solid #bda16b99; border-left: 3px solid #d7ba7b; border-radius: 3px; color: #f3e6c9; pointer-events: none; font-size: 13px; line-height: 1.55; }
#decode-help strong { display: block; color: #edce91; font: 15px/1.5 "PMingLiU", serif; margin-bottom: 3px; }
#decode-help span { display: block; }
#decode-help small { display: block; font-size: 11px; color: #cfcbb6; margin-top: 3px; }
#decode-help.event-help-top { top: 48px; bottom: auto; }
@media (max-width: 900px) { #decode-help { width: 62%; bottom: 9px; padding: 7px 9px; font-size: 11px; line-height: 1.45; } #decode-help strong { font-size: 12px; margin-bottom: 2px; } #decode-help small { font-size: 10px; margin-top: 2px; } }
@media (max-width: 600px) { #decode-help { width: 65%; bottom: 7px; padding: 5px 7px; font-size: 10px; } #decode-help strong { font-size: 11px; } #decode-help small { font-size: 9px; } }
.word-fragment, .semantic-dot { width: 0; height: 0; min-width: 0; transform: none; }
.word-fragment b { position: absolute; left: 0; top: -4cqw; margin-left: calc(clamp(30px, 4vw, 51px) / -2); margin-top: calc(clamp(34px, 4.8vw, 59px) / -2); }
.word-fragment small { position: absolute; left: 0; top: 12px; transform: translateX(-50%); }
.semantic-dot small { position: absolute; left: 0; bottom: 12px; transform: translateX(-50%); width: max-content; }
#decode-world .contact-ring { position: absolute; left: 0; top: 0; width: 5.25cqw; height: 3cqw; min-width: 18px; min-height: 10px; margin: 0; transform: translate(-50%, -50%); border: 1px solid #e4c788b0; border-radius: 50%; background: #f0d69c28; box-shadow: 0 0 10px #e3b65b55; animation: clue-breathe 1.7s ease-in-out infinite; }
#decode-world .word-fragment .contact-ring { width: 9cqw; height: 5cqw; }
#decode-world .decoded .contact-ring { opacity: .25; animation: none; }
#decode-world .attuned .contact-ring { border-color: #ffe0a1; background: #f0d69c55; }
#decode-world .story-direction .contact-ring { top: 100%; width: 6.25cqw; height: 3.6cqw; }


