/* Phone layout of the web app (html.phone, set by web/mobile.js). Same dark slate + mint look as the desktop. */
html.phone, html.phone body { height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
html.phone #planner { display: flex; flex-direction: column; height: 100dvh; }
html.phone #planner.hidden { display: none; }

/* top bar: name, jaw switch, undo/redo, save */
html.phone .appbar { height: auto; min-height: 48px; padding: 6px 8px; gap: 8px; flex-wrap: wrap; }
html.phone .menus, html.phone .flow, html.phone .layout-btn, html.phone .brand-name, html.phone .appbar-right .save-btn { display: none; }
html.phone .case { flex: 1; min-width: 0; padding-left: 8px; }
html.phone .case-title { max-width: none; font-size: 13px; }
html.phone .jaw-seg { margin: 0; height: 34px; }
html.phone .jaw-seg button { padding: 0 10px; font-size: 12.5px; }

/* the views take the whole width; desktop rails and the side panel go away */
html.phone .workspace { flex: 1; min-height: 0; position: relative; overflow: hidden; } /* the list sheet hides below */
html.phone .rail { display: none; }
html.phone #views { padding: 4px; }
html.phone #views.phone-views > .vp-group { grid-area: 1 / 1; }
html.phone #views.phone-views > .vp-group:not(.on) { display: none !important; } /* the layout code sets display inline */
html.phone .statusbar { display: none; }
html.phone .vp-strip .sb { width: 34px; height: 32px; }
html.phone .sb-select { height: 32px; font-size: 13px; }
html.phone .sec-vbar { width: 36px; }
html.phone .sec-vbar input { width: 26px; }

/* lists and settings: a sheet that slides up over the views (Lists button) */
html.phone .inspector { position: absolute; left: 0; right: 0; bottom: 0; height: 62%; width: auto !important; z-index: 40; transform: translateY(105%); transition: transform .2s ease; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.45); }
html.phone.ph-sheet .inspector { transform: none; }
html.phone .insp-tabs { flex-direction: row; overflow-x: auto; }

/* bottom bar: planning actions above the view tabs, big enough for a thumb */
.ph-bar { display: none; }
html.phone .ph-bar { display: block; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.ph-actions, .ph-tabs { display: flex; }
.ph-actions { overflow-x: auto; gap: 4px; padding: 6px 6px 2px; }
.ph-actions button { flex: 0 0 auto; height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font-size: 13px; }
.ph-tabs button { flex: 1; height: 46px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; border-top: 2px solid transparent; }
.ph-tabs button.on { color: var(--accent); border-top-color: var(--accent); }

/* home screen: one column */
html.phone #home { overflow-y: auto; height: 100dvh; }
html.phone .home-main { grid-template-columns: 1fr; padding: 14px 12px; gap: 18px; }
html.phone .start-card { padding: 12px; gap: 12px; }
html.phone .start-card .art { width: 72px; height: 54px; }
html.phone .start-card .art svg { width: 66px; height: 48px; }
html.phone .start-card b { font-size: 15px; }

/* start-up steps (load scan, orient, curve): content full width on top, a compact step strip with
   Back / Continue at the bottom (the desktop's 280 px side column left no room on a phone) */
html.phone #wizard { height: 100dvh; display: flex; flex-direction: column; }
html.phone #wizard .menus, html.phone #wizard .brand-name { display: none; }
html.phone .wz-main { flex-direction: column; min-height: 0; }
html.phone .wz-body { order: 1; flex: 1; flex-direction: column; overflow-y: auto; min-height: 0; }
html.phone .wz-left { width: auto !important; padding: 12px; border-right: 0; overflow: visible; flex: none; }
html.phone .wz-right { flex: none; height: 52vh; min-height: 260px; margin: 0 12px 12px; }
html.phone .wz-right.split { height: auto; }
html.phone .wz-right.split .frame { flex: none !important; height: 44vh; min-height: 220px; }
html.phone .wz-right.split .frame[style*="height"] { height: 26vh !important; }
html.phone .wz-steps { order: 2; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); }
html.phone .wz-steps > .spacer { display: none; }
html.phone .wz-st { flex: 1; padding: 4px; gap: 6px; align-items: center; border: 0 !important; background: none !important; min-width: 0; }
html.phone .wz-st i { width: 24px; height: 24px; }
html.phone .wz-st b { font-size: 11.5px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.phone .wz-st span { display: none; }
html.phone .wz-actions { flex: 1 0 100%; }
html.phone .wz-actions button { height: 44px; }
html.phone .dlg { width: calc(100vw - 16px) !important; max-height: calc(100dvh - 16px); }
html.phone .vp3d { display: none; }

/* Chrome install offer (web/mobile.js) */
.install-bar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 100; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface2); border: 1px solid var(--accent-line, var(--line)); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); font-size: 13px; }
.install-bar span { flex: 1; }
.install-bar button[data-i="yes"] { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--accent); color: #0b1016; font-weight: 700; }
.install-bar button[data-i="no"] { width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); }
