#hubDialogue{position:fixed;inset:0;z-index:80;pointer-events:none;display:flex;justify-content:flex-end;align-items:center;padding:24px;box-sizing:border-box;background:linear-gradient(90deg,transparent 35%,#060b10a8)}
#hubDialogue .hub-dialogue-panel{pointer-events:auto;width:min(430px,42vw);max-height:85vh;overflow:auto;border:1px solid #c2a77777;border-radius:16px;padding:26px;background:#101a1bed;box-shadow:0 12px 60px #0008;color:#eef0e7;font-family:system-ui,sans-serif;text-align:left}
#hubDialogue h2{font-size:30px;margin:4px 0 12px;color:#f0d5a1} .hub-dialogue-label{font-size:11px;letter-spacing:1.5px;color:#b0c0b6}.hub-dialogue-line{font-size:18px;line-height:1.65;min-height:120px;white-space:pre-wrap}.hub-dialogue-reply{font-size:13px;color:#b9c9bd;border-left:2px solid #d0ae71;padding-left:12px;line-height:1.5}
#hubDialogue button{font:inherit;text-align:left;cursor:pointer;border:1px solid #a9b99c55;border-radius:8px;padding:12px;color:#eff2e8;background:#2b3b32;min-height:44px}#hubDialogue button:hover{border-color:#efd395;background:#3d4d3b}#hubDialogue button:focus-visible{outline:2px solid #ffe0a0;outline-offset:3px}#hubDialogue button:disabled{opacity:.5;cursor:default}#hubDialogue [hidden]{display:none!important}.hub-dialogue-options{display:grid;gap:9px;margin:18px 0}#hubDialogue footer{border-top:1px solid #ffffff22;padding-top:14px;margin-top:20px}#hubLeave{width:100%;background:transparent!important}#hubLeave small{float:right;color:#b0c0b6}.npc-conversation #toast,.npc-conversation #interactprompt,.npc-conversation #hubtags{display:none!important}
@media(max-width:650px){#hubDialogue{padding:10px;align-items:flex-end;background:linear-gradient(0deg,#060b10aa,transparent 90%)}#hubDialogue .hub-dialogue-panel{width:100%;box-sizing:border-box;max-height:63vh;padding:18px}#hubDialogue h2{font-size:24px}.hub-dialogue-line{font-size:16px;min-height:65px;line-height:1.5}.hub-dialogue-options{margin:12px 0}#hubDialogue footer{margin-top:12px;padding-top:10px}}

#hubDialogue button.hub-service-primary{display:flex;align-items:center;gap:12px;width:100%;min-height:70px;padding:16px;font-size:18px;font-weight:700;border:2px solid #d4b478;background:linear-gradient(135deg,#51462c,#303c30);box-shadow:0 3px 14px #0004;margin-bottom:6px}#hubDialogue button.hub-service-primary:hover{background:#625438;border-color:#ffe2a4}#hubDialogue .hub-service-icon{font-size:28px;flex-shrink:0}#hubDialogue .hub-service-arrow{margin-left:auto;font-size:26px;color:#f0d5a1}#hubQuickService{margin-bottom:12px!important}

#hubDialogue .hub-dialogue-line{min-height:0;line-height:1.5}#hubDialogue .hub-optional{border-top:1px solid #ffffff22;padding-top:12px}#hubDialogue .hub-optional summary{cursor:pointer;color:#c3cbbc;padding:8px 0}#hubDialogue .hub-optional button{display:block;width:100%;margin-top:8px}

/* Quest progress stays distinct from services and optional conversation. */
#hubDialogue button.hub-quest-choice{display:flex;align-items:center;gap:10px;text-align:left;border-color:#d5b551;background:linear-gradient(110deg,#40391e,#1d2c2b);color:#fff1bd}
#hubDialogue button.hub-quest-choice:hover:not(:disabled){border-color:#ffe488;background:linear-gradient(110deg,#514525,#263832)}
#hubDialogue .hub-quest-badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:27px;border:1px solid #ebca65;border-radius:7px;background:#ffd65a;color:#34240b;font:900 20px/1 system-ui;box-shadow:inset 0 1px #fff8,0 2px 5px #0005}

/* Every selectable dialogue control carries the same visible keyboard cursor. */
#hubDialogue button.dialogue-selected,#hubDialogue summary.dialogue-selected,#hubDialogue button:focus-visible,#hubDialogue summary:focus-visible,[data-dialogue-menu] button:focus-visible,[data-dialogue-menu] .dialogue-selected{outline:3px solid #ffe35b!important;outline-offset:2px;box-shadow:0 0 0 5px #ffe35b22!important;background-color:#4a4225!important;color:#fff4c7!important}
#hubDialogue .dialogue-key-hint,[data-dialogue-menu] .dialogue-key-hint{color:#eedb89;font:600 12px/1.5 system-ui;margin:14px 0 8px}

/* Three visible paths: no optional quest is hidden in a disclosure. */
#hubDialogue .dialogue-group{display:grid;gap:8px;border:1px solid #b1c2bc55;border-left:4px solid var(--dialogue-accent);border-radius:10px;padding:12px;background:#142427}
#hubDialogue .dialogue-group h3{margin:0 0 3px;color:var(--dialogue-accent);font:750 12px/1.4 system-ui;letter-spacing:.6px;text-transform:uppercase}
#hubDialogue .dialogue-group-main{--dialogue-accent:#ffda74;background:linear-gradient(120deg,#453a20,#1c2929)}
#hubDialogue .dialogue-group-side{--dialogue-accent:#8fe4c2;background:linear-gradient(120deg,#193d36,#17292c)}
#hubDialogue .dialogue-group-lore{--dialogue-accent:#b8caff;background:linear-gradient(120deg,#232d45,#19262e)}
#hubDialogue .dialogue-group button{width:100%;border-color:color-mix(in srgb,var(--dialogue-accent) 55%,transparent);background:#122027;color:#f6f4e9;display:flex;gap:10px;align-items:center}
#hubDialogue .dialogue-choice-icon{font-weight:900;color:var(--dialogue-accent);min-width:17px;flex-shrink:0}
#hubDialogue .dialogue-group button.hub-service-primary{margin:0;background:linear-gradient(135deg,#51462c,#303c30)}
@media(max-width:650px){#hubDialogue .dialogue-group{padding:10px;gap:7px}#hubDialogue .dialogue-group h3{font-size:11px}}

/* Recorded voice is visible and replayable without gating the conversation. */
#hubDialogue .hub-voice-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}
#hubDialogue .hub-voice-controls button{min-height:34px;padding:6px 10px;font-size:12px;background:#213b46;border-color:#91c7da77;white-space:nowrap}
#hubDialogue #hubVoiceStatus{color:#bed6dc;font:500 11px/1.4 system-ui;letter-spacing:0}
#hubDialogue .hub-greeting{font-size:16px;line-height:1.5;color:#e7e9db;margin:8px 0}

/* Quest access has a stable place even before unlock or after completion. */
#hubDialogue .hub-quest-status{margin:0;color:#b9cfc8;font:14px/1.5 system-ui}
#hubDialogue .hub-quest-status b,#hubDialogue .hub-quest-status span{display:block}
#hubDialogue .hub-quest-status b{color:#e6efdc;margin-bottom:3px}
#hubDialogue [data-quest-status="ready"]{border-width:2px}
#hubDialogue #hubTopics{display:block;width:100%;margin-bottom:10px}
#hubDialogue #hubLanding{gap:8px;margin:12px 0}
#hubDialogue #hubLanding .dialogue-group{padding:10px;gap:6px}
#hubDialogue #hubLanding .dialogue-group button:not(.hub-service-primary){padding:9px 12px}
@media(min-width:651px){#hubDialogue .hub-dialogue-panel:has(#hubLanding){max-height:calc(100dvh - 48px);padding:20px}}

/* Spoken words and the unspoken quest contract have different visual roles. */
#hubDialogue .hub-dialogue-panel:has(.quest-facts){width:min(510px,45vw)}
#hubDialogue .hub-dialogue-panel:has(.quest-facts) .hub-dialogue-line{border-left:3px solid #dec28c;padding:10px 13px;margin:8px 0;background:#d8c3980b;border-radius:0 9px 9px 0;color:#f4ead4;font-size:17px}
#hubDialogue .quest-facts-list{display:grid;gap:12px;margin:16px 0}
#hubDialogue .quest-facts{border:1px solid #84b6b875;border-left:4px solid #89d5bf;border-radius:12px;background:linear-gradient(135deg,#173138,#111e2d);padding:14px;box-shadow:0 4px 14px #0003}
#hubDialogue .quest-facts header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
#hubDialogue .quest-facts header small{display:block;color:#9fdcc9;font-size:10px;font-weight:750;letter-spacing:1px;text-transform:uppercase}
#hubDialogue .quest-facts h3{color:#f0f5e8;font-size:16px;line-height:1.35;margin:4px 0 0}
#hubDialogue .quest-facts-status{font-size:10px;line-height:1.4;border:1px solid #8bb1bf66;background:#789dab18;border-radius:6px;padding:4px 6px;color:#c5dee8;flex-shrink:0;max-width:100px}
#hubDialogue .quest-facts[data-quest-phase=ready]{border-color:#9be4b0}
#hubDialogue .quest-facts[data-quest-phase=ready] .quest-facts-status{color:#b6fac6;border-color:#9be4b0}
#hubDialogue .quest-facts-reason{color:#adc4c6;font-size:12px;line-height:1.45;margin:10px 0}
#hubDialogue .quest-facts dl{display:grid;gap:9px;margin:13px 0}
#hubDialogue .quest-facts dl>div{display:grid;grid-template-columns:65px 1fr;gap:8px}
#hubDialogue .quest-facts dt{color:#9fb9c3;font-size:11px;font-weight:700;padding-top:2px}
#hubDialogue .quest-facts dd{margin:0;color:#d9e6ed;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#hubDialogue .quest-facts .quest-facts-objective dd{font-size:14px;font-weight:650;color:#fff5ce}
#hubDialogue .quest-facts-count{display:inline-block;margin-left:8px;color:#adf0d8;white-space:nowrap}
#hubDialogue .quest-facts-rewards{border-top:1px solid #91b7bc40;padding-top:11px;display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:12px}
#hubDialogue .quest-facts-rewards>b{color:#9fb9c3;font-size:11px;margin-right:3px}
#hubDialogue .quest-facts-rewards>span{padding:5px 8px;border:1px solid currentColor;border-radius:6px;background:#0003;font-weight:700;line-height:1.4}
#hubDialogue .quest-reward-gold{color:#ffda79}
#hubDialogue .quest-reward-xp{color:#84cfff}
#hubDialogue .quest-reward-perk{color:#d0b1ff}
#hubDialogue .quest-facts-actions{display:grid;gap:7px}
#hubDialogue .quest-facts-actions:not(:empty){margin-top:12px}
#hubDialogue .quest-facts-actions button{width:100%;margin:0;border-color:#94dfbf88;background:#214a40;color:#eaffef;text-align:left;padding:10px 12px;font-size:13px}
#hubDialogue .quest-facts-actions button.hub-quest-choice{background:#214a40;border-color:#9cdbb2}
#hubDialogue #hubChoices:empty{display:none}

/* Fresh talks begin with the person, before their service/options menu. */
#hubDialogue .hub-greeting-first{margin:18px 0 22px;padding:18px;border:1px solid #c9aa7066;border-radius:13px;background:linear-gradient(135deg,#2b3540,#14282e);box-shadow:inset 0 1px #fff1c414}
#hubDialogue .hub-greeting-first .hub-dialogue-label{color:#d4b77f;font-size:10px;letter-spacing:1.2px;margin:0 0 12px}
#hubDialogue .hub-greeting-first .hub-dialogue-line{color:#fff0d6;font-size:20px;line-height:1.6;margin:0 0 18px;min-height:0}
#hubDialogue .hub-greeting-first .hub-voice-controls{margin-bottom:0}
#hubDialogue button.hub-greeting-continue{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:50px;background:linear-gradient(130deg,#eac274,#bd8b41);color:#221a0e;font-weight:800;border:1px solid #f9d995;border-radius:9px;font-size:16px}
#hubDialogue .hub-greeting-continue kbd{font:800 13px system-ui;border:1px solid #604720;border-bottom-width:3px;border-radius:5px;padding:2px 8px;background:#2d281c;color:#ffe8b6}
#hubDialogue button.hub-greeting-continue:hover:not(:disabled){background:#f6d48c}
#hubDialogue button.hub-greeting-continue.dialogue-selected,#hubDialogue button.hub-greeting-continue:focus-visible{color:#221a0e!important}
#hubDialogue .hub-greeting-continue>span{font-size:25px;line-height:1}
@media(max-width:650px){#hubDialogue .hub-greeting-first{padding:14px;margin:12px 0 16px}#hubDialogue .hub-greeting-first .hub-dialogue-line{font-size:17px}}
@media(max-width:650px){#hubDialogue .hub-dialogue-panel:has(.quest-facts){width:100%;max-height:78dvh}#hubDialogue .quest-facts{padding:11px}#hubDialogue .quest-facts h3{font-size:15px}#hubDialogue .quest-facts dl>div{grid-template-columns:58px 1fr}#hubDialogue .hub-dialogue-panel:has(.quest-facts) .hub-dialogue-line{font-size:15px}}
