/* Source family u6 (6000); short NPC summaries, rich descriptions and plain
   focus labels keep separate layout rules. No gameplay values live here. */
#npcDialog[open]{position:fixed;inset:calc(50% - 18px * var(--native-reference-scale,1)) auto auto 50%;margin:0;padding:8px;width:450px;min-width:0;max-width:none;height:auto;min-height:0;max-height:var(--native-reference-max-height,488px);box-sizing:border-box;display:flex;flex-direction:column;border:2px ridge #9cb5ab;border-radius:0;background:#093135;overflow:hidden;transform:translate(-50%,-50%) scale(var(--native-reference-scale,1));transform-origin:center;box-shadow:none;color:#fff;font:28.5px/28.5px LDDialog,Arial,sans-serif}
#npcDialog[open]::backdrop{background:transparent}
#npcDialog[open]>header{display:none}
#npcDialog[open] #dialogText{flex:0 1 auto;min-height:0;max-height:180px;margin:0;padding:0 2px;overflow:auto;scrollbar-width:thin;font:inherit;color:inherit}
#npcDialog[open] #dialogText p{margin:0;white-space:pre-line;word-break:normal;line-break:auto;overflow-wrap:break-word;text-indent:28px}
#npcDialog[open] #dialogChoices{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;max-height:240px;gap:0;margin:10px 0 2px;padding:0;overflow:auto;scrollbar-width:thin}
#npcDialog[open] #dialogChoices button{display:flex;align-items:center;flex:none;gap:3px;width:100%;height:60px;min-height:60px;margin:0;padding:8px 2px;border:0;border-radius:0;background:transparent;font:inherit;text-align:left;overflow:hidden;white-space:nowrap}
#npcDialog[open] #dialogChoices button.selected{background:#fff799;color:#3c4147}
#npcDialog[open] .npc-key{flex:none;color:#ff0000;border:1px solid #d8b535;background:#fff799;font:16px/18px LDDialog,Arial,sans-serif;text-shadow:none}
#npcDialog[open] .npc-choice-text{display:block;flex:1;min-width:0;overflow:hidden;white-space:nowrap;word-break:normal}
#npcDialog[open] .npc-choice-text>span{display:inline-block;min-width:100%;width:max-content;white-space:nowrap}
#npcDialog[open]>.game-dialog-actions{display:flex;flex:none;align-items:center;justify-content:flex-start;gap:0;width:100%;margin:0;padding:0;border:0;background:transparent}
#npcDialog[open]>.game-dialog-actions button{flex:none;display:block;height:60px;min-height:60px;margin:0;padding:3px;box-sizing:border-box;border:3px ridge #7b9592;border-radius:0;background:#293c42;color:#fff;font:28px/32px LDDialog,Arial,sans-serif;overflow:hidden;white-space:nowrap;word-break:normal}
#npcDialog[open] #confirmNpc,#npcDialog[open] #closeNpc{width:90px}
#npcDialog[open] #npcUp,#npcDialog[open] #npcDown{width:74px}
#npcDialog[open] #npcUp{margin-left:40px}
#npcDialog[open] #npcDown{margin-left:10px}
#npcDialog[open] #closeNpc{margin-left:auto}
.native-reference-button-clip{display:block;width:100%;min-width:0;overflow:hidden;white-space:nowrap}
.native-reference-button-clip>span{display:inline-block;min-width:100%;width:max-content;white-space:nowrap}
.native-reference-label-clip{display:block;width:100%;min-width:0;overflow:hidden;white-space:nowrap;word-break:normal}
.native-reference-label-clip>span{display:inline-block;min-width:100%;width:max-content;white-space:nowrap}

/* u21.ui (21000): 360-square authored sheet, input(5,23,210,40),
   #Gửi(220,26,65,35), Hình(297,26,50,35), channel list below at y66.
   The existing chat drafts, recipient permissions and send handlers stay intact. */
