/* C scene spacing stays responsive; controls retain readable, stable sizes. */
#liveScreen:has(.home-pet-header) { --home-u:1px; --home-left:0px; --home-inner-left:0px; --home-top:0px; --home-bottom:0px; --home-frame-width:390px; }
.home-pet-header {
  --home-create-width:100px;
  position:absolute; z-index:16;
  top:calc(var(--home-top) + max(21 * var(--home-u),var(--status-height)));
  left:calc(var(--home-left) + 14 * var(--home-u));
  width:calc(var(--home-frame-width) - 28 * var(--home-u)); height:48px;
  display:grid; grid-template-columns:minmax(0,212px) var(--home-create-width) minmax(44px,1fr);
  align-items:center; gap:8px;
}
.home-pet-header[hidden], .home-pet-guide[hidden] { display:none; }
.home-pet-header .live-role-trigger {
  position:relative; inset:auto; width:100%; max-width:212px; min-height:48px; height:100%;
  grid-template-columns:36px minmax(0,1fr) 12px;
  gap:7px; padding:4px 9px 4px 5px;
}
.home-pet-header .live-role-trigger__avatar { width:36px; height:36px; }
.home-pet-header .live-role-trigger > svg { width:12px; height:12px; }
.home-pet-header .live-role-trigger__copy { gap:7px; }
.home-pet-header .live-role-trigger__copy strong { font-size:14px; }
.home-pet-header .live-role-trigger__copy small[data-kind] { font-size:12px; line-height:1.35; padding:4px 7px; gap:5px; }
.home-pet-header .live-role-trigger__copy small[data-kind] svg { width:16px; height:16px; flex-basis:16px; }
.home-pet-header .share-button { position:relative; inset:auto; justify-self:end; width:44px; height:44px; min-height:44px; }
.home-create-pet {
  position:relative; isolation:isolate; display:flex; align-items:center; justify-content:center; gap:5px;
  height:44px; min-width:0; padding:0 8px; border:0; border-radius:999px;
  background:transparent; color:#35683d; font-family:inherit; font-size:13px; font-weight:650; line-height:1.2; white-space:nowrap; cursor:pointer;
}
.home-create-pet::before { content:""; position:absolute; z-index:-1; inset:0; width:100%; height:44px; border:1px solid #9db699; border-radius:999px; background:#e7f2e3; box-shadow:0 4px 14px #24150e14; pointer-events:none; }
.home-create-pet svg { width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; }
.home-create-pet:hover::before { background:#dcebd6; }
.home-create-pet:focus-visible, .home-pet-guide__close:focus-visible { outline:3px solid #fff9f0; outline-offset:3px; box-shadow:0 0 0 5px #35683d; }
.home-pet-guide {
  position:absolute; grid-column:2 / 3; right:calc(-28 * var(--home-u)); top:max(56px,calc(59.5 * var(--home-u))); width:calc(231 * var(--home-u)); min-height:calc(68 * var(--home-u));
  padding:calc(12 * var(--home-u)) calc(36 * var(--home-u)) calc(12 * var(--home-u)) calc(18 * var(--home-u));
  border:1px solid #dacbba; border-radius:calc(18 * var(--home-u)); background:#fff9f0; color:#49362d; box-shadow:0 8px 24px #24150e24; text-shadow:none;
}
.home-pet-guide::before { content:""; position:absolute; right:calc(19.5 * var(--home-u) + var(--home-create-width) / 2); top:calc(-8.5 * var(--home-u)); width:calc(17 * var(--home-u)); height:calc(17 * var(--home-u)); background:#fff9f0; border-left:1px solid #dacbba; border-top:1px solid #dacbba; transform:rotate(45deg); }
.home-pet-guide strong { display:block; font-size:max(12px,14 * var(--home-u)); font-weight:700; line-height:calc(20 * var(--home-u)); letter-spacing:calc(-.45 * var(--home-u)); }
.home-pet-guide p { margin:calc(5 * var(--home-u)) 0 0; color:#736157; font-size:max(11px,11.5 * var(--home-u)); line-height:calc(17 * var(--home-u)); }
.home-pet-guide__close { position:absolute; top:calc(-5 * var(--home-u)); right:calc(-5 * var(--home-u)); display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:50%; background:transparent; color:#9b8274; font:calc(20 * var(--home-u))/1 sans-serif; cursor:pointer; }
#liveScreen:has(.live-role-trigger.is-open) .home-pet-guide { visibility:hidden; pointer-events:none; }

.share-visitor-invite {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: calc(100% + 126px);
  display: flex;
  align-items: center;
  gap: 9px;
  box-sizing: border-box;
  width: calc(100% - 68px);
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid #f8d6af;
  border-radius: 20px;
  color: #4b3025;
  background: #fff7e9;
  box-shadow: 0 8px 30px #2e21163b;
  font: 14px system-ui, sans-serif;
  text-decoration: none;
  transition: width .32s ease, min-height .32s ease, border-radius .32s ease;
}
.share-visitor-invite[hidden] { display: none; }
.share-visitor-invite[data-state="full"] { animation: share-visitor-invite-in .32s ease-out both; }
.share-visitor-invite:focus-visible { outline: 2px solid #803c31; outline-offset: 2px; }
.share-visitor-invite img { width: 33px; height: 33px; flex: none; border: 1px solid #ebc5a1; border-radius: 50%; object-fit: cover; background: #fff; }
.share-visitor-invite__copy { display: grid; flex: 1; min-width: 0; gap: 2px; }
.share-visitor-invite__copy strong { font-size: 14px; font-weight: 760; }
.share-visitor-invite__copy small { font-size: 11px; color: #735748; }
.share-visitor-invite__start {
  display: grid;
  place-items: center;
  flex: none;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 999px;
  color: #fff7e9;
  background: #944639;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.share-visitor-invite__compact { display: none; font-size: 13px; font-weight: 750; white-space: nowrap; }
.share-visitor-invite__compact::after { content: " ›"; color: #944639; }
.share-visitor-invite[data-state="compact"] { width: min(169px, calc(100% - 68px)); min-height: 46px; padding-block: 5px; border-radius: 999px; }
.share-visitor-invite[data-state="compact"] :is(.share-visitor-invite__copy, .share-visitor-invite__start) { display: none; }
.share-visitor-invite[data-state="compact"] .share-visitor-invite__compact { display: block; }
#liveScreen:has(.live-role-trigger.is-open) .share-visitor-invite { visibility: hidden; }
@keyframes share-visitor-invite-in {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (max-width: 360px), (orientation: landscape) and (max-height: 450px) {
  .share-visitor-invite { gap: 6px; padding-inline: 8px; }
  .share-visitor-invite__start { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .share-visitor-invite { transition: none; }
  .share-visitor-invite[data-state="full"] { animation: none; }
}

#liveScreen:has(.home-pet-header) .live-role-popover { left:calc(var(--home-left) + 14 * var(--home-u)); right:auto; top:calc(var(--home-top) + max(21 * var(--home-u),var(--status-height)) + 56px); width:min(calc(308 * var(--home-u)),calc(var(--home-frame-width) - 28 * var(--home-u))); }
#liveScreen:has(.home-pet-header) .live-actions { left:calc(var(--home-left) + 14 * var(--home-u)); right:auto; width:calc(var(--home-frame-width) - 25 * var(--home-u)); bottom:calc(var(--home-bottom) + 16 * var(--home-u) + env(safe-area-inset-bottom)); }
#liveScreen:has(.home-pet-header) .primary-actions { grid-template-columns:minmax(0,1fr) 58px; align-items:start; gap:10px; }
#liveScreen:has(.home-pet-header) .chat-entry { height:54px; padding:0 17px; gap:9px; font-size:15px; }
#liveScreen:has(.home-pet-header) .camera-entry { width:56px; height:56px; }
#liveScreen:has(.home-pet-header) .camera-entry svg { width:23px; height:23px; }
#liveScreen:has(.home-pet-header) .scene-context { left:calc(var(--home-inner-left) + 14 * var(--home-u)); right:auto; width:calc(var(--home-frame-width) - 28 * var(--home-u)); bottom:calc(42 * var(--home-u) + 84px + env(safe-area-inset-bottom)); height:48px; gap:4px; }
#liveScreen:has(.home-pet-header) .scene-context__event { font-size:13px; }
#liveScreen:has(.home-pet-header) .scene-context__chip { padding:3px 8px; font-size:10px; }
#liveScreen:has(.home-pet-header) .side-rail { left:calc(var(--home-left) + var(--home-frame-width) - 58px - 11 * var(--home-u)); right:auto; top:auto; bottom:max(calc(var(--home-bottom) + 192 * var(--home-u) + env(safe-area-inset-bottom)),calc(var(--home-bottom) + 42 * var(--home-u) + 84px + env(safe-area-inset-bottom))); width:58px; gap:16px; transform:none; }
#liveScreen:has(.home-pet-header) .side-rail button { min-width:44px; min-height:44px; gap:3px; font-size:10px; line-height:1.2; }
#liveScreen:has(.home-pet-header) .rail-icon, #liveScreen:has(.home-pet-header) .rail-avatar { width:44px; height:44px; }
#liveScreen:has(.home-pet-header) .side-rail button > span:last-child { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html[data-locale="en-US"] .home-pet-header .live-role-trigger__copy { flex-direction:column; align-items:flex-start; gap:2px; }
html[data-locale="en-US"] .home-pet-header { --home-create-width:112px; }
html[data-locale="en-US"] .home-pet-header .live-role-trigger__copy strong { font-size:13px; }
html[data-locale="en-US"] .home-pet-header .live-role-trigger__copy small[data-kind] { font-size:10px; padding:1px 4px; }
html[data-locale="en-US"] .home-pet-header .live-role-trigger__copy small[data-kind] svg { width:12px; height:12px; flex-basis:12px; }
@media (max-width:360px) {
  .home-pet-header { --home-create-width:90px; }
  html[data-locale="en-US"] .home-pet-header { --home-create-width:108px; }
  .home-pet-header .live-role-trigger { grid-template-columns:32px minmax(0,1fr) 12px; gap:6px; padding:5px 8px 5px 5px; }
  .home-pet-header .live-role-trigger__avatar { width:32px; height:32px; }
  .home-create-pet { gap:4px; padding:0 7px; }
  .home-create-pet svg { width:15px; height:15px; }
  .home-pet-header .live-role-trigger__copy { flex-direction:column; align-items:flex-start; gap:1px; }
  .home-pet-header .live-role-trigger__copy small[data-kind] { font-size:10px; padding:1px 4px; }
  .home-pet-header .live-role-trigger__copy small[data-kind] svg { display:none; }
}
@media (max-height:450px) {
  .home-pet-guide { top:56px; min-height:0; padding-top:calc(8 * var(--home-u)); padding-bottom:calc(8 * var(--home-u)); }
}
