/* Nuomi is a floating desktop companion, never a full-screen input layer. */
.nuomi-wrap { position: fixed; top: 0; left: 0; z-index: 24; width: 112px; height: 130px; pointer-events: none; user-select: none; }
.pet-body { display: block; position: relative; width: 112px; height: 107px; border: 0; padding: 0 8px; background: none; pointer-events: auto; cursor: grab; touch-action: none; }
.pet-body:active { cursor: grabbing; }
.pet-sprite { display: block; width: 96px; height: 104px; background: center / contain no-repeat; transform-origin: 50% 87%; filter: drop-shadow(0 7px 5px #09102345); }
.pet-loading { position: absolute; inset: 20px; display: grid; place-items: center; color: #f9e5c7; }
.pet-loading .ui-icon { width: 40px; height: 40px; }
.pet-ready .pet-loading { display: none; }
.pet-nameplate { pointer-events: auto; display: block; max-width: 100%; min-width: 96px; margin: 0 auto; min-height: 23px; padding: 3px 9px; border: 0; border-radius: 6px; color: #fff; background: #131a39c2; font-size: 11px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px #080d2b2e; }
.pet-nameplate:hover { background: #1c356ce8; }
.pet-speech { position: absolute; bottom: calc(100% + 9px); left: 0; width: 218px; padding: 12px 14px; color: #493527; background: #fff9ec; box-shadow: 0 7px 22px #070c3f30; border-radius: 13px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.pet-speech::after { content: ''; position: absolute; top: calc(100% - 1px); left: var(--tail, 43px); border: 7px solid transparent; border-top-color: #fff9ec; }
.nuomi-wrap[data-bubble-below='true'] .pet-speech::after { top: auto; bottom: calc(100% - 1px); border-top-color: transparent; border-bottom-color: #fff9ec; }
.pet-sleep { display: none; position: absolute; right: 1px; top: 8px; color: #fff4d9; font: 700 16px Georgia,serif; letter-spacing: 3px; text-shadow: 0 2px 3px #192547; }
.is-sleeping .pet-sleep { display: block; }
.is-sleeping .pet-sprite { opacity: .85; }
.pet-panel { --pet-ink: #43352d; --pet-muted: #756252; --pet-overlay-height: calc(100dvh - 142px); position: fixed; z-index: 40; width: min(350px,calc(100vw - 20px)); max-height: var(--pet-overlay-height); overflow: hidden; color: var(--pet-ink); background: #fffaf0; border-radius: 16px; box-shadow: 0 18px 60px #09133159; font-size: 13px; }
.pet-panel button { border: 0; background: none; border-radius: 7px; }
.pet-panel button:focus-visible, .pet-panel summary:focus-visible, .pet-panel input:focus-visible { outline-color: #aa612c; }
.pet-panel button:hover { background: #eadbc680; }
.pet-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px 9px 19px; background: #f4e8d4; }
.pet-panel-header > span { display: flex; align-items: center; gap: 8px; }
.pet-panel-header .ui-icon { width: 17px; color: #966539; }
.pet-panel-header button { width: 35px; height: 35px; font-size: 24px; color: #756252; }
.pet-panel-content { padding: 16px 20px 20px; max-height: calc(var(--pet-overlay-height) - 54px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cdb697 transparent; }
.pet-profile { display: flex; align-items: center; gap: 14px; margin: -4px 0 14px; }
.pet-portrait { display: block; width: 66px; height: 72px; flex: none; background: url('assets/pet/nuomi/base.webp') center / contain no-repeat; }
.pet-profile p { margin: 0; }
.pet-profile .pet-profile-name { font-size: 20px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.pet-bond { color: #906033; font-size: 12px; line-height: 1.8; }
.pet-profile .pet-motto { color: var(--pet-muted); font-size: 11px; margin-top: 3px; }
.pet-time { display: flex; margin: 0 0 18px; padding-bottom: 15px; border-bottom: 1px solid #d3bea64d; font-variant-numeric: tabular-nums; }
.pet-time > div { flex: 1; }
.pet-time dt { color: var(--pet-muted); font-size: 11px; margin-bottom: 6px; }
.pet-time dd { margin: 0; font-size: 15px; font-weight: 650; }
.pet-needs { display: grid; gap: 9px; }
.pet-needs label { display: grid; grid-template-columns: 32px 1fr 25px; gap: 10px; align-items: center; font-size: 12px; }
.pet-needs span { text-align: right; font-variant-numeric: tabular-nums; color: var(--pet-muted); }
.pet-needs meter { width: 100%; height: 8px; border: 0; border-radius: 5px; background: #ede1d0; }
.pet-needs meter::-webkit-meter-bar { background: #ede1d0; height: 8px; border: 0; }
.pet-needs meter::-webkit-meter-optimum-value { background: #c6985e; border-radius: 5px; transition: width 200ms; }
.pet-needs meter::-moz-meter-bar { background: #c6985e; border-radius: 5px; }
.pet-needs meter[data-pet-meter='happiness']::-webkit-meter-optimum-value { background: #b98088; }
.pet-needs meter[data-pet-meter='energy']::-webkit-meter-optimum-value { background: #84946e; }
.pet-wallet { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 17px 0 13px; font-size: 12px; }
.pet-wallet > span { display: flex; align-items: center; gap: 5px; }
.pet-wallet .ui-icon { width: 16px; height: 16px; color: #ac7a36; }
.pet-wallet button { padding: 7px 9px; color: #835522; background: #f2e4cb; }
.pet-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.pet-actions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 65px; padding: 8px 3px; background: #f2e8d8; font-size: 12px; }
.pet-actions button:hover { background: #e9d7bc; }
.pet-actions .ui-icon { width: 20px; height: 20px; color: #8d603d; }
.pet-actions small { font-size: 10px; color: #776048; }
.pet-feedback { margin: 10px 0 0; min-height: 33px; color: #8b572d; font-size: 12px; line-height: 1.6; }
.pet-stash { border-top: 1px solid #d3bea64d; margin-top: 14px; padding-top: 15px; }
.pet-stash h3 { margin: 0 0 9px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pet-stash h3 span { color: #8f693c; font-variant-numeric: tabular-nums; }
[data-pet-stash] > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
[data-pet-stash] > div > span { overflow-wrap: anywhere; }
[data-pet-stash] button { color: #88571c; white-space: nowrap; font-size: 12px; padding: 9px; }
.pet-apps-link { display: flex; align-items: center; gap: 6px; color: #8b5929; font-size: 12px; padding: 9px 0; }
.pet-apps-link .ui-icon { width: 13px; height: 13px; }
.pet-small { color: var(--pet-muted); font-size: 11px; line-height: 1.7; margin: 7px 0; }
.pet-extras { border-top: 1px solid #d3bea64d; margin-top: 10px; padding-top: 11px; }
.pet-extras summary { padding: 5px 0; cursor: pointer; font-size: 12px; color: #74563c; }
.pet-achievements { display: flex; flex-wrap: wrap; gap: 7px 12px; padding: 14px 0 7px; }
.pet-achievements > span { display: flex; align-items: center; gap: 3px; font-size: 10px; color: #807567; }
.pet-achievements .ui-icon { width: 13px; height: 13px; }
.pet-achievements .unlocked { color: #915a25; }
.pet-rename { display: flex; align-items: center; gap: 9px; margin: 15px 0 10px; }
.pet-rename input { width: 0; flex: 1; min-height: 34px; padding: 5px 8px; border: 1px solid #d5c1a7; border-radius: 5px; background: #fffdf8; color: var(--pet-ink); caret-color: #a16b34; }
.pet-rename button { padding: 9px; color: #88571c; }
.pet-setting { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.pet-setting input { width: 18px; height: 18px; accent-color: #a67540; }
.pet-hide { display: flex; align-items: center; gap: 7px; padding: 10px 0; color: var(--pet-muted); font-size: 12px; }
.pet-hide .ui-icon { width: 15px; height: 15px; }
.pet-ball { position: fixed; z-index: 23; width: 25px; height: 25px; border-radius: 50%; color: #89532c; background: #f2c579; box-shadow: 0 4px 8px #14204850; display: grid; place-items: center; pointer-events: none; animation: pet-ball-drop 450ms ease-out; }
.pet-ball .ui-icon { width: 23px; height: 23px; }
@keyframes pet-ball-drop { from { transform: translateY(-80px) rotate(-120deg); } to { transform: translateY(0) rotate(0); } }
@media (max-width:650px) {
  .nuomi-wrap { width: 88px; height: 105px; }
  .pet-body { width: 88px; height: 82px; padding: 0 6px; }
  .pet-sprite { width: 76px; height: 82px; }
  .pet-nameplate { min-width: 82px; padding-inline: 6px; font-size: 10px; }
  .pet-panel-content { padding: 14px 17px 18px; }
  .pet-actions button { min-height: 66px; }
  .pet-time dd { font-size: 14px; }
}
.pet-quick-menu { position: fixed; z-index: 110; width: min(222px,calc(100vw - 20px)); max-height: var(--pet-overlay-height,420px); padding: 6px; overflow-y: auto; overscroll-behavior: contain; color: #43352d; background: #fff9eeed; backdrop-filter: blur(18px); box-shadow: 0 12px 34px #080e333b; border-radius: 10px; scrollbar-width: thin; scrollbar-color: #cdb697 transparent; }
.pet-menu-heading { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px 10px; font-weight: 650; font-size: 12px; color: #73583e; }
.pet-menu-heading span { font-size: 11px; font-weight: 400; }
.pet-quick-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; border: 0; border-radius: 5px; background: none; padding: 7px 10px; font-size: 13px; text-align: left; }
.pet-quick-menu button .ui-icon { width: 16px; height: 16px; color: #8c6743; }
.pet-quick-menu button:hover, .pet-quick-menu button:focus-visible { background: #9b6c3e; color: white; outline: none; }
.pet-quick-menu button:hover .ui-icon, .pet-quick-menu button:focus-visible .ui-icon { color: inherit; }
.pet-quick-menu hr { border: 0; border-top: 1px solid #d3bea66b; margin: 5px 7px; }
.pet-gallery { padding-bottom: 15px; margin-bottom: 14px; border-bottom: 1px solid #d3bea64d; }
.pet-gallery h3 { margin: 0 0 8px; font-size: 12px; display: flex; justify-content: space-between; }
.pet-gallery h3 span { font-weight: 400; font-size: 11px; color: #756252; }
.pet-gallery > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.pet-gallery button { min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 5px 3px 8px; gap: 4px; }
.pet-gallery button[aria-pressed='true'] { background: #eee0c8; }
.pet-gallery img { display: block; width: 54px; height: 58px; object-fit: contain; }
.pet-gallery button > .ui-icon { width: 30px; height: 58px; color: #937147; }
.pet-gallery strong { font-size: 12px; font-weight: 600; }.pet-gallery small { font-size: 10px; color: #756252; }
.pet-gallery .pet-friend-button { width: 100%; margin-top: 9px; display: flex; flex-direction: row; justify-content: center; gap: 8px; padding: 10px; background: #eee0c8; font-size: 13px; }
.pet-friend-button .ui-icon { width: 17px; height: 17px; }
.pet-gallery > div { max-height: 230px; overflow-y: auto; scrollbar-width: thin; }
.pet-gallery strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-rename input { font-size: 16px; }
@media (pointer:coarse) { .pet-quick-menu button { min-height: 42px; } }
