/* V13 living companion. Deliberately scoped: the Hyperdrive website is untouched. */
.living-eagle{--bird-width:218px;width:var(--bird-width);filter:drop-shadow(0 9px 14px #0005);will-change:transform;left:0!important;top:0!important;touch-action:auto;z-index:100;--bank:0deg;--bob:0px;--scale:1}
.living-eagle .pet-character{width:100%;margin:0;aspect-ratio:828/845;transform:translateY(var(--bob)) rotate(var(--bank)) scale(var(--scale));transform-origin:50% 78%;outline-offset:2px;isolation:isolate}
.living-eagle .pet-rest{animation:pet-breathe 4.8s ease-in-out infinite!important;filter:none;visibility:visible!important}
.living-eagle.rig-ready[data-frame-verified="true"] .pet-rest{opacity:0}
.pet-rig{position:absolute;inset:-5%;width:110%;height:110%;pointer-events:none;opacity:0}
.rig-ready[data-frame-verified="true"] .pet-rig{opacity:1}
.living-eagle[data-activity="scratch"] .pet-character{cursor:grabbing}
.living-eagle[data-activity="drag"] .pet-character{cursor:grabbing}
.pet-floor{position:absolute;width:65%;height:12px;left:18%;top:calc(var(--bird-width) * .95);border-radius:50%;background:#0007;filter:blur(7px);opacity:.5;pointer-events:none;transition:opacity .2s}
.living-eagle[data-activity="fly"] .pet-floor,.living-eagle[data-activity="drag"] .pet-floor{opacity:0}
.living-eagle .pet-caption{position:relative;margin:1px auto 5px;padding:6px 9px;gap:6px;white-space:nowrap}
.living-eagle .pet-caption b{font-size:9px}.living-eagle .pet-caption>span:last-child{font-size:9px}
.living-eagle .pet-controls{position:static;display:flex;flex-direction:row;width:100%;gap:4px;margin:7px 0 0;justify-content:center;left:auto;right:auto;top:auto}
.living-eagle .pet-controls button{padding:8px 10px;font-size:10px;min-height:36px;min-width:36px;white-space:nowrap;transition:background .16s,border-color .16s;touch-action:manipulation}
.living-eagle .pet-controls #petMinimize{padding:8px 10px}
.living-eagle .pet-controls button[aria-expanded="true"]{border-color:#37d8ff80;background:#153747;color:#9de9ff}
.pet-tip{font-size:9px;color:#c2d6ef;text-align:center;margin:6px auto 0;letter-spacing:.01em;text-shadow:0 1px 4px #000,0 1px 8px #000;opacity:.85;pointer-events:none}
.living-eagle .pet-bubble{position:fixed;inset:auto;left:0;top:0;width:248px;max-width:calc(100vw - 24px);background:linear-gradient(140deg,#132e46f5,#081426fa);border:1px solid #56d5ff66;color:#edf7ff;padding:12px 14px;border-radius:15px;box-shadow:0 10px 40px #0006;font-size:12px;line-height:1.5;font-weight:550;animation:bubble-in .18s ease-out;transform:none;z-index:2}
.living-eagle .pet-bubble:before{content:'PFEAGLE';display:block;color:#82e2ff;font-size:8px;font-weight:850;letter-spacing:.16em;margin-bottom:5px}
.living-eagle .pet-bubble.below{bottom:auto;top:0}
.living-eagle .pet-hearts{z-index:3}
.living-eagle .pet-heart{font-size:22px;animation:living-particle 1.25s ease-out both;z-index:2}
.pet-sleep{position:absolute;top:2%;right:-3%;width:40%;height:50%;pointer-events:none;display:none}
.pet-sleep i{position:absolute;font-style:normal;color:#a6d5ff;opacity:0;font-size:17px;font-weight:800;text-shadow:0 0 14px #37d8ff88;animation:living-sleep 3.6s linear infinite}
.pet-sleep i:nth-child(2){animation-delay:1.2s}.pet-sleep i:nth-child(3){animation-delay:2.4s;font-size:24px}
[data-activity="nap"] .pet-sleep{display:block}
.pet-steam{position:absolute;left:32%;top:40%;height:25%;width:22%;pointer-events:none;opacity:0;transition:opacity .3s}
.pet-steam i{position:absolute;left:10%;bottom:0;width:7px;height:22px;border-left:2px solid #eef6ff99;border-radius:50%;filter:blur(1px);animation:living-steam 2s ease-in-out infinite}
.pet-steam i:nth-child(2){left:50%;animation-delay:.5s}.pet-steam i:nth-child(3){left:80%;animation-delay:1s}
[data-activity="coffee"] .pet-steam{opacity:1}
.pet-scratch-glow{position:absolute;left:50%;top:7%;width:38%;height:28%;border-radius:50%;background:radial-gradient(ellipse,#7adfff22,transparent 70%);opacity:0;pointer-events:none;transition:opacity .2s}
[data-activity="scratch"] .pet-scratch-glow{opacity:1}
/* The panel is nonmodal so the original eagle remains directly pettable beside it. */
.pet-console{width:392px;right:18px;bottom:18px;max-height:min(710px,calc(100dvh - 32px));background:linear-gradient(145deg,#102638fa,#060f1afa 70%);backdrop-filter:blur(20px);border:1px solid #58b9f447;box-shadow:0 25px 85px #0009;border-radius:22px;z-index:115;max-width:calc(100vw - 24px)}
.pet-console .pet-chat-head{padding:18px 18px 12px}.pet-console .pet-chat-head h2{font-size:18px;line-height:1.2;font-weight:800}.pet-console .pet-chat-head button{width:38px;height:38px;min-height:38px}
.pet-console-status{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 18px 14px;font-size:10px;color:#a8bed8}.pet-console-status>span:first-child{display:flex;align-items:center;gap:6px;min-width:0}.pet-console-status i{display:block;width:5px;height:5px;border-radius:50%;background:#53e4b0;flex:none}.pet-console-status>span:last-child{font-size:9px;color:#a4e7ff;white-space:nowrap}
.pet-tabs{display:flex;margin:0 14px 8px;padding:4px;gap:4px;border-radius:12px;background:#030a1699;border:1px solid #ffffff0c;flex:none}
.pet-tabs button{flex:1;border:0;background:transparent;color:#9db5d0;border-radius:8px;padding:10px 5px;min-height:38px;font-size:11px;font-weight:750;cursor:pointer}.pet-tabs button[aria-selected="true"]{color:#cdf4ff;background:#2c9dcc25;box-shadow:inset 0 0 0 1px #71ccf323}
.pet-tab-view{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#355a75 transparent}
.pet-talk-view{display:flex;flex-direction:column;flex:1;overflow:hidden}
.pet-console .pet-chat-disclosure{font-size:10px;padding:4px 18px 11px;line-height:1.55}
.pet-console .pet-chat-log{min-height:90px;max-height:none;height:225px;flex:1 1 225px;padding:14px 16px;scrollbar-width:thin;scrollbar-color:#345873 transparent}
.pet-console .pet-line{font-size:12px;line-height:1.65;padding:11px 12px;max-width:94%}.pet-console .pet-line.eagle{background:linear-gradient(120deg,#162b3d66,#0a182788)}.pet-console .pet-line.user{background:#167bd324;border-color:#45b9ff29}.pet-console .pet-line.event{color:#a5cfdb;align-self:center;font-size:10px;max-width:100%;text-align:center;border:none;background:none;padding:1px 4px;font-style:italic}
.pet-thinking{display:flex;align-items:center;gap:4px;color:#a7bdd5;font-size:9px;padding:0 18px 10px;min-height:24px}
.pet-thinking span{display:inline-block;width:3px;height:3px;background:#7edbff;border-radius:50%;animation:living-think 1s ease-in-out infinite}.pet-thinking span:nth-child(2){animation-delay:.15s}.pet-thinking span:nth-child(3){animation-delay:.3s;margin-right:4px}
.pet-console .pet-chat-form{flex:none}.pet-console .pet-chat-form input{height:45px;font-size:13px}.pet-console .pet-chat-form button{min-width:38px}
.pet-console .pet-chat-tools button{min-height:32px}.pet-console .pet-voice-note{font-size:9px;line-height:1.55;margin:4px 18px 14px}.pet-console .pet-quick{padding-bottom:10px;gap:5px;flex:none}
.pet-console .pet-quick button{font-size:10px;min-height:32px;padding:7px 10px}
.pet-care-view,.pet-settings-view{padding:6px 16px 16px}
.pet-needs{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:9px 0}.pet-needs span{display:flex;justify-content:space-between;color:#adbed1;font-size:10px;margin-bottom:7px}.pet-needs b{color:#dceeff;font-weight:750}.pet-needs meter{width:100%;height:6px;display:block;background:#1d3449;border:0;border-radius:9px}.pet-needs meter::-webkit-meter-bar{border:0;background:#1d3449;height:6px}.pet-needs meter::-webkit-meter-optimum-value{background:linear-gradient(90deg,#46c6ed,#70edc3);border-radius:8px}.pet-needs meter::-moz-meter-bar{background:#65dfbe}
.pet-care-note{font-size:10px;color:#a9bed5;line-height:1.6;margin:7px 0 14px}
.pet-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pet-action-grid button{position:relative;padding:13px 10px 12px 43px;text-align:left;color:#e5f2ff;border:1px solid #83c1ee20;border-radius:13px;background:#1c3e581c;cursor:pointer;min-height:66px;transition:background .15s,border-color .15s,transform .15s}
.pet-action-grid button:hover{background:#25516b44;border-color:#8bdfff5e;transform:translateY(-1px)}.pet-action-grid button:active{transform:scale(.97)}.pet-action-grid button>span{position:absolute;left:14px;top:17px;font-size:21px;color:#94e6ff}.pet-action-grid b{font-size:11px;display:block}.pet-action-grid small{font-size:9px;color:#9db2ca;display:block;line-height:1.4;margin-top:4px}
.pet-mode-row{display:flex;gap:7px;margin-top:12px}.pet-mode-row button{flex:1;border:1px solid #6da6ce33;border-radius:9px;background:#091726;color:#afc2d8;font-size:10px;min-height:38px;padding:9px 6px;cursor:pointer}.pet-mode-row button[aria-pressed="true"]{background:#29cbd71c;color:#a6f0ea;border-color:#45dfd566}
.pet-bond-summary{border-top:1px solid #ffffff0d;padding-top:12px;display:flex;justify-content:space-between;gap:12px;color:#86a1bd;font-size:10px;font-variant-numeric:tabular-nums}
.pet-setting{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid #ffffff10}.pet-setting b{display:block;font-size:12px;color:#e7f1ff}.pet-setting small{display:block;font-size:10px;color:#96acc6;margin-top:5px;line-height:1.5}.pet-setting button,.pet-setting select{background:#0d2236;color:#cdeaff;border:1px solid #84c9f333;border-radius:9px;padding:9px 11px;min-height:38px;font-size:11px;cursor:pointer;flex:none}.pet-setting button[aria-pressed="true"]{border-color:#5ce7c799;color:#85ebd1}.pet-setting input[type="range"]{width:95px;accent-color:#70deee;min-height:32px}.pet-settings-note{font-size:10px;line-height:1.7;color:#9bafc6;margin:15px 0 0}.pet-settings-link{border:0;border-bottom:1px dotted #7acbeb55;color:#9ee6ff;background:none;font-size:11px;padding:6px 0;margin-top:10px;cursor:pointer}
.living-eagle.is-listening .pet-mood-dot{background:#54ccff;box-shadow:0 0 9px #38baff}.living-eagle.is-speaking .pet-mood-dot{background:#8ce5f4;box-shadow:0 0 10px #38eaff}
.living-eagle.gentle .pet-rest,.living-eagle.gentle .pet-sleep i,.living-eagle.gentle .pet-steam i{animation:none!important}.living-eagle.gentle .pet-sleep i{opacity:.75;transform:translate(10px,-10px)}.living-eagle.gentle .pet-sleep i:nth-child(2),.living-eagle.gentle .pet-sleep i:nth-child(3){display:none}
@keyframes living-particle{0%{opacity:0;transform:translate(0,0) scale(.5)}12%{opacity:1}100%{opacity:0;transform:translate(var(--dx),-100px) rotate(var(--tilt)) scale(1.15)}}
@keyframes living-sleep{0%{opacity:0;transform:translate(0,12px) scale(.6)}20%{opacity:.9}100%{opacity:0;transform:translate(32px,-65px) scale(1.3)}}
@keyframes living-steam{0%{transform:translate(0,0);opacity:0}25%{opacity:.7}100%{transform:translate(6px,-40px);opacity:0}}
@keyframes living-think{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-3px);opacity:1}}
@media(max-width:1100px){.living-eagle{--bird-width:192px}}
@media(max-width:700px){
  .living-eagle{--bird-width:158px}.living-eagle .pet-character{width:100%}.living-eagle .pet-caption{padding:5px 7px;gap:4px}.living-eagle .pet-caption b,.living-eagle .pet-caption>span:last-child{font-size:8px}
  .living-eagle .pet-controls{gap:3px}.living-eagle .pet-controls button,.living-eagle .pet-controls #petMinimize{font-size:9px;padding:7px 7px;min-height:36px;min-width:28px}.pet-tip{font-size:8px}
  .pet-console{right:12px;bottom:max(10px,env(safe-area-inset-bottom));width:calc(100% - 24px);max-height:58dvh;border-radius:20px}
  .pet-console .pet-chat-head{padding:12px 14px 9px}.pet-console .pet-chat-head h2{font-size:16px;margin-top:5px}.pet-console .pet-chat-head .mini-title{font-size:7px}.pet-console-status{padding:0 14px 9px;font-size:9px}.pet-console-status>span:last-child{font-size:8px}
  .pet-tabs{margin:0 10px 5px;padding:3px}.pet-tabs button{min-height:34px;padding:8px 4px;font-size:10px}
  .pet-console .pet-chat-disclosure{padding:4px 14px 7px;font-size:9px}.pet-console .pet-chat-log{padding:10px 12px;flex:1 1 200px;min-height:65px;height:160px}.pet-console .pet-line{font-size:11px;padding:8px 10px}.pet-console .pet-quick{padding:3px 12px 7px}.pet-console .pet-quick button{font-size:9px;padding:6px 8px;min-height:30px}
  .pet-console .pet-chat-form{margin:0 10px 5px}.pet-console .pet-chat-form input{font-size:16px;height:41px;padding:10px}.pet-console .pet-chat-form input::placeholder{font-size:11px}
  .pet-console .pet-chat-tools{padding-inline:10px}.pet-console .pet-chat-tools button{min-height:29px;font-size:9px;padding-block:4px}.pet-console .pet-voice-note{margin:2px 14px 9px;font-size:8px}
  .pet-care-view,.pet-settings-view{padding:4px 12px 12px}.pet-care-note{font-size:9px;margin:4px 0 10px}.pet-action-grid{gap:6px}.pet-action-grid button{min-height:60px;padding:11px 9px 9px 40px}.pet-action-grid b{font-size:10px}.pet-action-grid small{font-size:8px}.pet-action-grid button>span{left:12px;font-size:19px;top:15px}.pet-needs{padding:7px 0}.pet-needs span{font-size:9px}.pet-mode-row{margin-top:9px}
  .living-eagle.panel-perch{--bird-width:123px!important;z-index:116}.living-eagle.panel-perch .pet-tip{display:none}.living-eagle.panel-perch .pet-caption{max-width:160px}.living-eagle.panel-perch .pet-controls{display:none}.living-eagle.panel-perch .pet-care-track{margin-top:4px}
}
@media(max-height:600px) and (min-width:701px){.pet-console{max-height:calc(100dvh - 20px);bottom:10px}.pet-console .pet-chat-head{padding:12px 16px 8px}.pet-console .pet-chat-log{flex-basis:120px;height:120px}.pet-console .pet-voice-note{margin-bottom:9px}}
@media(max-height:490px) and (max-width:700px){.pet-console{width:min(360px,calc(100vw - 156px));max-height:calc(100dvh - 16px);bottom:8px;right:8px}.pet-console-status{display:none}.pet-console .pet-chat-disclosure{font-size:8px}.pet-console .pet-chat-log{min-height:45px}.pet-console .pet-quick{display:none}.pet-console .pet-voice-note{font-size:8px}.living-eagle.panel-perch{--bird-width:110px!important}}
@media(prefers-reduced-motion:reduce){.living-eagle{will-change:auto}.living-eagle .pet-rig{transition:none}.pet-thinking span{animation:none!important;opacity:.8}.pet-sleep i{animation:none!important;opacity:.8}.pet-sleep i:nth-child(n+2){display:none}.pet-action-grid button:hover{transform:none}}

/* Small screens keep the same compact perch as V12, with controls beside the bird. */
@media(max-width:700px){
  .living-eagle:not(.panel-perch) .pet-character{width:calc(var(--bird-width) - 28px);margin-inline:auto}
  .living-eagle:not(.panel-perch) .pet-controls{position:absolute;right:calc(100% + 2px);left:auto;top:7px;width:58px;flex-direction:column;gap:4px;margin:0}
  .living-eagle:not(.panel-perch).controls-right .pet-controls{left:calc(100% + 2px);right:auto}
  .living-eagle:not(.panel-perch) .pet-controls button{min-height:36px}
  .living-eagle.panel-perch .pet-character{width:100%;margin:0}
  .living-eagle .pet-floor{top:calc(var(--bird-width) * .8)}
}
.living-eagle .pet-expression,.living-eagle .pet-blink,.living-eagle .pet-mouth{position:absolute;inset:0;pointer-events:none;object-fit:contain;transition:none}
.living-eagle .pet-expression{opacity:var(--joy)}.living-eagle .pet-blink{opacity:var(--blink,0)}.living-eagle .pet-mouth{opacity:var(--mouth,0)}
.pet-fallback-flight{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:none;pointer-events:none}
.living-eagle:not(.rig-ready):not(.gentle)[data-activity="fly"] .pet-rest,.living-eagle:not(.rig-ready):not(.gentle)[data-activity="drag"] .pet-rest{visibility:hidden!important}
.living-eagle:not(.rig-ready):not(.gentle)[data-activity="fly"] .pet-fallback-flight,.living-eagle:not(.rig-ready):not(.gentle)[data-activity="drag"] .pet-fallback-flight{display:block;animation:pet-fly .35s ease-in-out infinite alternate}
/* Accessible focus follows the feather silhouette, never an avatar-style rectangle. */
.living-eagle .pet-character:focus-visible{outline:0;filter:drop-shadow(0 0 3px #85eaff) drop-shadow(0 0 7px #32c8ff66)}

/* A real, free-standing PNG remains visible when scripts, WebGL, or enhancement assets fail. */
.living-eagle:not([data-companion-ready]){left:auto!important;top:auto!important;right:16px;bottom:16px;transform:none!important;}
.living-eagle:not([data-companion-ready]) .pet-controls,
.living-eagle:not([data-companion-ready]) .pet-tip{display:none;}
.living-eagle[data-companion-ready]{right:auto;bottom:auto;}
.living-eagle .pet-rest>img:first-child{visibility:visible;opacity:1;}
.living-eagle .pet-rig{display:block;max-width:none;}
/* If the flight enhancement has not loaded, keep the approved portrait rather than hiding it. */
.living-eagle:not(.rig-ready):not(.flight-art-ready)[data-activity="fly"] .pet-rest,
.living-eagle:not(.rig-ready):not(.flight-art-ready)[data-activity="drag"] .pet-rest{visibility:visible!important;}
.living-eagle:not(.rig-ready):not(.flight-art-ready) .pet-fallback-flight{display:none!important;}

/* V15: native SVG bones replace the GPU image-warp and the permanent happy-eye mask. */
.living-eagle .pet-rig{inset:-5.7%;width:111.4%;height:111.4%;overflow:visible;pointer-events:none}
.living-eagle .pet-rig svg{display:block;width:100%;height:100%;overflow:visible;pointer-events:none}
.living-eagle[data-companion-ready] .pet-rest{animation:none!important;transition:none!important;transform-origin:63% 45%}
.living-eagle .pet-expression,.living-eagle .pet-blink,.living-eagle .pet-mouth{display:none!important}
.living-eagle:not(.rig-ready) .pet-rest{visibility:visible!important;opacity:1!important}
.living-eagle.rig-ready .pet-rest{opacity:0!important}
.living-eagle .pet-fallback-flight{display:none!important}
.pet-animation-health{padding:12px 0;border-top:1px solid #ffffff12;margin-top:14px;display:flex;flex-direction:column;align-items:flex-start;gap:9px;color:#a9bdd2;font-size:10px;line-height:1.6}
.pet-animation-health button{padding:8px 11px;border:1px solid #73d5f13a;border-radius:9px;color:#a7edff;background:#0a2536;min-height:36px;cursor:pointer;font:inherit}
.pet-action-grid button{min-height:68px}
.living-eagle .pet-caption{min-height:26px}
.living-eagle[data-motion="full"] .pet-heart{display:block!important;animation:living-particle 1.25s ease-out both!important}
.living-eagle[data-motion="full"] .pet-sleep i{animation:living-sleep 3.6s linear infinite!important}
.living-eagle[data-motion="full"] .pet-sleep i:nth-child(2){animation-delay:1.2s!important}
.living-eagle[data-motion="full"] .pet-sleep i:nth-child(3){animation-delay:2.4s!important}
.living-eagle[data-motion="full"] .pet-steam i{animation:living-steam 2s ease-in-out infinite!important}
/* Avoid a floating steam effect being left behind when the original cup moves to his beak. */
.living-eagle.rig-ready[data-activity="coffee"] .pet-steam{left:53%;top:19%}
.living-eagle.gentle .pet-rest{animation:none!important}
@media(max-width:700px){.pet-setting select{max-width:130px}.pet-action-grid button{min-height:61px}.pet-animation-health{font-size:9px}}
