/* BAB-0059: the Behaviour page on a phone. Loaded last (after alive.css and shared/ui/phone.css). Every rule is under html.phone, so desktop and tablet are exactly as they were.
   The live 3D bot is the screen; what it is doing, the time speed and its face sit on it; a strip of personalities rides above the thumb bar; the rest is in sheets (phone-behave.js). */
html.phone { --bh-strip: 162px; --ph-hud-b: calc(var(--ph-bar) + var(--bh-strip) + var(--bots-cc-h, 0px)); --ph-hud-r: var(--ph-edge-r); }
html.phone-land { --bh-strip: 92px; --ph-hud-b: calc(env(safe-area-inset-bottom, 0px) + var(--bh-strip) + var(--bots-cc-h, 0px)); --ph-hud-r: 0px; }
html.phone.ph-sheet-open { --ph-hud-b: 0px; }
html.phone-land.ph-sheet-open { --ph-sheet-w: calc(var(--ph-rail) + min(440px, 60vw)); }
html.phone .bgrid { display: block; position: fixed; inset: 0; z-index: 1; gap: 0; }
html.phone .bleft, html.phone .bright { display: contents; }
html.phone #stage { position: absolute; inset: 0; display: block; padding: 0; border: 0; border-radius: 0; background: #E6EBF1; box-shadow: none; overflow: visible; animation: none; }
html.phone #h-stage, html.phone #stage > #status { display: none; }
html.phone #viewbox { position: absolute; left: 0; top: 0; right: var(--ph-sheet-w, var(--ph-rail)); bottom: var(--ph-sheet-h, 0px); height: auto; min-height: 0; flex: none; border-radius: 0; box-shadow: none; }
html.phone-land #viewbox { bottom: 0; }
html.phone .loading { padding-top: var(--ph-top); }
html.phone #stage > .transport { display: none; }

/* on the view: what it is doing now, how long is left of "leave it alone", the time speed and Pause, the face to touch */
html.phone .hud { left: calc(10px + var(--ph-edge-l)); right: 10px; top: calc(var(--ph-top) + 10px); }
html.phone .now { max-width: min(100%, 300px); padding: 6px 12px; }
html.phone #viewbox > .aloneview { position: absolute; z-index: 4; left: calc(10px + var(--ph-edge-l)); right: calc(10px + var(--ph-hud-r)); top: calc(var(--ph-top) + 64px); padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 1px 6px rgba(20, 23, 23, .22); }
html.phone #viewbox > .aloneview[hidden] { display: none; }
html.phone .bh-hud { position: absolute; z-index: 4; left: calc(10px + var(--ph-edge-l)); bottom: calc(var(--ph-hud-b) + 10px); display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(20, 23, 23, .25); }
html.phone .bh-hud .seg3 { gap: 4px; }
html.phone .bh-hud .btn { min-height: 44px; min-width: 44px; padding: 0 12px; }
html.phone .pip { right: calc(10px + var(--ph-hud-r)); bottom: calc(var(--ph-hud-b) + 10px); }
html.phone .bezelmini canvas { width: clamp(96px, 28vw, 130px); }
html.phone .pipin { padding: 6px 6px 4px; }
html.phone-land .bezelmini canvas { width: 96px; }
html.phone.ph-sheet-open .pip, html.phone.ph-sheet-open .bh-hud { display: none; }

/* the strip of personalities: the picking card's own list, scrolling sideways with the next one peeking in */
html.phone .bh-strip { height: var(--bh-strip); bottom: calc(var(--ph-bar) + var(--bots-cc-h, 0px)); background: linear-gradient(0deg, rgba(230, 235, 241, .96) 55%, rgba(230, 235, 241, 0)); }
html.phone .bh-strip > .card { height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; display: block; overflow: visible; }
html.phone .bh-strip h2 { display: none; }
html.phone #people { display: flex; gap: 10px; height: 100%; padding: 14px 28px 10px calc(14px + var(--ph-edge-l)); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding-left: 14px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
html.phone #people::-webkit-scrollbar { display: none; }
html.phone #people .person { flex: 0 0 auto; width: 214px; min-height: 0; padding: 8px 12px; gap: 4px; scroll-snap-align: start; touch-action: pan-x; box-shadow: 0 2px 8px -4px rgba(20, 26, 33, .5); }
html.phone #people .person[aria-pressed="true"] { border-color: var(--hue); box-shadow: 0 0 0 2px var(--hue), 0 0 20px -4px rgba(var(--hue-rgb), .9); }
html.phone #people .pabout { max-height: 2.7em; flex: none; }
html.phone #people .pname, html.phone #people .pmeta, html.phone #people .pbars { flex: none; }
html.phone #people .person:active { transform: scale(.97); }
html.phone-land .bh-strip { right: var(--ph-rail); }
html.phone-land #people { padding-top: 8px; }
html.phone-land #people .person { width: 190px; padding: 6px 10px; }
html.phone-land #people .pabout, html.phone-land #people .pmeta { display: none; }
html.phone.ph-sheet-open .bh-strip { display: none; }

/* the sheets' contents */
html.phone .ph-sh-body > #p-people { padding: 0; }
html.phone .ph-sh-body .bh-acts { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 10px; }
html.phone .ph-sh-body .bh-acts .btn { min-height: 56px; font-size: 16px; }
html.phone .ph-sh-body .fire { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.phone .ph-sh-body > #p-fire > h2:first-child { display: none; }
html.phone .ph-sh-body > #p-dials .dialhead h2, html.phone .ph-sh-body > #p-time .dialhead h2 { font-size: 18px; }
html.phone .ph-sh-body > #p-rows { margin-bottom: 8px; }
html.phone .ph-sh-body > #p-files > h2:first-child { display: none; }
html.phone .ph-sh-body .dials { grid-template-columns: 1fr; }
html.phone .ph-sh-body .tline { max-height: none; overflow: visible; }
html.phone .ph-sh-body .tlact .btn { flex: 1 1 120px; }
html.phone .ph-sh-body .tplrow .btn { flex: 1 1 100px; }
html.phone .ph-sh-body .roweditor { margin-left: 0; }

/* BAB-0061 left-handed (More): the time buttons go to the right, the face to touch to the left */
html.phone.lefty .bh-hud { left: auto; right: calc(10px + var(--ph-hud-r)); }
html.phone.lefty .pip { right: auto; left: calc(10px + var(--ph-edge-l)); }
