.tq-launcher{position:fixed;z-index:44;left:max(12px,calc((100vw - 820px)/2 - 150px));top:calc(var(--header-height) + 12px + env(safe-area-inset-top,0px));min-height:44px;padding:0 14px;color:#ffe7b3;background:#253b5be8;border:1px solid #d4b47e;border-radius:5px;font:inherit;font-size:14px;box-shadow:0 3px 14px #18304c40}
.tq-npc{position:absolute;z-index:8;width:clamp(68px,12vw,94px);height:clamp(68px,12vw,94px);transform:translate(-50%,-88%);padding:0;border:0;background:none;overflow:visible;cursor:pointer}
.tq-resident-art,.tq-portrait,.tq-dialog-resident{display:block;background-image:none;background-size:100% 100%;background-repeat:no-repeat;image-rendering:pixelated;background-position:var(--resident-x,0%) 0%}
.tq-resident-art{width:100%;height:100%;filter:drop-shadow(0 2px 1px #12223f88)}
.tq-npc-0{--resident-x:0%}.tq-npc-1{--resident-x:50%}.tq-npc-2{--resident-x:100%}
.tq-npc .tq-resident-art{background-position:var(--resident-x) 0%}
.tq-resident-art,.tq-portrait,.tq-dialog-resident{background-image:none;background-size:100% 100%;background-position:0 0}
.tq-npc-mark{position:absolute;right:8%;top:-8%;display:grid;place-items:center;width:23px;height:23px;border:1px solid #ffe4a3;border-radius:50%;color:#2c3850;background:#f5d697;font-weight:700;font-size:17px}
.tq-npc[data-complete="true"] .tq-npc-mark{background:#c8d6b5}
.tq-npc-name{position:absolute;left:50%;top:93%;transform:translateX(-50%);white-space:nowrap;font-size:11px;padding:4px 6px;background:#233c5bea;color:#ffe4b2;border:1px solid #d8ba8b8c;border-radius:3px}
.tq-reward,.tq-garland,.tq-player-badge{background-image:url('./assets/rewards.webp');background-size:200% 200%;background-repeat:no-repeat;image-rendering:pixelated;pointer-events:none}
.tq-prop-0{background-position:0% 0%}.tq-prop-1{background-position:100% 0%}.tq-prop-2{background-position:0% 100%}.tq-prop-3{background-position:100% 100%}
.tq-reward{position:absolute;width:60px;height:60px;left:calc(var(--label-x) + 35px);top:calc(var(--label-y) - 45px);transform:translateX(-50%);z-index:4}
.tq-garland{position:absolute;left:50%;transform:translate(-50%,-25%);width:180px;height:180px;z-index:4}
.tq-player-badge{position:absolute;right:24%;top:48%;width:21%;height:21%;z-index:3}
.tq-dialog{width:min(610px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:0;border:2px solid #dac18b;border-radius:8px;color:#fff0d4;background:#304765;box-shadow:0 20px 80px #09172dab;overflow:hidden}
.tq-dialog::backdrop{background:#0d2034ba;backdrop-filter:blur(4px)}
.tq-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid #d6bd883d}
.tq-title{font-size:21px;margin:0;line-height:1.4;font-weight:600}
.tq-header-actions{display:flex;gap:7px;flex:none}
.tq-small-button,.tq-button{min-height:44px;padding:9px 12px;border:1px solid #bda67a8c;border-radius:4px;background:#425b7a;color:#fff0d1;font:inherit;font-size:13px;line-height:1.5;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-align:center}
.tq-primary{background:#ead09a;color:#25344b;border-color:#f8e2b1;font-weight:600}
.tq-body{padding:16px 18px 20px;max-height:calc(100dvh - 106px);overflow:auto;overscroll-behavior:contain}
.tq-intro{font-size:14px;line-height:1.7;margin:0 0 14px;color:#e9ddc8}
.tq-journal{display:grid;gap:12px}
.tq-quest-card{padding:13px;border:1px solid #bfa98075;border-radius:5px;background:#3b5372}
.tq-card-heading{display:flex;align-items:center;gap:10px}
.tq-portrait{width:62px;height:62px;flex:none}
.tq-card-words{flex:1;min-width:0}
.tq-card-title{font-size:16px;margin:0 0 3px;font-weight:600}
.tq-card-role{font-size:12px;margin:0;color:#dacdb6}
.tq-card-status{font-size:11px;color:#efd39d;white-space:nowrap}
.tq-card-description{font-size:13px;line-height:1.6;margin:7px 0 11px;color:#e6dccb}
.tq-card-actions,.tq-dialog-actions,.tq-challenge-end{display:flex;flex-wrap:wrap;gap:7px}
.tq-card-actions .tq-button{flex:1;font-size:12px;padding-left:8px;padding-right:8px}
.tq-dialog-resident{width:112px;height:112px;margin:0 auto 12px}
.tq-conversation{font-size:15px;line-height:1.9;margin:0 0 20px}
.tq-dialog-actions .tq-button{flex:1 1 44%}
.tq-reward-summary{padding-top:12px;margin-top:10px;border-top:1px solid #b59b723f}
.tq-reward-summary p{font-size:12px;line-height:1.7;color:#dfcfb5}
.tq-total-progress{margin:0 0 15px;padding:9px 11px;border:1px solid #d2b98477;border-radius:4px;color:#ffe3a8;background:#253c5a;font-size:13px;line-height:1.6}
.tq-journal-extras{display:flex;flex-wrap:wrap;gap:8px}
.tq-journal-extras .tq-button{flex:1 1 auto}
.tq-challenge-end{margin-top:14px;border-top:1px solid #ac987a55;padding-top:14px}
.tq-completion{width:100%;font-size:14px;color:#e9e9ad;line-height:1.7;margin:0 0 5px}
html[data-play="on"] body{overflow:hidden;overscroll-behavior:none}
html[data-play="on"] main{position:fixed;top:calc(var(--header-height) + env(safe-area-inset-top,0px));bottom:0;left:50%;transform:translateX(-50%);width:min(var(--map-width),100%);margin:0;overflow:clip}
html[data-play="on"] .site-footer{display:none}
@media(max-width:600px){.tq-launcher{left:12px;font-size:12px;padding:0 9px}.tq-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}.tq-header{padding:10px 12px;gap:6px}.tq-title{font-size:17px}.tq-small-button{padding:8px 9px;font-size:12px}.tq-body{padding:12px;max-height:calc(100dvh - 88px)}.tq-quest-card{padding:10px}.tq-portrait{width:50px;height:50px}.tq-card-status{font-size:10px}.tq-card-title{font-size:15px}.tq-card-actions .tq-button{flex:1 1 40%}.tq-npc-name{font-size:10px}.tq-reward{width:45px;height:45px}}

.tq-launcher:focus-visible,.tq-npc:focus-visible,.tq-button:focus-visible,.tq-small-button:focus-visible{outline:3px solid #fff0bb;outline-offset:3px}
.tq-launcher,.tq-npc,.tq-button,.tq-small-button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.tq-dialog{box-sizing:border-box;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 20px)}
.tq-header{position:sticky;top:0;z-index:2;background:#304765}
.tq-body{max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 102px);-webkit-overflow-scrolling:touch}
@media(orientation:landscape) and (max-height:500px){.tq-launcher{top:calc(var(--header-height) + 8px + env(safe-area-inset-top,0px))}.tq-header{padding:8px 12px}.tq-body{padding:10px 12px;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 90px)}}
