#npc-actors { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.npc-actor { position:absolute; width:80px; height:140px; padding:0; border:0; background:transparent; color:#ffffff; pointer-events:auto; transform-origin:center bottom; }
/* NPC names: plain white, no shadow or outline (user request, 2026-10-18). */
.npc-actor span { position:absolute; top:0; left:50%; transform:translateX(-50%); white-space:nowrap; font:calc(12px + var(--world-name-size))/calc(14px + var(--world-name-size)) "Courier New",monospace; text-shadow:1px 1px 0 #000; -webkit-text-stroke:0; }
.npc-service-label { position:absolute; bottom:100%; left:50%; transform:translateX(-50%); color:#ffff00; font:inherit; font-weight:bold; line-height:15px; pointer-events:none; text-shadow:1px 1px 0 #000; }
.npc-actor.shop-flag span { display:none; }
/* Player booth carpets (booth-ui.js): a low hit box, labelled "<owner>'s shop". */
.npc-actor.booth-carpet { height:70px; }
/* The owner sits just behind the carpet, so its label goes below it rather than over the owner's head. */
.npc-actor.booth-carpet span { top:calc(100% + 30px); color:#ffe08a; text-align:center; }
.npc-actor:hover span,.npc-actor:focus-visible span { color:#ffff00; }
.npc-dialogue { position:absolute; z-index:8; left:50%; transform:translateX(-50%); top:max(36px,env(safe-area-inset-top)); width:544px; max-width:calc(100% - 32px); min-height:150px; padding:14px 20px 12px 80px; border:6px solid #c4b57c; border-image:url('/ui/npcs/dialog.png?v=17bc966160b9ee25') 8 stretch; background:#071724a8; font:12px/15px Arial,sans-serif; text-shadow:1px 1px #000; }
.npc-dialogue h2 { margin:0 22px 5px 0; font:bold 12px Arial,sans-serif; color:#ffed66; }
.npc-dialogue p { margin:0; color:#ffff00; min-height:55px; }
.npc-portrait { position:absolute; left:10px; top:24px; width:60px; height:60px; object-fit:contain; }
.npc-dialogue.without-portrait { padding-left:20px; }
.npc-dialogue.without-portrait .npc-options { margin-left:0; }
.npc-close { position:absolute; top:0; right:1px; padding:0 3px; border:0; background:transparent; color:#d1c38e; font:20px Georgia,serif; }
.npc-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:30px; row-gap:6px; margin:12px 0 0 -65px; }
.npc-options button { min-width:0; overflow-wrap:anywhere; border:0; padding:2px 0; background:none; color:white; text-align:left; font:12px/16px Arial,sans-serif; text-shadow:1px 1px #000; }
.npc-options button:hover,.npc-options button:focus-visible { color:#ffff00; text-decoration:underline; }
.npc-options button:disabled { color:#aaa; cursor:wait; text-decoration:none; }
.npc-input-form { grid-column:1 / -1; display:flex; align-items:flex-end; gap:10px; width:100%; margin:0; }
.npc-input-form label { display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:#fff; }
.npc-input-form input { width:180px; max-width:55vw; padding:3px 5px; border:1px solid #a99c69; border-radius:0; background:#081723; color:white; font:12px Arial,sans-serif; }
.npc-options .npc-input-form button { padding:3px 7px; }
.npc-service { position:absolute; z-index:8; top:max(36px,env(safe-area-inset-top)); left:max(16px,env(safe-area-inset-left)); width:370px; max-width:calc(100% - 32px); max-height:calc(100dvh - 170px); display:flex; flex-direction:column; overflow:auto; overscroll-behavior:contain; padding:8px 12px 10px; border:8px solid #c4b57c; border-image:url('/ui/npcs/dialog.png?v=17bc966160b9ee25') 8 stretch; background:#132a38 url('/ui/panel-texture.png?v=93164c996907e574') center/180px; color:#fff; font:12px/16px Arial,sans-serif; text-shadow:1px 1px #000; }
.npc-service-heading { position:relative; flex-shrink:0; padding:0 24px 5px 0; }
.npc-service-heading h2 { margin:0; font:bold 12px/18px Arial,sans-serif; color:#ffed66; }
.npc-service-heading .npc-close { top:-5px; right:-7px; }
.npc-service p { margin:0; flex-shrink:0; }
.npc-service .npc-service-balance { color:#ddd3af; font-size:11px; padding-bottom:5px; }
.npc-service-message { color:#ffff00; padding-bottom:6px; }
.npc-service-message:empty { display:none; }
#npc-service-body { display:flex; min-height:80px; flex:1 1 auto; flex-direction:column; overflow:hidden; }
.npc-service-tabs { display:flex; gap:18px; border-bottom:1px solid #9b8f6166; flex-shrink:0; margin-bottom:6px; }
.npc-service-tabs button { padding:3px 0; border:0; background:none; color:white; font:12px/18px Arial,sans-serif; }
.npc-service-tabs button[aria-selected='true'] { color:#ffff00; border-bottom:1px solid #d6c889; }
.npc-service-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; min-height:80px; max-height:300px; overflow:auto; align-content:start; overscroll-behavior:contain; scrollbar-color:#a99c69 #10202d; padding:2px 3px 3px 1px; }
.npc-item-choice { display:flex; flex-direction:column; align-items:center; gap:1px; min-width:0; padding:3px 2px; border:1px solid transparent; border-radius:0; background:#07172466; color:white; font:11px/14px Arial,sans-serif; text-shadow:1px 1px #000; }
.npc-item-choice:hover,.npc-avatar-choice:hover { border-color:#a99c69; }
.npc-item-choice[aria-pressed='true'],.npc-avatar-choice[aria-pressed='true'] { border-color:#ffff80; background:#41545b; }
.npc-item-icon { position:relative; display:block; width:43px; height:43px; flex-shrink:0; background:url('/ui/inventory-slot.png?v=90657abfe5e8983f') center/43px no-repeat; }
.npc-item-icon img { position:relative; display:block; z-index:1; width:43px; height:43px; object-fit:contain; }
.npc-item-name { display:block; max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.npc-item-price { color:#e8da99; font-size:10px; white-space:nowrap; }
.npc-avatar-list { grid-template-columns:repeat(4,64px); justify-content:space-between; gap:7px 5px; }
.npc-avatar-choice { width:64px; padding:0; border:1px solid transparent; border-radius:0; background:#07172488; color:#fff; font:10px/13px Arial,sans-serif; }
.npc-avatar-choice img { display:block; width:62px; height:62px; object-fit:contain; }
.npc-avatar-choice span { display:block; }
.npc-service-selection { padding-top:7px; color:#ffffb0; min-height:23px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.npc-service-actions { display:flex; flex-wrap:wrap; gap:6px 12px; flex-shrink:0; padding:3px 0; }
.npc-service-action { padding:4px 6px; border:1px solid #9b8f61; border-radius:0; background:#10222ecc; color:white; font:12px/16px Arial,sans-serif; text-shadow:1px 1px #000; }
.npc-service-action:hover:enabled { color:#ffff00; border-color:#e5da9e; }
.npc-service-action:disabled { color:#a4aaa8; opacity:.7; }
.npc-service .npc-service-hint { padding-top:5px; color:#c1c7bd; font-size:10px; line-height:14px; }
.npc-pending { color:#ffff00; padding-top:4px; }
.npc-benefits { position:absolute; z-index:5; left:4px; top:21px; max-width:calc(100% - 8px); color:#ffed77; pointer-events:none; font:11px/14px Arial,sans-serif; text-shadow:1px 1px #000,-1px -1px #000; white-space:nowrap; }
.npc-shop { position:absolute; z-index:8; left:16px; top:36px; width:272px; height:251px; padding:0; border:0; background:url('/ui/shop/frame.png?v=6446a3e3a3d0013c') no-repeat; color:white; font:11px/15px Arial,sans-serif; text-shadow:1px 1px #000; }
.npc-shop-grid { position:absolute; left:24px; top:25px; width:215px; height:172px; display:grid; grid-template-columns:repeat(5,43px); grid-template-rows:repeat(4,43px); }
.npc-shop-slot { width:43px; height:43px; padding:1px; border:0; border-radius:0; background:transparent; }
.npc-shop-slot .npc-item-icon,.npc-shop-slot .npc-item-icon img { width:41px; height:41px; background:none; }
.npc-shop-slot[aria-pressed='true'] { outline:1px solid #ffff99; outline-offset:-2px; }
.npc-shop-slot:disabled { opacity:1; }
.npc-shop-slot:disabled:not([data-definition-id]) { cursor:default; }
.npc-shop-footer { position:absolute; top:214px; width:64px; height:22px; padding:0; border:0; border-radius:0; background-color:transparent; background-repeat:no-repeat; }
.npc-shop-repair { left:20px; background-image:url('/ui/shop/repair.png?v=1380443a0ca51cd4'); }
.npc-shop-repair:active,.npc-shop-repair[aria-pressed='true'] { background-image:url('/ui/shop/repair-pressed.png?v=bdf5d212d4f33a3f'); }
.npc-shop-help { left:104px; background-image:url('/ui/shop/help.png?v=932972ffc9d781e9'); }
.npc-shop-help:active { background-image:url('/ui/shop/help-pressed.png?v=2b6bb025475dadec'); }
.npc-shop-close { left:188px; background-image:url('/ui/shop/close.png?v=8bb00169e238dd04'); }
.npc-shop-close:active { background-image:url('/ui/shop/close-pressed.png?v=7e469c4378f3a20f'); }
.npc-shop-arrow { position:absolute; left:246px; width:20px; height:20px; padding:0; border:0; border-radius:0; background-color:transparent; background-repeat:no-repeat; }
.npc-shop-up { top:151px; background-image:url('/ui/shop/up.png?v=a2d86e0bdeb90d21'); }
.npc-shop-up:active { background-image:url('/ui/shop/up-pressed.png?v=0624cf90d356a20c'); }
.npc-shop-down { top:175px; background-image:url('/ui/shop/down.png?v=22d7bb3d7a72bc04'); }
.npc-shop-down:active { background-image:url('/ui/shop/down-pressed.png?v=d53c6b7b7b3eca64'); }
.npc-shop-arrow:disabled { opacity:.35; cursor:default; }
.npc-shop-status { position:absolute; top:251px; left:4px; width:264px; margin:0; padding:3px 0; color:#ffff77; font:11px/15px Arial,sans-serif; }
.npc-shop-instructions { position:absolute; left:0; top:284px; width:272px; padding:8px; border:6px solid #c4b57c; border-image:url('/ui/npcs/dialog.png?v=17bc966160b9ee25') 8 stretch; background:#102433ed; color:#fff; }
@media(max-width:560px) { .npc-shop { left:8px; top:28px; } }
@media(max-height:600px) { .npc-service { max-height:calc(100dvh - 120px); top:24px; } .npc-service-list { max-height:190px; } }
@media(max-width:560px) { .npc-dialogue { max-width:calc(100% - 16px); padding-right:12px; } .npc-options { gap:8px 18px; } }
@media(max-width:380px) { .npc-service { left:8px; max-width:calc(100% - 16px); padding:7px 8px; } .npc-avatar-list { grid-template-columns:repeat(3,64px); justify-content:space-evenly; } }
.npc-improve { position:absolute; z-index:8; left:16px; top:36px; width:184px; height:184px; padding:0; border:0; background:url('/ui/improve/frame.png?v=d6b236773c214513') no-repeat; color:white; font:11px/15px Arial,sans-serif; text-shadow:1px 1px #000; }
.npc-improve-slot { position:absolute; padding:0; border:0; border-radius:0; background:transparent; }
.npc-improve-item { left:32px; top:44px; width:64px; height:64px; }
.npc-improve-material { left:112px; top:54px; width:42px; height:42px; }
.npc-improve-slot .item-slot-icon { position:relative; z-index:1; display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; }
.npc-improve-slot.drop-target { outline:1px solid #ffff99; outline-offset:-2px; }
.npc-improve-button { position:absolute; padding:0; border:0; border-radius:0; background-color:transparent; background-repeat:no-repeat; }
.npc-improve-submit { left:61px; top:127px; width:64px; height:22px; background-image:url('/ui/improve/improve.png?v=5ef7597b23813e93'); }
.npc-improve-submit:active:enabled { background-image:url('/ui/improve/improve-pressed.png?v=0837a14429a31469'); }
.npc-improve-submit:disabled { opacity:.55; cursor:default; }
.npc-improve-help { left:25px; top:153px; width:48px; height:22px; background-image:url('/ui/improve/help.png?v=33d506c17ae49e56'); }
.npc-improve-help:hover,.npc-improve-help[aria-expanded='true'] { background-image:url('/ui/improve/help-pressed.png?v=da200e71e4d56299'); }
.npc-improve-close { left:117px; top:153px; width:48px; height:22px; background-image:url('/ui/improve/close.png?v=4b9c40bf4c1bf7c6'); }
.npc-improve-close:hover { background-image:url('/ui/improve/close-pressed.png?v=7cd6abfcfe78b983'); }
.npc-improve-x { left:159px; top:10px; width:16px; height:16px; background-image:url('/ui/improve/close-x.png?v=c5298b516699b513'); }
.npc-improve-x:hover { background-image:url('/ui/improve/close-x-pressed.png?v=69f5b01c638e6cbf'); }
.npc-improve-status { position:absolute; top:186px; left:4px; width:260px; margin:0; padding:3px 0; color:#ffff77; font:11px/15px Arial,sans-serif; }
.npc-improve-instructions { position:absolute; left:0; top:226px; width:260px; padding:8px; border:6px solid #c4b57c; border-image:url('/ui/npcs/dialog.png?v=17bc966160b9ee25') 8 stretch; background:#102433ed; color:#fff; }
.npc-improve-repair { position:absolute; left:4px; top:242px; width:260px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.npc-improve-repair[hidden] { display:none; }
.npc-improve-repair-question { width:100%; margin:0; padding:4px 6px; border:1px solid #9b8f61; background:#10222ee6; }
.npc-improve-repair:not([hidden]) ~ .npc-improve-instructions { top:316px; }
.npc-warehouse { position:absolute; z-index:8; left:16px; top:36px; width:270px; height:386px; padding:0; border:0; background:url('/ui/warehouse/frame.png?v=474b803515f43529') no-repeat; color:white; font:11px/15px Arial,sans-serif; text-shadow:1px 1px #000; }
.npc-warehouse-grid { position:absolute; left:19px; top:168px; width:215px; height:172px; display:grid; grid-template-columns:repeat(5,43px); grid-template-rows:repeat(4,43px); }
.npc-warehouse-slot { position:relative; width:43px; height:43px; padding:1px; border:0; border-radius:0; background:transparent; }
.npc-warehouse-slot .npc-item-icon,.npc-warehouse-slot .npc-item-icon img { width:41px; height:41px; background:none; }
.npc-warehouse-slot:disabled { opacity:1; }
.npc-warehouse-slot:disabled:not([data-uid]) { cursor:default; }
.npc-warehouse-button { position:absolute; padding:0; border:0; border-radius:0; background-color:transparent; background-repeat:no-repeat; }
.npc-warehouse-deposit { left:46px; top:54px; width:64px; height:22px; background-image:url('/ui/warehouse/deposit.png?v=3627ef5f6a3565b0'); }
.npc-warehouse-withdraw { left:150px; top:54px; width:64px; height:22px; background-image:url('/ui/warehouse/withdraw.png?v=c74b5baa6bd89f38'); }
.npc-warehouse-deposit:disabled,.npc-warehouse-withdraw:disabled { opacity:.45; cursor:default; }
.npc-warehouse-amount { position:absolute; left:127px; top:87px; width:77px; height:16px; padding:0 4px; border:0; border-radius:0; background:transparent; color:#fff0ca; font:11px/16px Arial,sans-serif; }
.npc-warehouse-savings { position:absolute; left:130px; top:122px; width:77px; height:16px; color:#fff0ca; font:11px/16px Arial,sans-serif; }
.npc-warehouse-help { left:44px; top:348px; width:48px; height:22px; background-image:url('/ui/warehouse/help.png?v=33d506c17ae49e56'); }
.npc-warehouse-help:active,.npc-warehouse-help[aria-expanded='true'] { background-image:url('/ui/warehouse/help-pressed.png?v=da200e71e4d56299'); }
.npc-warehouse-close { left:156px; top:348px; width:64px; height:22px; background-image:url('/ui/warehouse/close.png?v=8bb00169e238dd04'); }
.npc-warehouse-close:active { background-image:url('/ui/warehouse/close-pressed.png?v=7e469c4378f3a20f'); }
.npc-warehouse-x { left:241px; top:20px; width:15px; height:15px; background-image:url('/ui/warehouse/close-x.png?v=516ee3f630374e88'); }
.npc-warehouse-x:active { background-image:url('/ui/warehouse/close-x-pressed.png?v=d43d3dd4329aa332'); }
.npc-warehouse-up,.npc-warehouse-down { left:232px; width:20px; height:20px; }
.npc-warehouse-up { top:287px; background-image:url('/ui/warehouse/up.png?v=a2d86e0bdeb90d21'); }
.npc-warehouse-up:active:enabled { background-image:url('/ui/warehouse/up-pressed.png?v=0624cf90d356a20c'); }
.npc-warehouse-down { top:321px; background-image:url('/ui/warehouse/down.png?v=22d7bb3d7a72bc04'); }
.npc-warehouse-down:active:enabled { background-image:url('/ui/warehouse/down-pressed.png?v=d53c6b7b7b3eca64'); }
.npc-warehouse-up:disabled,.npc-warehouse-down:disabled { opacity:.35; cursor:default; }
.npc-warehouse-status { position:absolute; top:386px; left:4px; width:264px; margin:0; padding:3px 0; color:#ffff77; font:11px/15px Arial,sans-serif; }
.npc-warehouse-instructions { position:absolute; left:0; top:420px; width:270px; padding:8px; border:6px solid #c4b57c; border-image:url('/ui/npcs/dialog.png?v=17bc966160b9ee25') 8 stretch; background:#102433ed; color:#fff; }
@media(max-width:560px) { .npc-warehouse { left:8px; top:28px; } }

.npc-warehouse-deposit:active:enabled { background-image:url('/ui/warehouse/deposit-pressed.png?v=52de817013ea59aa'); }
.npc-warehouse-withdraw:active:enabled { background-image:url('/ui/warehouse/withdraw-pressed.png?v=4be833760649f08a'); }
.npc-warehouse-amount[aria-invalid='true'] { color:#ff7777; }
.npc-warehouse-amount:disabled { color:#aaa; }
