#companion{background:linear-gradient(90deg,#132e3540,#12252e18),url('companion-garden-2026.webp') center/cover fixed!important;color:#fff6df;isolation:isolate;min-height:100svh}
#companion .pc-shell{position:relative;z-index:2;max-width:1100px;margin:auto;padding:75px 28px 110px}
#companion button{color:inherit;cursor:pointer;font:inherit}
.pc-header,.pc-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;font:12px system-ui}
#companion .pc-header button,#companion .pc-footer button{background:#15373a85;border:1px solid #fff6d573;border-radius:30px;padding:11px 16px;min-height:44px}
.pc-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:65px;align-items:center;min-height:650px}
.pc-friend{text-align:center;max-width:430px}.pc-story{padding:24px;background:linear-gradient(120deg,#1635398c,#16353930);border-radius:32px;text-shadow:0 2px 10px #123}
.pc-story h1{font:500 clamp(36px,5vw,64px)/1.03 Georgia,serif;margin:12px 0 20px;color:#fff4d5}.pc-story p{line-height:1.6}.pc-eyebrow{font:11px system-ui;letter-spacing:.2em;color:#ffe3a8}
#companion .pc-portrait{display:block;position:relative;width:290px;height:320px;margin:15px auto;border:1px solid #fff6d589;border-radius:48% 48% 30% 30%;background-color:#e3efdd30;box-shadow:inset 0 2px 18px #fff5,0 20px 45px #1235;overflow:hidden;padding:0}
.pc-pet-breath,.pc-pet-pose{position:absolute;inset:0;transform-origin:50% 90%}.pc-pet-open,.pc-pet-blink,.pc-tile-image{background-image:url('companion-pets-2026.webp');background-size:var(--pet-size);background-position:var(--pet-position);background-repeat:no-repeat;aspect-ratio:var(--pet-ratio)}
.pc-pet-open,.pc-pet-blink{position:absolute;bottom:15px;left:0;width:100%}.pc-pet-blink{background-image:url('companion-pets-blink-2026.webp');opacity:0;mask-image:radial-gradient(ellipse 10% 6% at var(--eye-a),#000 65%,transparent),radial-gradient(ellipse 10% 6% at var(--eye-b),#000 65%,transparent)}
.pc-tap-hint{position:absolute;bottom:7px;left:0;right:0;font:10px system-ui;text-shadow:0 1px 5px #123}.pc-friend h2{font:28px Georgia;margin:12px 0 5px}.pc-friend p{font:12px/1.6 system-ui;margin:5px 0}.pc-interactions{display:flex;justify-content:center;gap:10px;margin:14px 0}
#companion .pc-interactions button{display:grid;justify-items:center;gap:3px;min-width:68px;padding:7px 9px;background:linear-gradient(135deg,#fff9d938,#bbebef20);border:1px solid #f8dea982;border-radius:21px;box-shadow:inset 0 2px #fff6,0 7px 15px #1233;font:11px system-ui;backdrop-filter:blur(6px)}
.pc-interactions svg{width:43px;height:43px}.pc-story svg{width:42px;height:42px;flex-shrink:0}
#companion .pc-choose,#companion .pc-preferences{display:flex;align-items:center;gap:12px;width:100%;max-width:310px;margin:12px 0;padding:8px 16px;background:linear-gradient(130deg,#fff5d43d,#bee6e525);border:1px solid #ffedb78c;border-radius:21px;box-shadow:inset 0 2px #fff6;backdrop-filter:blur(8px);font:14px system-ui;text-align:left}.pc-save-state{font:11px system-ui;color:#ffe3aa}
#companion .pc-editor[hidden],#companion [data-pc-pane][hidden],#companion .pc-confirm[hidden]{display:none!important}
.pc-editor{position:fixed;z-index:100;bottom:12px;left:50%;transform:translateX(-50%);width:min(830px,calc(100% - 24px));max-height:85svh;display:flex;flex-direction:column;border:1px solid #ffe9bb9c;border-radius:30px;background:linear-gradient(145deg,#21434bf7,#182f39fa);box-shadow:0 0 0 100vmax #071a2669,0 20px 70px #07151e88;overflow:hidden;color:#fff3d7}
.pc-editor-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px 9px}.pc-editor-head h2{font:26px Georgia;margin:5px 0}.pc-editor-head span{font:10px system-ui;letter-spacing:.15em}.pc-tabs{display:flex;gap:8px;padding:8px 20px}.pc-editor-body{overflow:auto;padding:8px 22px 18px}.pc-editor-footer{display:flex;gap:8px;flex-wrap:wrap;padding:12px 20px;border-top:1px solid #ffe8b83b}
#companion .pc-editor button{min-height:44px;border:1px solid #f4dfaf65;border-radius:15px;background:#d8edf316;padding:9px 12px;font:12px system-ui}#companion .pc-editor button.active,#companion .pc-editor button.primary{background:linear-gradient(135deg,#fce3a5,#cda257);color:#23363b}
#companion .companion-builder{display:block;background:none;padding:0;border:0;box-shadow:none}#companion .companion-picture-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}#companion .companion-picture{position:relative;height:160px;background:#c4e0d419!important;overflow:hidden;padding:0!important}#companion .companion-picture span{position:absolute;bottom:0;left:0;right:0;background:#17343dc9;font:11px system-ui;padding:5px}.pc-tile-image{width:100%;max-height:145px;margin:auto}
#companion .companion-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}#companion input,#companion select{box-sizing:border-box;width:100%;min-height:44px;background:#102d37;color:#fff6e4;border:1px solid #eddaa97d;border-radius:10px;padding:9px}#companion label{font:12px/1.7 system-ui}#companion .companion-choice-row{display:flex;flex-wrap:wrap;gap:7px}#companion .companion-field-group{margin:10px 0 20px}#companion :focus-visible{outline:3px solid #ffe5a1;outline-offset:3px}
#companion:not(.pc-motion-off) .pc-pet-breath{animation:pcBreath var(--breath,6s) ease-in-out infinite alternate!important}#companion:not(.pc-motion-off) .pc-pet-blink{animation:pcBlink 7s linear infinite!important}#companion:not(.pc-motion-off) .pc-pet-pose.pc-action{animation:pcGreet 1.6s ease-in-out!important}#companion.pc-motion-off .pc-pet-blink{opacity:0!important}#companion.pc-custom-photo .pc-pet-breath{display:none}
@keyframes pcBreath{from{transform:scale(1) rotate(-.3deg)}to{transform:scale(1.008,1.012) rotate(.3deg)}}@keyframes pcBlink{0%,44%,48%,100%{opacity:0}45%,47%{opacity:1}}@keyframes pcGreet{0%,100%{transform:rotate(0)}40%{transform:rotate(var(--pose,2deg)) translateY(-3px)}70%{transform:rotate(-1deg)}}
@media(max-width:650px){#companion{background-position:65% center!important}#companion .pc-shell{padding:70px 15px 20px}.pc-header span{display:none}.pc-layout{grid-template-columns:1fr;gap:8px;min-height:0}.pc-friend{margin:auto;width:100%}#companion .pc-portrait{width:210px;height:230px;margin:16px auto 8px}.pc-friend h2{font-size:23px}.pc-story{padding:16px 20px;margin:7px 0 20px}.pc-story h1{font-size:33px;margin:6px 0}.pc-story h1 br{display:none}.pc-story>p:not(.pc-eyebrow){font-size:12px;margin:6px 0}.pc-story>p br{display:none}#companion .pc-choose,#companion .pc-preferences{display:inline-flex;width:calc(50% - 5px);padding:8px;font-size:11px;gap:4px;margin:7px 0}.pc-story svg{width:29px;height:29px}.pc-save-state{display:block}.pc-footer{font-size:10px}.pc-editor-head h2{font-size:21px}#companion .companion-picture{height:125px}#companion .companion-fields{grid-template-columns:1fr}.pc-editor-footer button{flex:1}.pc-interactions{margin:9px 0}.pc-editor-body{padding:8px 14px}.pc-tile-image{max-height:110px}}

#companion label:has(#companionAppearance){display:none!important}
#companion .pc-care{display:flex;justify-content:center;gap:10px;margin:8px 0}
#companion .pc-care button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:5px 17px;background:linear-gradient(135deg,#fff6d940,#bee9f02e);border:1px solid #f7dfa887;border-radius:18px;box-shadow:inset 0 2px #fff6;backdrop-filter:blur(6px);font:12px system-ui}
.pc-care svg{width:36px;height:36px}#companion .pc-care-note{font-size:10px;max-width:340px;margin:8px auto;color:#fff3d6;text-shadow:0 1px 4px #123}
#companion .pc-pet-open,#companion .pc-pet-blink{left:5%;width:90%;bottom:20px}
#companion .pc-portrait:after{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);font-size:23px;opacity:0;pointer-events:none}
#companion .pc-portrait.pc-fed:after{content:'♡';animation:pcCare 1.8s ease-out both}#companion .pc-portrait.pc-watered:after{content:'✧';animation:pcCare 1.8s ease-out both}
#companion.pc-motion-off .pc-portrait:after{animation:none!important;opacity:0}
@keyframes pcCare{0%{opacity:0;transform:translate(-50%,0)}25%{opacity:1}100%{opacity:0;transform:translate(-50%,-40px)}}
@media(max-width:650px){#companion .pc-shell{padding-bottom:120px}.pc-layout{gap:10px}#companion .pc-care-note{font-size:10px}}

/* Keep companion actions within narrow phone screens. */
@media(max-width:650px){#companion .pc-layout{grid-template-columns:minmax(0,1fr)}#companion .pc-interactions{flex-wrap:wrap}}
