.quest-ui{position:fixed;inset:0;pointer-events:none;z-index:95;color:#49351f;font-family:inherit;user-select:none;-webkit-user-select:none}
.quest-toggle{position:absolute;top:max(10px,env(safe-area-inset-top));left:min(calc(82% - 26px),calc(100% - 190px));width:52px;height:52px;box-sizing:border-box;padding:0;border:2px solid #b9935b;border-radius:50%;background:radial-gradient(ellipse at 32% 22%,#fff4d5,transparent 65%),repeating-linear-gradient(18deg,#a97b3810 0 1px,transparent 1px 4px),linear-gradient(135deg,#f4e3bb,#dec18b);box-shadow:inset 0 0 0 2px #fff1cb80,0 4px 10px #2e291f35;cursor:pointer;pointer-events:auto;color:#6c4828;touch-action:manipulation}
.quest-toggle .quest-paper{display:none}
.quest-paper{position:absolute;inset:0;width:100%;height:100%;fill:#f1dba8;stroke:#ad8650;stroke-width:1.2}.quest-paper-fold{fill:none;stroke:#be9b66}
.quest-feather{position:absolute;width:29px;height:38px;left:10px;top:4px;filter:drop-shadow(0 1px 0 #fff2c9)}
.quest-quill{width:100%;height:100%;overflow:visible}.quest-quill-vane{fill:currentColor;stroke:currentColor;stroke-width:.7;stroke-linejoin:round}.quest-quill-shaft{fill:none;stroke:#f8dfb7;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
.quest-toggle-count{position:absolute;bottom:-5px;right:-6px;min-width:28px;padding:1px 5px;border-radius:8px;background:#513b29;color:#ffedc5;font-size:10px;font-weight:800;line-height:14px}

.quest-journal button:focus-visible,.quest-list:focus-visible{outline:3px solid #68a3a5;outline-offset:2px}
.quest-journal{position:absolute;left:50%;top:max(78px,calc(env(safe-area-inset-top) + 68px));transform:translateX(-50%);width:min(1140px,calc(100vw - 28px));max-height:calc(100dvh - max(100px,calc(env(safe-area-inset-top) + 90px)) - env(safe-area-inset-bottom));box-sizing:border-box;display:flex;flex-direction:column;pointer-events:auto;overflow:hidden;padding:16px 8px;border:1px solid #b4915b;border-radius:5px 8px 6px 9px;box-shadow:0 18px 45px #14201f70,inset 14px 0 28px #b08a4525,inset -14px 0 28px #b08a4525;background:radial-gradient(ellipse at 20% 25%,#fff6dd90,transparent 62%),repeating-linear-gradient(12deg,#b28b4910 0 1px,transparent 1px 5px),linear-gradient(90deg,#d5b579,#f1dfb7 5%,#f5e7c8 48%,#eddbb2 94%,#cfaa6d);overscroll-behavior:contain;animation:quest-unroll .6s cubic-bezier(.2,.75,.2,1) both;transform-origin:top center}
.quest-journal::before,.quest-journal::after{content:'';position:absolute;left:0;right:0;height:15px;pointer-events:none;z-index:2;border-radius:7px;background:linear-gradient(#ad834c,#ead1a1 25%,#fff0c9 48%,#ddbc85 80%,#aa8047);box-shadow:0 2px 5px #79502040}.quest-journal::before{top:0}.quest-journal::after{bottom:0;transform:rotate(180deg)}
.quest-journal[hidden],.quest-notice[hidden],.quest-flying-medal[hidden]{display:none}
.quest-journal header{display:flex;align-items:center;gap:12px;padding:12px 20px 9px;border-bottom:1px solid #92734440;flex-shrink:0}
.quest-header-mark{width:28px;height:37px;flex-shrink:0;color:#85643b;filter:drop-shadow(0 1px 0 #fff5d3)}
.quest-journal header small{display:block;font-size:9px;font-weight:800;letter-spacing:.2em;color:#80643d}
.quest-journal h2{font-size:27px;line-height:1.2;margin:3px 0 0;font-family:Georgia,serif;font-weight:normal;color:#443021}
.quest-journal button{font:inherit;cursor:pointer;touch-action:manipulation}
.quest-scroll-hint{margin-left:auto;color:#80643d;font:700 11px/1.2 "Lucida Console","Courier New",monospace;white-space:nowrap}.quest-journal [data-quest-close]{margin-left:0;flex-shrink:0;width:44px;height:44px;border:0;background:none;color:#725330;font-size:28px}
.quest-list{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 22px;scrollbar-width:thin;scrollbar-color:#aa844e transparent;touch-action:pan-y}
.quest-entry{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:15px;padding:13px 0;border-bottom:1px solid #92734436;align-items:center}.quest-entry:last-child{border:0}
.quest-entry-icon{width:32px;height:43px;box-sizing:border-box;color:#af9164;filter:drop-shadow(0 1px 0 #fff7d8) drop-shadow(0 -1px 0 #83603a40);display:grid;place-items:center}.quest-entry-icon .quest-quill-shaft{stroke:#ead3a8}
.quest-entry-copy{min-width:0}.quest-entry small,.quest-entry progress{display:none}
.quest-entry h3{margin:0 0 4px;font-size:15px;line-height:1.3;color:#4b3521;font-family:Georgia,serif}.quest-entry p{margin:0;font-size:12px;line-height:1.45;color:#79613f}.quest-entry-progress{font-size:11px;font-weight:700;color:#91774f;white-space:nowrap;text-align:right}
.quest-entry[data-done=true] .quest-entry-icon{color:#ff2638;transform:scale(1.12);filter:drop-shadow(0 0 3px #ff253875) drop-shadow(0 1px 1px #ae152940)}.quest-entry[data-done=true] .quest-quill-shaft{stroke:#ffc9bd}.quest-entry[data-done=true] .quest-entry-progress{color:#a02b2d}
.quest-empty{padding:30px 10px;color:#7e6949;font-size:13px;text-align:center}
.quest-notice{position:absolute;left:50%;bottom:max(13vh,90px);transform:translateX(-50%);display:flex;align-items:center;gap:18px;width:max-content;max-width:min(570px,calc(100vw - 32px));box-sizing:border-box;padding:8px 22px 8px 8px;border-radius:60% 35%;background:radial-gradient(ellipse,#15251ccc,transparent 72%);color:#fff2d3;animation:quest-reveal .4s ease both;text-shadow:0 2px 5px #081b15,0 0 15px #081b15}
.quest-notice-medal,.quest-flying-medal{display:grid;place-items:center;box-sizing:border-box;width:100px;height:132px;padding:0;flex-shrink:0;color:#ff2638;filter:drop-shadow(0 0 5px #ff2538a0) drop-shadow(0 0 15px #ff523f70) drop-shadow(0 3px 2px #67192360)}.quest-notice-medal .quest-quill-shaft,.quest-flying-medal .quest-quill-shaft{stroke:#ffc0ae}
.quest-notice small{display:block;letter-spacing:.16em;font-size:10px;font-weight:800;color:#ead3a0}.quest-notice strong{display:block;font-family:Georgia,serif;font-size:clamp(21px,2.8vw,29px);line-height:1.2;margin:7px 0}.quest-notice [data-quest-notice-detail]{display:block;max-width:370px;font-size:12px;line-height:1.4;color:#f0e7d5}
.quest-flying-medal{position:fixed;z-index:1;pointer-events:none}.stunt-notice.quest-suspended{opacity:0!important}
@keyframes quest-unroll{from{clip-path:inset(0 0 100%);opacity:.6}to{clip-path:inset(0);opacity:1}}@keyframes quest-reveal{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}
@media(max-width:600px){.quest-journal{padding-left:3px;padding-right:3px}.quest-journal header{padding:8px 12px}.quest-journal h2{font-size:24px}.quest-list{padding:0 12px}.quest-entry{grid-template-columns:27px minmax(0,1fr) auto;gap:10px;padding:13px 0}.quest-entry-icon{width:26px;height:37px}.quest-entry h3{font-size:14px}.quest-entry p{font-size:11px}.quest-entry-progress{font-size:10px}.quest-notice{bottom:max(20vh,105px);padding:8px;gap:12px}.quest-notice-medal{width:76px;height:102px}.quest-notice strong{font-size:22px}}
@media(max-height:500px){.quest-journal{top:max(70px,calc(env(safe-area-inset-top) + 62px));max-height:calc(100dvh - 82px - env(safe-area-inset-bottom))}.quest-journal header{padding:2px 12px}.quest-journal h2{font-size:22px}.quest-header-mark{height:29px}}
@media(prefers-reduced-motion:reduce){.quest-journal,.quest-notice{animation:none}}
.quest-toggle,.quest-toggle *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-user-drag:none}.quest-toggle{-webkit-tap-highlight-color:transparent}
/* Keep the two adventure controls clear of the three menu actions on phones. */
@media(max-width:600px){
  .chicken-call-wheel{left:calc(100% - 248px);transform:none;width:44px;height:44px}
  .chicken-call-main{width:44px;height:44px;min-height:44px}
  .quest-toggle{left:calc(100% - 190px);width:48px;height:48px}
  .quest-feather{left:9px;top:3px;width:27px;height:35px}
  .hud .hud-info{max-width:calc(100vw - 270px)}
  .hud .hud-info strong{display:none}
  .hud #hudPlayers{font-size:10px;padding-inline:3px;min-width:0}
}
body:has(.quest-journal:not([hidden])) .team-chat-toast{opacity:0;visibility:hidden}

/* One quiet row per task; the parchment itself scrolls in both axes when needed. */
.quest-journal{font-family:"Lucida Console","Courier New",monospace;font-weight:700}
.quest-journal header{padding:10px 18px 12px;border-bottom:1px solid #92734440}
.quest-journal h2{font-family:inherit;font-size:22px;font-weight:900;letter-spacing:-.7px;text-shadow:.4px 0 currentColor}
.quest-list{padding:0 18px;touch-action:pan-x pan-y}
.quest-entry{display:flex;align-items:center;gap:13px;box-sizing:border-box;width:max-content;min-width:100%;padding:13px 0}
.quest-entry-icon{width:27px;height:37px;flex:0 0 27px;color:#d3bd94;filter:drop-shadow(0 1px 0 #fff2d2)}
.quest-entry-icon .quest-quill-shaft{stroke:#efdfbd}
.quest-entry-copy{display:flex;align-items:baseline;flex:1 0 auto;white-space:nowrap}
.quest-entry h3,.quest-entry p{display:inline;margin:0;font-family:inherit;font-size:14px;line-height:1.5;white-space:pre;font-weight:700}
.quest-entry h3{color:#4f3823;text-shadow:.35px 0 currentColor}
.quest-entry p{color:#725438}
.quest-entry-progress{flex:0 0 auto;margin-left:12px;font:700 12px/1.5 "Lucida Console","Courier New",monospace;color:#816543}
.quest-entry-progress:empty{display:none}
.quest-entry[data-done=true] .quest-entry-icon{color:#ff2638;transform:scale(1.12);filter:drop-shadow(0 0 3px #ff253875) drop-shadow(0 1px 1px #ae152940)}
.quest-entry[data-done=true] .quest-entry h3{color:#805944}
.quest-toggle:focus,.quest-toggle:focus-visible{outline:none}
@media(max-width:600px){.quest-journal h2{font-size:19px}.quest-list{padding:0 12px}.quest-entry h3,.quest-entry p{font-size:13px}.quest-entry{gap:10px;padding:12px 0}}
@media(max-height:500px){.quest-journal header{padding:2px 12px 6px}}
.quest-entry-number{flex:0 0 3ch;color:#9a7e56;font:700 14px/1.5 "Lucida Console","Courier New",monospace;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:600px){.quest-entry-number{font-size:13px}}

.quest-flying-medal::after{content:'';position:absolute;left:48%;top:55%;width:22%;height:70%;background:linear-gradient(#ff624d80,transparent);border-radius:50%;filter:blur(5px);transform:rotate(-18deg);transform-origin:top;z-index:-1;pointer-events:none}

@media(prefers-reduced-motion:reduce){.quest-flying-medal::after{display:none}.quest-flying-medal{filter:drop-shadow(0 2px 2px #67192340)}}

.quest-toggle{border:0;background:transparent}.quest-button-art{display:block;width:100%;height:100%;border-radius:50%;pointer-events:none}

/* Tint only the parchment after intake; the feather and button bounds stay still. */
.quest-button-paper{position:relative;z-index:0}
.quest-button-feather{position:absolute;inset:0;z-index:2}
.quest-toggle-count{z-index:3}
.quest-button-red{position:absolute;z-index:1;inset:2px;border-radius:50%;background:#ff2638;opacity:0;pointer-events:none}
.quest-arrived .quest-button-red{animation:quest-paper-pulse 1.6s ease-in-out}
@keyframes quest-paper-pulse{0%,42%,100%{opacity:0}18%,28%,68%,78%{opacity:.95}}
/* This is a stationary status colour, so reduced motion retains the two slower fades. */
@media(prefers-reduced-motion:reduce){.quest-arrived .quest-button-red{animation-duration:1.8s}}
/* Same quill proportions as the shared canvas icon, with quieter unfinished stamps. */
.quest-quill-barbs,.quest-quill-edge,.quest-quill-shaft{fill:none;stroke-linecap:round;stroke-linejoin:round}
.quest-quill-barbs{stroke:#fbe8c7;stroke-width:1.5}
.quest-quill-edge{stroke:#604127;stroke-width:4.8}
.quest-quill-shaft{stroke:#fff8e8;stroke-width:2.7}
.quest-entry:not([data-done=true]) .quest-quill-edge{stroke:#baa17b}
.quest-entry:not([data-done=true]) .quest-quill-barbs{stroke:#efdfbd}
.quest-entry[data-done=true] .quest-quill-edge,.quest-notice-medal .quest-quill-edge,.quest-flying-medal .quest-quill-edge{stroke:#a41b2c}
.quest-entry[data-done=true] .quest-quill-shaft,.quest-notice-medal .quest-quill-shaft,.quest-flying-medal .quest-quill-shaft{stroke:#fff0d9}

@media(max-width:600px){.quest-scroll-hint{font-size:9px;white-space:normal;text-align:right;max-width:125px}}
