/* Only the Fridge joins the phone viewport layout. Other rooms keep page scroll.
   The moment itself scrolls for long notes, enlarged text, and small keyboards. */
.fridge-room-details,.fridge-details-content{display:contents}
.fridge-room-details>summary{display:none}
.fridge-details-content>.fridge-help{display:none}
@media(max-width:860px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
  .connected-root[data-fridge-fit]{position:fixed;inset:auto 0;top:var(--porch-viewport-top,0px);height:var(--porch-viewport-height,100dvh);display:flex;flex-direction:column;overflow:hidden;background:var(--bg,#faf7fc);padding-top:env(safe-area-inset-top);box-sizing:border-box}
  .connected-root[data-fridge-fit]>.connected-strip,.connected-root[data-fridge-fit] .workspace-footer,.connected-root[data-fridge-fit] .sidebar{display:none}
  .connected-root[data-fridge-fit]>.app-shell{display:flex;flex:1;min-height:0;width:100%;margin:0}
  .connected-root[data-fridge-fit] .workspace{display:flex;flex-direction:column;min-height:0;padding-bottom:0}
  .connected-root[data-fridge-fit] .topbar{flex:none;height:48px;min-height:48px;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));gap:8px}
  .connected-root[data-fridge-fit] .desktop-breadcrumb{min-width:0;max-width:none;font-size:11px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
  .connected-root[data-fridge-fit] .live-top-actions{flex-shrink:0;gap:10px}
  .connected-root[data-fridge-fit] .live-top-actions button{min-height:44px}
  .connected-root[data-fridge-fit] .live-top-actions>button[data-live-action="rooms"]{display:none}
  .connected-root[data-fridge-fit] #live-main{position:relative;display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:0 max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left));overflow:visible}
  .connected-root[data-fridge-fit] .fridge-room-details{display:block;flex:none;z-index:4}
  .connected-root[data-fridge-fit] .fridge-room-details>summary{display:list-item;min-height:36px;padding:8px 4px;box-sizing:border-box;font-size:12px;cursor:pointer}
  .connected-root[data-fridge-fit] .fridge-details-content{display:block;position:absolute;top:36px;left:10px;right:10px;max-height:calc(100% - 44px);overflow-y:auto;overscroll-behavior:contain;padding:16px;background:var(--live-paper,#fffaff);border:1px solid var(--live-line);border-radius:14px;box-shadow:0 10px 30px #34204730}
  .connected-root[data-fridge-fit] .fridge-room-details:not([open])>.fridge-details-content{display:none}
  .connected-root[data-fridge-fit] .fridge-details-content>.fridge-help{display:block}
  .connected-root[data-fridge-fit] #live-room-content{display:flex;flex-direction:column;flex:1;min-height:0;gap:6px;overflow-y:auto;overscroll-behavior:contain}
  .connected-root[data-fridge-fit] #live-room-content>.page-heading{flex:none;margin:0}
  .connected-root[data-fridge-fit] .page-heading h1{font-size:24px;margin:0}
  .connected-root[data-fridge-fit] .page-heading :is(.eyebrow,.subtitle){display:none}
  .connected-root[data-fridge-fit] .fridge-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:0;flex:none}
  .connected-root[data-fridge-fit] .fridge-actions button{min-height:44px;font-size:13px;padding:7px 8px;line-height:1.25}
  .connected-root[data-fridge-fit] .fridge-appliance{display:flex;flex-direction:column;flex:1;min-height:140px;min-width:0;width:100%;max-width:none;box-sizing:border-box;margin:0;padding:27px 10px 8px 47px;border-radius:20px}
  .connected-root[data-fridge-fit] .fridge-badge{top:7px;right:18px;font-size:10px}
  /* The visible handle and its hit target are the same element, so they scale
     together. The reserved left rail prevents moment content covering it. */
  .connected-root[data-fridge-fit] .fridge-arcade-handle{left:1px;top:50%;transform:translateY(-50%);width:44px;height:clamp(44px,22vh,112px);max-height:calc(100% - 16px);background-size:24px 100%;z-index:3}
  .connected-root[data-fridge-fit] .live-fridge-deck{display:flex;flex-direction:column;flex:1;min-height:0}
  .connected-root[data-fridge-fit] .live-fridge-deck>.live-post{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;transform:none;padding:10px;margin:0;scrollbar-gutter:stable}
  .connected-root[data-fridge-fit] .live-fridge-deck>.live-post::before{display:none}
  .connected-root[data-fridge-fit] .live-fridge-deck>.live-post>*{flex-shrink:0}
  .connected-root[data-fridge-fit] .live-fridge-deck .live-private-image{width:100%;height:100%;max-height:100%;object-fit:contain}
  .connected-root[data-fridge-fit] .live-fridge-deck .private-media-placeholder{height:clamp(100px,calc(var(--porch-viewport-height,100dvh) - 440px),330px);min-height:0;margin:0 0 6px;flex-shrink:0}
  .connected-root[data-fridge-fit] .live-fridge-deck .post-body{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
  .connected-root[data-fridge-fit] .live-fridge-deck .live-post h2{font-size:19px;margin:6px 0}
  .connected-root[data-fridge-fit] .live-fridge-deck .post-meta{margin:8px 0 0;font-size:12px}
  .connected-root[data-fridge-fit] .live-fridge-deck .post-meta time{font-size:11px}
  .connected-root[data-fridge-fit] .live-stack-actions{flex:none;gap:4px;margin-top:6px;align-items:center}
  .connected-root[data-fridge-fit] .live-fridge-arrows{gap:4px}
  .connected-root[data-fridge-fit] .live-fridge-arrows button{min-height:44px;padding:7px 8px;font-size:12px}
  .connected-root[data-fridge-fit] #live-room-content>.fridge-help{display:none}
  .connected-root[data-fridge-fit] #live-room-content>[data-live-action="more-previews"]{flex:none;min-height:44px}
  .connected-root[data-fridge-fit] .fridge-appliance>.live-empty{overflow-y:auto;padding:12px;margin:0;min-height:0}
  .connected-root[data-fridge-fit]>.mobile-nav{position:static;display:block;flex:none;width:100%;box-sizing:border-box}
  .connected-root[data-fridge-compact] .page-heading{display:none}
  .connected-root[data-fridge-compact]>.mobile-nav{padding-top:0;padding-bottom:env(safe-area-inset-bottom)}
  .connected-root[data-fridge-compact] .room-picker-bar{min-height:44px;padding-block:0}
  .connected-root[data-fridge-compact] .room-picker-bar small,.connected-root[data-fridge-compact] .room-home{display:none}
}
/* Dialogs are outside the fitted root; retain native keyboard scroll and safe areas. */
@media(max-width:860px){.live-dialog :is(input,textarea,select){font-size:16px}}

/* Consistent identity at the top; the current room lives in the bottom chooser. */
.connected-root .topbar .getaway-top-brand{display:flex;align-items:center;gap:8px;min-width:0;max-width:none;line-height:1.2}
.connected-root .getaway-top-brand>img{width:32px;height:32px;flex:0 0 32px}
.connected-root .getaway-top-brand>div{min-width:0}
.connected-root .getaway-top-brand strong{display:block;font-size:15px;color:var(--live-ink)}
.connected-root .getaway-top-brand small{display:block;font-size:11px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.connected-root .room-picker-bar .room-home>.icon{width:25px;height:25px}
@media(max-width:860px),(max-width:1024px) and (max-height:500px) and (pointer:coarse){
  .connected-root .topbar .getaway-top-brand{flex:1}
  .connected-root .topbar .getaway-top-brand strong{font-size:14px}
  .connected-root .topbar .getaway-top-brand>img{width:28px;height:28px;flex-basis:28px}
  .connected-root[data-porch-compact] .room-picker-bar .room-home,.connected-root[data-fridge-compact] .room-picker-bar .room-home{display:flex;width:30px;height:30px}
}
/* Override the earlier Porch breadcrumb clamp at matching specificity. */
.connected-root[data-porch-fit] .topbar .getaway-top-brand,
.connected-root[data-fridge-fit] .topbar .getaway-top-brand{display:flex;-webkit-line-clamp:unset;-webkit-box-orient:initial}