#panel.apk-window[data-menu-kind=chat][open]{position:fixed;inset:50% auto auto 50%;display:flex;flex-direction:column;width:540px;max-width:none;height:540px;max-height:none;margin:0;padding:0;box-sizing:border-box;border:2px solid #83a8a2;border-radius:0;background:#093135;transform:translate(-50%,-50%) scale(var(--native-chat-reference-scale,1));transform-origin:center;overflow:visible}
#panel.apk-window[data-menu-kind=chat]>header{height:34px;min-height:34px;padding:0}
#panel.apk-window[data-menu-kind=chat] #panelBody{display:flex;flex:1;min-height:0;overflow:hidden}
#panel.apk-window[data-menu-kind=chat] #nativeChatForm{position:relative;display:block;flex:none;height:63px;min-height:63px;padding:0}
#panel.apk-window[data-menu-kind=chat] #nativeChatText{position:absolute;left:6px;top:0;width:315px;height:60px;padding:6px 2px}
#panel.apk-window[data-menu-kind=chat] #nativeChatSend{position:absolute;left:328px;top:3px;width:98px;height:53px}
#panel.apk-window[data-menu-kind=chat] #nativeChatPicture{position:absolute;left:443px;top:3px;width:75px;height:53px}
#panel.apk-window[data-menu-kind=chat] .chat-channels{height:60px;min-height:60px}
#panel.apk-window[data-menu-kind=chat] :is(#nativeChatLog,.chat-link){word-break:normal;line-break:auto;overflow-wrap:break-word}
#xuMall .xu-mall-inspection{word-break:normal;line-break:auto;overflow-wrap:break-word}
#xuMall .xu-mall-inspection :is(h3,div,span){word-break:normal;line-break:auto;overflow-wrap:break-word}

/* AdvancedString paragraphs wrap at Vietnamese word boundaries. Plain label
   loops and per-run source colors are left to their existing renderers. */
:is(#npcInformationText,.companion-property-tooltip,.character-property-tooltip,.player-inspection-item,.native-chat-message){word-break:normal;line-break:auto;overflow-wrap:break-word}
#toast.game-general-notice.city-npc-notice{word-break:normal!important;line-break:auto;overflow-wrap:break-word;overflow-y:auto;max-height:calc(100dvh - 24px)}
#toast.game-general-notice.native-npc-summary{position:fixed;inset:50% auto auto 50%;width:calc(480px * var(--native-summary-scale,1));max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);margin:0;padding:calc(6px * var(--native-summary-scale,1)) calc(14px * var(--native-summary-scale,1));border:2px solid #8fa29e;border-radius:0;background:#093135;transform:translate(-50%,-50%);box-shadow:none;color:#fff;font:calc(28.5px * var(--native-summary-scale,1))/calc(28.5px * var(--native-summary-scale,1)) LDDialog,Arial,sans-serif;text-align:left;white-space:pre-line;word-break:normal!important;line-break:auto;overflow-wrap:break-word;overflow-y:auto}

/* P51.ui: Xác nhận / Trên / Dưới / Quay lại, inside the dialogue footer. */
#npcDialog[open]>.game-dialog-actions{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.2fr);align-items:stretch;gap:10px!important;width:100%!important;min-height:60px;flex-shrink:0}
#npcDialog[open]>.game-dialog-actions>button{position:static!important;display:block!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;height:60px!important;min-height:60px!important;margin:0!important;padding:3px!important;border:3px ridge #7b9592!important;border-radius:0!important;background:#293c42!important;color:#fff!important;font:22px/30px LDDialog,Arial,sans-serif!important;white-space:nowrap;text-align:center;text-shadow:1px 1px #000;opacity:1;visibility:visible;pointer-events:auto;touch-action:manipulation}
#npcDialog[open]>.game-dialog-actions>button:disabled{opacity:.45;cursor:default}
#npcDialog[open]>.game-dialog-actions>button:focus-visible{outline:2px solid #fff799;outline-offset:1px}