/* Hộp thoại riêng, nền đen / viền trắng thống nhất UI thành phố. */
#panel.butler-panel{background:rgba(0,0,0,.65);padding:16px;z-index:25}
#panel.butler-panel .panel-card{width:min(760px,calc(100vw - 32px));max-width:760px;max-height:calc(var(--visual-height,100dvh) - 32px);padding:20px;background:#101114!important;border:1px solid #f5f5f5!important;border-radius:12px!important;color:#f6f5f2;overflow:auto;box-shadow:0 24px 80px #0009}
#panel.butler-panel .panel-head{margin-bottom:16px;align-items:center;border-bottom:1px solid #ffffff25;padding-bottom:12px}
#panel.butler-panel .panel-head h2{font-size:16px;letter-spacing:3px;margin:0;font-weight:700}
#panel.butler-panel #close-panel{background:#1d1e22!important;border:1px solid #ffffff55!important;border-radius:8px;width:36px;min-height:36px;padding:4px;color:#fff}
.butler-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px;align-items:start}
.butler-art{position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;overflow:hidden;border-radius:10px;background:radial-gradient(ellipse at 50% 45%,#5b493c55 0,#29232644 44%,#17171b 72%);border:1px solid #ffffff20;align-self:stretch;justify-content:center;min-height:330px}
.butler-art-kicker{font-size:9px;letter-spacing:1.8px;color:#c8bfae;margin:18px 0 6px;text-align:center}
.butler-portrait{width:100%;max-width:270px;height:auto;object-fit:contain;filter:drop-shadow(0 10px 12px #0007);animation:butler-breathe 3.4s ease-in-out infinite}
.butler-mood{display:inline-flex;font-size:11px;color:#e7cda3;background:#18191d;border:1px solid #8c775355;padding:6px 13px;margin:8px 8px 18px;border-radius:20px}
.butler-conversation{min-width:0}.butler-eyebrow{margin:0 0 6px;color:#d6b98b;font-size:10px;letter-spacing:2px;font-weight:650}
.butler-intro h3{margin:0 0 8px;font-size:25px;line-height:1.25;font-weight:750;letter-spacing:-.5px}
.butler-status{display:inline-block;color:#c7c8c6;font-size:11px;margin-bottom:13px}
.butler-status:before{content:'';display:inline-block;vertical-align:1px;width:5px;height:5px;background:#d6b98b;margin-right:7px;border-radius:100%}
.butler-speech{position:relative;padding:13px 15px;border:1px solid #ffffff32;border-radius:0 12px 12px 12px;background:#1d1d22;margin-bottom:16px;min-height:104px;box-sizing:border-box}
.butler-speaker{font-size:10px;color:#d6b98b;letter-spacing:1.2px;font-weight:700}
.butler-speech p{font-size:14px;line-height:1.65;margin:6px 0 0;color:#f2f0eb}
.butler-choices{display:grid;gap:8px}
#panel.butler-panel .butler-choice{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:12px;width:100%;min-height:56px;padding:11px 13px!important;border:1px solid #ffffff40!important;border-radius:8px!important;background:#17181c!important;color:#f7f7f7;font:inherit;cursor:pointer;transition:background .15s,border-color .15s}
#panel.butler-panel .butler-choice:hover:not(:disabled){background:#292a2f!important;border-color:#fff!important}
#panel.butler-panel .butler-choice-primary{background:#ddc299!important;border-color:#ddc299!important;color:#181512!important}
#panel.butler-panel .butler-choice-primary:hover:not(:disabled){background:#ecd6b5!important}
.butler-choice-copy{display:block;min-width:0}.butler-choice strong{display:block;font-size:13px;font-weight:700;line-height:1.4}
.butler-choice small{display:block;margin-top:3px;font-size:10.5px;line-height:1.5;opacity:.75}
.butler-choice-arrow{font-size:22px;line-height:1;flex:none;opacity:.8}
#panel.butler-panel .butler-choice:disabled{opacity:.4;cursor:not-allowed}
.butler-hint,.butler-warning{margin:12px 0 0;font-size:11px;line-height:1.6;color:#a6a8ac}
.butler-warning{color:#f2c0a5}.butler-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #ffffff20;margin-top:18px;padding-top:12px}
.butler-footer>span{font-size:9px;letter-spacing:1.15px;color:#9d9ea6}
#panel.butler-panel .butler-bye{background:transparent!important;color:#e6e4df;border:1px solid #ffffff40!important;border-radius:7px;padding:8px 13px;font-size:12px;min-height:36px;white-space:nowrap}
#panel.butler-panel button:focus-visible{outline:2px solid #e3c89e;outline-offset:3px}
@keyframes butler-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@media(max-width:540px){
 #panel.butler-panel{padding:10px}
 #panel.butler-panel .panel-card{padding:14px;width:calc(100vw - 20px);max-height:calc(var(--visual-height,100dvh) - 20px)}
 #panel.butler-panel .panel-head{margin-bottom:12px;padding-bottom:10px}
 .butler-layout{grid-template-columns:1fr;gap:12px}
 .butler-art{min-height:0;height:170px;justify-content:flex-end}
 .butler-art-kicker{position:absolute;left:12px;top:8px;margin:0;width:65px;text-align:left;line-height:1.7;font-size:8px;letter-spacing:1px}
 .butler-portrait{width:177px;height:192px;margin-top:6px;margin-bottom:-16px;object-fit:contain}
 .butler-mood{position:absolute;right:10px;bottom:10px;margin:0;font-size:10px;padding:5px 9px}
 .butler-intro{position:relative}.butler-intro h3{font-size:21px;margin-bottom:5px}.butler-eyebrow{font-size:9px}
 .butler-status{margin-bottom:8px;font-size:10px}
 .butler-speech{min-height:0;padding:10px 12px;margin-bottom:10px}.butler-speech p{font-size:13px;line-height:1.5}
 #panel.butler-panel .butler-choice{min-height:50px;padding:9px 11px!important}.butler-choice strong{font-size:12px}
 .butler-choice small{font-size:10px}.butler-hint{font-size:10px;margin-top:10px}
 .butler-footer{margin-top:12px;padding-top:10px}.butler-footer>span{max-width:150px;line-height:1.6;font-size:8px}
}
@media(max-height:500px) and (min-width:541px){.butler-layout{grid-template-columns:180px minmax(0,1fr);gap:16px}.butler-art{min-height:260px}.butler-portrait{max-width:190px}.butler-speech{min-height:0}.butler-intro h3{font-size:21px}}
@media(prefers-reduced-motion:reduce){.butler-portrait{animation:none}.butler-choice{transition:none}}

/* Đủ chỗ cho lựa chọn và nút đóng trên điện thoại đặt ngang. */
@media (max-height:500px) and (min-width:541px){
 #panel.pet-owner-panel{padding:6px}
 #panel.pet-owner-panel .panel-card{width:min(760px,calc(100vw - 12px));max-height:calc(var(--visual-height,100dvh) - 12px);padding:10px 14px}
 #panel.pet-owner-panel .panel-head{margin-bottom:6px;padding-bottom:5px}
 .pet-owner-panel .butler-layout{grid-template-columns:148px minmax(0,1fr);gap:14px}
 .pet-owner-panel .butler-art{min-height:0}
 .pet-owner-panel .butler-art-kicker{margin:6px 0;font-size:8px}
 .pet-owner-panel .butler-portrait{height:160px;width:148px}
 .pet-owner-panel .butler-mood{margin:5px;font-size:10px;padding:3px 9px}
 .pet-owner-panel .butler-intro h3{font-size:19px;margin:0}
 .pet-owner-panel .butler-eyebrow,.pet-owner-panel .butler-status{margin:0 0 3px}
 .pet-owner-panel .butler-speech{min-height:0;margin:2px 0 6px;padding:6px 9px}
 .pet-owner-panel .butler-speech p{font-size:12px;line-height:1.4;margin:2px 0}
 .pet-owner-panel .butler-choices{gap:4px}
 #panel.pet-owner-panel .butler-choice{min-height:39px;padding:4px 9px!important}
 .pet-owner-panel .butler-choice small{margin:0}
 .pet-owner-panel .butler-hint{margin:4px 0;font-size:10px}
 .pet-owner-panel .butler-footer{margin-top:5px;padding-top:5px}
 #panel.pet-owner-panel .butler-bye{min-height:29px;padding:4px 10px}
}
#panel.pet-owner-panel .butler-choice.job-conflict:disabled{
 opacity:1!important;background:#433b2d!important;color:#fff0ce!important;border-color:#aa9168!important;
}
#panel.pet-owner-panel .job-conflict .butler-choice-arrow{display:none}
#panel.pet-owner-panel .job-conflict small{opacity:1}

/* Keep the full hat and the waist inside the dialogue card on portrait phones. */
@media(max-width:540px){
 .fisher-dialogue .butler-art{align-items:center;justify-content:center}
 .fisher-dialogue .butler-portrait{width:148px;height:161px;margin:0}
}
