/* The floor page on a phone held upright (390 x 664 and up). The plan as big as the width allows, with the level switch over its
   bottom edge. The panel holds what a visitor picks from first: the home, then the rooms of the level in view as chips, then the
   numbers and the rest. One primary action in the bar, every target 44 px. app.js fitPanel sets --ph, the panel's height, so
   the chips sit whole above the action bar (44-60% of the screen); the plan takes the rest (layoutIso). */
#app.phone #panel { height: var(--ph, 50%); }
#app.phone .p-scroll { display: flex; flex-direction: column; }
#app.phone .p-scroll > * { flex: 0 0 auto; }
#app.phone .p-eyebrow { order: 1; }
#app.phone .p-title { order: 2; }
#app.phone .p-sub { order: 3; }
#app.phone .p-scroll > .p-label { order: 4; margin: 14px 0 8px; }        /* Step inside */
#app.phone #roomList { order: 5; }
#app.phone .p-area { order: 6; margin-top: 14px; }
#app.phone #viewsGo { order: 7; }
#app.phone .p-tour { order: 8; }
#app.phone .p-also { order: 9; }
#app.phone .p-notes { order: 10; }

/* the chips: the rooms of the level in view (the plan's dots), 44 px */
#app.phone #roomList li[data-lv]:not(.here), #app.phone #roomList li.lv-h { display: none; }
#app.phone #roomList button { height: 44px; }
/* the label's breathing room on the right as on the left: Safari sizes a chip from its number's own content (~7 px), not its
   18 px flex basis, so the chip came out 11 px short and the label ran into the border; an explicit width, which every engine
   counts */
#app.phone #roomList button .n { width: 18px; }
/* the chips in ONE row that scrolls sideways (snapping chip by chip, edge to edge of the panel), so the panel keeps its least
   height and the plan, which names every room with its dots, keeps the room. An edge fades while more chips wait past it
   (app.js chipRow). A sideways move before the hold scrolls the row; held 260 ms, a drag scrubs (app.js grabStart hold) */
#app.phone #roomList { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scroll-padding-left: 18px; margin-left: -18px; margin-right: -18px; padding: 0 0 0 18px; scrollbar-width: none; }
#app.phone #roomList::-webkit-scrollbar { display: none; }
#app.phone #roomList::after { content: ''; flex: none; width: 12px; }      /* the row's end clear of the edge, as its start (gap 6 + 12) */
#app.phone #roomList li { scroll-snap-align: start; }
#app.phone #roomList.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
#app.phone #roomList.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
#app.phone #roomList.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 56px), transparent); }

/* one primary action: the private lift where the home has one (the tour moves into the panel, and stays in the menu) */
.p-tour { display: none; }
#app.phone #panel:has(#liftGo:not([hidden])) .p-actions .tour { display: none; }
#app.phone #panel:has(#liftGo:not([hidden])) .p-tour { display: block; width: 100%; margin: 8px 0 2px; min-height: 44px; }
#app.phone #panel:has(#liftGo[hidden]) .p-actions .tour { background: var(--ink); color: var(--paper); border-color: var(--ink); padding: 14px 10px; font-size: 11px; letter-spacing: .2em; }

/* 44 px targets */
#app.phone #backToTower { height: 44px; }
#app.phone .p-views { min-height: 44px; }
#app.phone .p-also .also { min-height: 44px; align-items: center; }

/* the level switch over the model's bottom edge (the model has its place); opaque, no blur: the model moves under it */
#app.phone #levelCtl { bottom: calc(var(--ph, 50%) + 10px); background: rgba(14, 15, 10, .74); backdrop-filter: none; -webkit-backdrop-filter: none; }
#app.phone #levelCtl button { min-height: 44px; }
#app.phone:has(#levelCtl:not([hidden])) #diveHint { bottom: calc(var(--ph, 50%) + 66px); }
#app.phone #diveHint { bottom: calc(var(--ph, 50%) + 10px); }
#app.phone .p-actions .solid, #app.phone .p-actions .tour { min-height: 48px; }

/* the plan pinched or double-tapped closer (app.js PZ): the page itself does not zoom there; the room dots and names keep their size */
#app.phone #isoWrap { touch-action: none; }
#app.phone .hs { scale: calc(1 / var(--pz, 1)); }
