/* ClyDoc Android app layout (active only when <html> has .app-mobile; see js/desktop-boot.js and js/mobile-app.js).
   Builds on the app layout in css/desktop.css: the sidebar becomes a bottom navigation bar, the header a compact
   top bar, dialogs become bottom sheets, and type and spacing are sized for phones. Light and dark themes share
   the tokens in css/desktop.css. Safe-area insets keep content clear of the status and navigation bars. */
.app-mobile {
  --dk-side: 0px; --dk-gap: 14px; --r-lg: 20px; --r-md: 14px;
  /* Status and navigation bar insets: CSS env() where the WebView supports it, otherwise the values Capacitor injects */
  --mb-nav: 66px; --sat: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px)); --sab: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
}
.app-mobile body { font-size: 15px; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
.app-mobile .dk-side, .app-mobile .chat-launch, .app-mobile #dkTheme, .app-mobile .chat-resize, .app-mobile #chatSize { display: none !important; }
.app-mobile main { margin-left: 0; padding: 0 14px calc(var(--mb-nav) + var(--sab) + 20px); }
.app-mobile .announce-bar, .app-mobile .verify-bar { margin-left: 0; }
.app-mobile .wrap { padding-left: 0; padding-right: 0; }

/* ---------- Top bar ---------- */
.app-mobile .dk-top { gap: 10px; padding: calc(var(--sat) + 10px) 0 10px; }
.app-mobile .dk-top::before { inset: 0 -14px; }
.mb-logo { display: none; }
.app-mobile .mb-logo { display: grid; place-items: center; flex: none; }
.app-mobile .mb-logo img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(94, 211, 243, 0.35)); }
.app-mobile .dk-head { flex: 1; min-width: 0; }
.app-mobile .dk-hello { margin: 0; font-size: 12px; line-height: 1.3; }
.app-mobile .dk-title, .app-mobile .dk-title.sm { display: block; font: 650 18px/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-mobile .dk-head:has(.dk-title.sm) .dk-hello { display: none; }
.app-mobile .dk-tools { gap: 6px; }
.app-mobile .dk-search { min-width: 0; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; box-shadow: none; background: var(--card); }
.app-mobile .dk-search span, .app-mobile .dk-search kbd { display: none; }
.app-mobile .dk-round { width: 40px; height: 40px; box-shadow: none; }
.mb-me { width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.mb-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; object-fit: cover; background: var(--card-2); color: var(--text); font: 700 14px var(--body); box-shadow: 0 0 0 2px color-mix(in srgb, var(--dk-purple) 55%, transparent); }
.mb-av.lg { width: 54px; height: 54px; font-size: 18px; }

/* Page headings: the title is in the top bar */
.app-mobile .page-head { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 2px; }
.app-mobile .page-head h1 { display: none; }
.app-mobile .page-head > div > .muted, .app-mobile .page-head > .muted { font-size: 13.5px; line-height: 1.5; }
.app-mobile .head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-mobile .head-actions .btn { flex: 1 1 auto; justify-content: center; }
.app-mobile h2 { font-size: 1.2rem; }
.app-mobile h3 { font-size: 1rem; }
.app-mobile .panel { padding: 16px; border-radius: var(--r-lg); }
.app-mobile .panel + .panel { margin-top: 14px; }
.app-mobile .btn { font-size: 14px; padding: 10px 16px; border-radius: 12px; }
.app-mobile .btn.sm { font-size: 13px; padding: 7px 12px; }
.app-mobile input, .app-mobile select, .app-mobile textarea { font-size: 16px; }   /* 16px stops Android zooming into fields */

/* ---------- Bottom navigation (like WhatsApp) ---------- */
.mb-nav { display: none; }
.app-mobile .mb-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(var(--mb-nav) + var(--sab)); padding: 6px 8px calc(var(--sab) + 6px);
  background: color-mix(in srgb, var(--card) 95%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.35);
}
.app-mobile[data-theme="light"] .mb-nav { box-shadow: 0 -8px 24px -14px rgba(40, 44, 80, 0.25); }
.mb-nav a, .mb-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; color: var(--muted); font: 600 10.5px/1.15 var(--body); text-decoration: none; cursor: pointer; }
.mb-ic { width: 58px; height: 32px; border-radius: 999px; display: grid; place-items: center; transition: background 0.2s, color 0.2s; }
.mb-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mb-l { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.01em; }
.mb-nav .on { color: var(--text); }
.mb-nav .on .mb-ic { background: color-mix(in srgb, var(--dk-purple) 22%, transparent); color: var(--dk-purple); }
.app-mobile[data-theme="dark"] .mb-nav .on .mb-ic { color: #c4b5fd; }
.app-mobile .dk-guest .mb-nav, .app-mobile .dk-locked .mb-nav { display: none; }
.app-mobile .dk-guest main { padding: calc(var(--sat) + 28px) 16px calc(var(--sab) + 24px); }

/* ---------- Account sheet ---------- */
.mb-sheet { position: fixed; inset: 0; z-index: 130; display: flex; align-items: flex-end; background: rgba(5, 6, 12, 0); transition: background 0.2s; }
.mb-sheet[hidden] { display: none; }
.mb-sheet.open { background: rgba(5, 6, 12, 0.55); }
.mb-sheet-card { width: 100%; max-height: 88vh; overflow-y: auto; padding: 8px 14px calc(var(--sab) + 16px); border-radius: 24px 24px 0 0; background: var(--bg); transform: translateY(100%); transition: transform 0.22s ease-out; box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35); }
.mb-sheet.open .mb-sheet-card { transform: none; }
.mb-grab { display: block; width: 40px; height: 4px; margin: 4px auto 12px; border-radius: 4px; background: var(--line-2); }
.mb-sheet-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; }
.mb-sheet-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mb-sheet-head b { font-size: 16px; color: var(--text); }
.mb-sheet-head span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-sheet-head em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--dk-purple); margin-top: 2px; }
.mb-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--card); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.mb-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.mb-group { background: var(--card); border-radius: 18px; overflow: hidden; margin-bottom: 12px; }
.mb-group-t { margin: 4px 6px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.app-mobile[data-theme="light"] .mb-group, .app-mobile[data-theme="light"] .mb-out { border: 1px solid var(--line); }
.mb-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 14px; border: 0; background: none; color: var(--text); font: 500 15px var(--body); text-decoration: none; text-align: left; cursor: pointer; }
.mb-row + .mb-row { border-top: 1px solid var(--line); }
.mb-row > span:nth-child(2) { flex: 1; }
.mb-row > svg { width: 18px; height: 18px; fill: none; stroke: var(--dim); stroke-width: 2; }
.mb-row-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(124, 92, 246, 0.14); color: var(--dk-purple); flex: none; }
.mb-row-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mb-row:active { background: var(--dk-hover); }
.mb-badge { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: #f0606f; color: #fff; font-size: 11px; text-align: center; }
.mb-switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); flex: none; transition: background 0.2s; }
.mb-switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.mb-switch.on { background: var(--dk-purple); } .mb-switch.on i { transform: translateX(18px); }
.mb-out { background: var(--card); border-radius: 18px; color: #f0606f; }
.mb-out .mb-row-ic { background: rgba(240, 96, 111, 0.14); color: #f0606f; }

/* ---------- Dialogs, notifications, toasts ---------- */
.app-mobile .modal { place-items: end stretch; padding: 0; }
.app-mobile .modal-card { width: 100%; max-height: 88vh; padding: 18px 16px calc(var(--sab) + 18px); border-radius: 24px 24px 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
.app-mobile .modal-body { grid-template-columns: 1fr; }
.app-mobile .modal-foot .btn { flex: 1; justify-content: center; }
.app-mobile .toast { bottom: calc(var(--mb-nav) + var(--sab) + 12px); max-width: calc(100vw - 32px); text-align: center; }
.app-mobile .dk-notes { position: fixed; left: 10px; right: 10px; top: calc(var(--sat) + 62px); width: auto; max-height: calc(100vh - var(--sat) - var(--sab) - var(--mb-nav) - 76px); border-radius: 20px; }

/* ---------- AI agent: full screen above the navigation bar ---------- */
.app-mobile .chat-panel { inset: 0 0 calc(var(--mb-nav) + var(--sab)) 0 !important; width: auto !important; height: auto !important; max-width: none; max-height: none; min-width: 0; min-height: 0; border-radius: 0; border: 0; padding-top: var(--sat); box-shadow: none; }
.app-mobile .chat-head { padding-left: 14px; padding-right: 10px; }
.app-mobile .chat-voice { padding: calc(var(--sat) + 20px) 16px calc(var(--sab) + 20px); }
.app-mobile .cv-orb .chat-orb-big { width: min(300px, 72vw); }
.app-mobile .cv-wave { width: 86vw; height: 70px; }
.app-mobile .cv-text { font-size: 16px; }

/* ---------- Dashboard ---------- */
.app-mobile .dk-dash { gap: 14px; }
.app-mobile .dk-card { padding: 16px; border-radius: var(--r-lg); }
.app-mobile .dk-card > header { margin-bottom: 10px; gap: 10px; }
.app-mobile .dk-card h2 { font-size: 16.5px; }
.app-mobile .dk-k { font-size: 12px; }
.app-mobile .dk-pill-btn { padding: 6px 12px; font-size: 12px; }
.app-mobile .dk-row1, .app-mobile .dk-row3, .app-mobile .dk-row4 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.app-mobile .dk-overall-b { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 12px; }
.app-mobile .dk-gauge { max-width: 250px; }
.app-mobile .dk-overall-side { width: 100%; gap: 12px; }
.app-mobile .dk-facts { grid-template-columns: 1fr 1fr; gap: 10px; }
.app-mobile .dk-facts div { display: block; padding: 10px 12px; }
.app-mobile .dk-facts dd { font-size: 20px; margin: 2px 0; }
.app-mobile .dk-orb { min-height: 290px; }
.app-mobile .dk-orb-img { max-height: 290px; }
.app-mobile .dk-orb-halo { width: 230px; }
.app-mobile .dk-systems > header { flex-direction: column; }
.app-mobile .dk-sys-sum { font-size: 11.5px; gap: 4px 12px; }
.app-mobile .dk-sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-mobile .dk-sys { grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 8px 10px; padding: 12px; border-radius: 16px; }
.app-mobile .dk-sys-art { width: 42px; height: 42px; padding: 4px; border-radius: 12px; }
.app-mobile .dk-sys-t b { font-size: 13px; }
.app-mobile .dk-sys-t small { font-size: 10.5px; }
.app-mobile .dk-sys-s { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
.app-mobile .dk-sys-s b { font-size: 18px; }
.app-mobile .dk-vit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-mobile .dk-vit { padding: 12px 12px 8px; border-radius: 16px; }
.app-mobile .dk-vit-h { font-size: 11.5px; }
.app-mobile .dk-vit > b { font-size: 20px; }
.app-mobile .dk-ind li { grid-template-columns: minmax(0, 1fr) auto 64px; gap: 10px; padding: 9px 2px; }
.app-mobile .dk-ind-n { font-size: 12.5px; }
.app-mobile .dk-ind b { font-size: 13px; }
.app-mobile .dk-cat { padding: 16px; }
.app-mobile .dk-pct { margin: 16px 0 8px; }
.app-mobile .dk-banner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 46px 18px 18px; }
.app-mobile .dk-banner p { font-size: 14.5px; }

/* ---------- Health Tracker, organ system pages, admin ---------- */
.app-mobile .det-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.app-mobile .inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-mobile .field { padding: 12px; }
.app-mobile .field label { font-size: 12.5px; }
.app-mobile .field output { font-size: 1rem; }
.app-mobile .matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-mobile .tk-org-grid { grid-template-columns: minmax(0, 1fr); }
.app-mobile .sys-head { margin: 4px 0 16px; gap: 12px; }
.app-mobile .sys-title h1 { font-size: 1.35rem; }
.app-mobile .sys-title p { font-size: 13px; }
.app-mobile .sys-ic { width: 52px; height: 52px; border-radius: 14px; }
.app-mobile .sys-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.app-mobile .sys-map, .app-mobile .sys-rel { grid-column: auto; grid-row: auto; }
.app-mobile .sys-card { padding: 16px; border-radius: var(--r-lg); }
.app-mobile .sys-map-b { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 12px; }
.app-mobile .sys-thumbs { grid-template-columns: repeat(3, 72px); justify-content: center; }
.app-mobile .sys-thumbs button { width: 72px; height: 72px; }
.app-mobile .sys-hero { height: 230px; }
.app-mobile .sys-facts li { justify-content: flex-start; text-align: left; }
.app-mobile .sys-review { position: static; display: inline-block; margin-top: 12px; }
.app-mobile .sys-bars { height: 200px; gap: 6px; }
.app-mobile .admin-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.app-mobile .admin-tabs a { white-space: nowrap; }
.app-mobile .a-tiles, .app-mobile .rv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-mobile .a-tile .v, .app-mobile .rv-tiles .a-tile .v { font-size: 1.45rem; }
.app-mobile .a-grid2 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.app-mobile .a-table { font-size: 13px; }
.app-mobile .ai-rings { grid-template-columns: repeat(2, 1fr); }

/* ---------- Face & Body Scanner ---------- */
.app-mobile .dk-sx-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; }
.app-mobile .dk-sx-hero h2 { font-size: 22px; }
.app-mobile .dk-sx-hero p { font-size: 14px; }
.app-mobile .dk-sx-hero-art { display: none; }
.app-mobile .dk-sx-btns .btn { flex: 1 1 auto; justify-content: center; }
.app-mobile .dk-sx-bar { flex-wrap: wrap; gap: 10px; padding: calc(var(--sat) + 10px) 12px 10px; }
.app-mobile .dk-sx-brand small { display: none; }
.app-mobile .dk-sx-slot { order: 3; flex-basis: 100%; }
.app-mobile .dk-sx-body { padding: 12px 12px calc(var(--sab) + 18px); }
.app-mobile .dk-sx .sx-console { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.app-mobile .dk-sx .sx-stage { order: -1; }
.app-mobile .dk-sx .sx-view { border-width: 8px; }

/* ---------- App lock, About, sign-in ---------- */
.app-mobile .dk-lock { padding: calc(var(--sat) + 16px) 14px calc(var(--sab) + 16px); }
.app-mobile .dk-lock-card { padding: 26px 18px 20px; border-radius: 26px; }
.app-mobile .dk-keys { grid-template-columns: repeat(3, 74px); gap: 12px; }
.app-mobile .dk-keys button { height: 58px; font-size: 22px; border-radius: 18px; }
.app-mobile .dk-about .ab-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 26px 18px; }
.app-mobile .dk-about .ab-icon { grid-row: auto; width: 110px; height: 110px; }
.app-mobile .dk-about .ab-word { height: 30px; justify-self: center; }
.app-mobile .dk-about #infoDoc > section, .app-mobile .dk-about #infoDoc > .doc-intro { padding: 18px; }
.app-mobile .dk-about .ab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-mobile .dk-about .ab-stats b { font-size: 26px; }
.app-mobile .auth-card { padding: 24px 18px; border-radius: 24px; }
.app-mobile .dk-priv-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
.app-mobile .dk-priv-act { grid-column: 1 / -1; justify-content: flex-start; }
.app-mobile .dk-gauge { margin-bottom: -34px; }
.app-mobile .dk-facts span { display: block; line-height: 1.35; }
/* Health Tools: compact rows */
.app-mobile .tools-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.app-mobile .tool-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 14px; row-gap: 3px; align-items: start; padding: 14px 16px; border-radius: 18px; }
.app-mobile .tool-card .tool-ic { grid-row: 1 / 4; width: 46px; height: 46px; margin: 0; }
.app-mobile .tool-card h2 { font-size: 15.5px; margin: 0; }
.app-mobile .tool-card p { font-size: 12.5px; line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-mobile .tool-card .tool-go { font-size: 12.5px; margin-top: 2px; }

/* ---------- Loading screen (Android app), same design as the desktop app's start screen ---------- */
.mb-boot { display: none; }
.mb-booting .mb-boot {
  position: fixed; inset: 0; z-index: 10050; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh;
  background:
    radial-gradient(70% 50% at 48% 42%, rgba(88, 20, 170, 0.85) 0%, rgba(58, 14, 140, 0.55) 40%, transparent 75%),
    radial-gradient(80% 50% at 100% 100%, #2210c8 0%, rgba(34, 16, 200, 0.55) 35%, transparent 70%),
    radial-gradient(70% 40% at 100% 0%, #16127a 0%, transparent 70%),
    linear-gradient(165deg, #0d0526 0%, #1a0850 45%, #120a6a 75%, #1a12b4 100%);
  transition: opacity 0.35s ease;
}
.mb-booting .mb-boot::after { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 50% at 0% 100%, rgba(0, 0, 0, 0.7), transparent 60%); pointer-events: none; }
.mb-boot.out { opacity: 0; }
.mb-boot-logo { position: relative; z-index: 1; width: 34vw; max-width: 180px; aspect-ratio: 1; object-fit: contain; margin-top: -8vh; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.45)); }
.mb-boot-word { position: relative; z-index: 1; width: 66vw; max-width: 360px; height: auto; }
.mb-boot-dots { position: relative; z-index: 1; width: 42vw; max-width: 220px; height: 10px; margin-top: 6vh; }
.mb-boot-dots i { position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: #fff; opacity: 0; animation: mbTravel 2.9s cubic-bezier(0.2, 0.7, 0.8, 0.3) infinite; }
.mb-boot-dots i:nth-child(2) { animation-delay: 0.16s; } .mb-boot-dots i:nth-child(3) { animation-delay: 0.32s; } .mb-boot-dots i:nth-child(4) { animation-delay: 0.48s; } .mb-boot-dots i:nth-child(5) { animation-delay: 0.64s; }
@keyframes mbTravel { 0% { left: 0%; opacity: 0; transform: scale(0.4); } 12% { opacity: 1; transform: scale(1); } 50% { left: 50%; } 88% { opacity: 1; transform: scale(1); } 100% { left: 100%; opacity: 0; transform: scale(0.4); } }
.mb-booting .dk-lock { visibility: hidden; }
.dk-locked body > .mb-boot { visibility: visible !important; }

/* =========================================================
   Android app v2: darker dark mode, AI agent button and chat, full-screen scanner, lighter effects
   ========================================================= */
/* Darker dark mode for the phone: near-black with the website's blue tint */
.app-mobile[data-theme="dark"] {
  --bg: #070b17; --bg-2: #050811; --card: #0f1629; --card-2: #141d34; --line: #1b2540; --line-2: #263356;
  --dk-side-bg: #070b17; --dk-track: #1f2a46; --dk-chip: rgba(255, 255, 255, 0.05); --dk-hover: rgba(255, 255, 255, 0.04);
  --dk-disc1: #18204a; --dk-disc2: #18275a; --dk-disc3: #1a3a7a;
}
.app-mobile[data-theme="dark"] .sys-dark, .app-mobile[data-theme="dark"] .dk-dark { --card: #0d1426; background: #0d1426; }

/* Speed: no blur, filters or heavy shadows on the phone (they make Android WebViews stutter) */
.app-mobile .dk-top, .app-mobile .mb-nav, .app-mobile .chat-panel, .app-mobile .dk-sx-bar, .app-mobile .dk-lock-card, .app-mobile .dk-sx .sx-panel { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.app-mobile .dk-top { background: var(--bg); }
.app-mobile .dk-top::before { background: var(--bg); }
.app-mobile .mb-nav { background: var(--card); }
.app-mobile .o-icon, .app-mobile .o-art .o-sys, .app-mobile .o-art.big .o-sys, .app-mobile .dk-g-fill, .app-mobile .dk-g-disc, .app-mobile .dk-orb-img, .app-mobile .sx-idle svg { filter: none !important; }
.app-mobile .dk-card, .app-mobile .sys-card, .app-mobile .dk-round, .app-mobile .dk-search { box-shadow: none; }
.app-mobile[data-theme="light"] .dk-card, .app-mobile[data-theme="light"] .sys-card { box-shadow: 0 1px 2px rgba(40, 44, 80, 0.06); }
.app-mobile .dk-card[data-href]:hover, .app-mobile .dk-sys:hover, .app-mobile .tk-org:hover { transform: none; }
.app-mobile .sx-face-view video { filter: none; }
.app-mobile { touch-action: manipulation; }
.app-mobile .dk-systems, .app-mobile .dk-row3, .app-mobile .dk-row4, .app-mobile #tkOrgPanel, .app-mobile #tkSymPanel, .app-mobile .tk-charts { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* AI agent button: floats above the menu, bottom right (like WhatsApp's new-chat button) */
.mb-fab { display: none; }
.app-mobile .mb-fab {
  position: fixed; right: 16px; bottom: calc(var(--mb-nav) + var(--sab) + 16px); z-index: 76; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 18px;
  display: grid; place-items: center; cursor: pointer; background: linear-gradient(145deg, #7c5cf6, #5b3dd2); box-shadow: 0 8px 22px -6px rgba(91, 61, 210, 0.75);
  transition: transform 0.15s;
}
.app-mobile .mb-fab:active { transform: scale(0.94); }
.app-mobile .mb-fab img { width: 40px; height: 40px; object-fit: contain; }
.app-mobile .dk-guest .mb-fab, .app-mobile .dk-locked .mb-fab, .app-mobile .mb-chat-open .mb-fab, .app-mobile .dk-sx-open .mb-fab, .app-mobile .cv-open .mb-fab { display: none; }

/* AI agent chat: a full-screen conversation like Meta AI in WhatsApp */
.app-mobile .chat-panel { inset: 0 !important; z-index: 120; padding-top: 0; background: var(--bg) !important; animation: mbChatIn 0.22s ease-out; }
@keyframes mbChatIn { from { transform: translateX(100%); } to { transform: none; } }
.app-mobile .chat-head { gap: 10px; padding: calc(var(--sat) + 8px) 8px 8px 6px; background: var(--card); border-bottom: 1px solid var(--line); }
.app-mobile .chat-orb-mini, .app-mobile #chatClose, .app-mobile #chatAutoRead { display: none !important; }
.mb-chat-back, .mb-chat-av { display: none; }
.app-mobile .mb-chat-back { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; }
.app-mobile .mb-chat-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.app-mobile .mb-chat-av { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: linear-gradient(145deg, #7c5cf6, #4f8df8); padding: 2px; }
.app-mobile .mb-chat-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; background: #070b17; }
.app-mobile .chat-title h2 { font: 650 16px var(--body); }
.app-mobile .chat-title p { font-size: 12px; color: var(--muted); }
.app-mobile .chat-hbtn { width: 40px; height: 40px; border-radius: 50%; color: var(--text); }
.app-mobile .chat-credits { padding: 6px 14px; font-size: 11.5px; background: var(--card); }
.app-mobile .chat-body {
  background-color: var(--bg);
  background-image: radial-gradient(color-mix(in srgb, var(--dk-purple) 14%, transparent) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.app-mobile .chat-welcome { justify-content: flex-start; padding: 22px 16px 12px; text-align: left; align-items: stretch; }
.app-mobile .chat-orb-big { display: none; }
.app-mobile #chatWelcome::before { content: ''; align-self: center; width: 76px; height: 76px; margin-bottom: 6px; border-radius: 50%; background: #070b17 url('../clydoc-icon.png?v=4') center / 86% no-repeat; box-shadow: 0 0 0 3px #7c5cf6; }
.app-mobile .chat-welcome h3 { align-self: center; text-align: center; font-size: 17px; }
.app-mobile .chat-welcome > p { align-self: center; text-align: center; font-size: 13px; padding: 10px 14px; border-radius: 12px; background: var(--card); max-width: none; }
.app-mobile .chat-suggest { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.app-mobile .chat-suggest .chip { padding: 11px 14px; font-size: 13.5px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.app-mobile .chat-log { padding: 14px 10px 8px; gap: 6px; }
.app-mobile .msg-av { display: none; }
.app-mobile .msg-row { gap: 0; }
.app-mobile .msg { max-width: 84%; padding: 8px 11px 6px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18); }
.app-mobile .msg.bot { background: var(--card); border: 0; border-top-left-radius: 4px; color: var(--text); }
.app-mobile .msg.me { background: #5b45d6; border-top-right-radius: 4px; }
.app-mobile[data-theme="light"] .msg.me { background: #e6ddff; color: #1b1d2a; }
.app-mobile[data-theme="light"] .msg.me .msg-meta { color: #6b6f86; }
.app-mobile .msg-meta { font-size: 10.5px; }
.app-mobile .chat-form { margin: 6px 8px; padding: 0; gap: 6px; background: none; border: 0; box-shadow: none !important; align-items: flex-end; }
.app-mobile .chat-form textarea { padding: 12px 48px 12px 16px; border-radius: 24px; background: var(--card); font-size: 16px; border: 1px solid var(--line); }
.app-mobile .chat-mic { position: absolute; right: 64px; bottom: 3px; width: 40px; height: 40px; border-radius: 50%; }
.app-mobile .chat-form { position: relative; }
.app-mobile .chat-send { width: 48px; height: 48px; border-radius: 50%; background: #7c5cf6; }
.app-mobile .chat-note { padding: 2px 16px calc(var(--sab) + 6px); font-size: 10.5px; }

/* Face & Body Scanner: full-screen camera with the readings in a swipeable strip */
.app-mobile .dk-sx { height: 100dvh; }
.app-mobile .dk-sx-bar { flex-wrap: nowrap; gap: 8px; padding: calc(var(--sat) + 8px) 10px 8px; }
.app-mobile .dk-sx-brand b { font-size: 14px; } .app-mobile .dk-sx-brand img { width: 28px; height: 28px; }
.app-mobile .dk-sx-slot { order: 0; flex: 1; flex-basis: auto; justify-content: flex-end; }
.app-mobile .dk-sx-slot .seg button { padding: 6px 10px; font-size: 12px; }
.app-mobile .dk-sx-body { padding: 0; overflow: hidden; display: flex; }
.app-mobile .dk-sx-body > .sx-console:not([hidden]) { flex: 1; min-height: 0; }
.app-mobile .dk-sx #sxFace:not([hidden]) { display: flex !important; flex-direction: column; align-items: stretch; gap: 0; height: 100%; width: 100%; max-width: none; }
.app-mobile .dk-sx #sxFace .sx-side { display: none; }
.app-mobile .dk-sx #sxFace .sx-stage { flex: 1; min-height: 0; width: 100%; position: relative; display: block; }
.app-mobile .dk-sx #sxFace .sx-stage::after { display: none; }
.app-mobile .dk-sx #sxFace .sx-view { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.app-mobile .dk-sx #sxFace .sx-title { position: absolute; top: 12px; left: 0; right: 0; z-index: 3; margin: 0; pointer-events: none; }
.app-mobile .dk-sx #sxFace .sx-title span { font-size: 13px; letter-spacing: 0.18em; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.app-mobile .dk-sx #sxFace .sx-actions { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 3; margin: 0; display: flex; justify-content: center; gap: 10px; }
.app-mobile .dk-sx #sxFace .sx-actions .btn { padding: 13px 26px; font-size: 15px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
.app-mobile .dk-sx #sxFace .sx-hint { position: absolute; left: 14px; right: 14px; bottom: 74px; z-index: 3; margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.55); color: #e9ecf5; font-size: 12.5px; text-align: center; }
.app-mobile .dk-sx #sxFace .sx-ring { top: 54px; right: 12px; }
.app-mobile .mb-sx-strip { flex: none; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 12px calc(var(--sab) + 10px); background: #0b0c12; scrollbar-width: none; }
.app-mobile .mb-sx-strip .sx-panel { flex: 0 0 68vw; max-width: 300px; scroll-snap-align: start; margin: 0; padding: 12px; max-height: 190px; overflow: hidden; }
.app-mobile .mb-sx-strip .sx-panel header { margin-bottom: 6px; }
.app-mobile .mb-sx-strip .sx-gauge { max-width: 170px; margin: 0 auto; }
.app-mobile .dk-sx #sxBody .sx-stage { order: -1; }
.app-mobile .dk-sx-brand b { white-space: nowrap; font-size: 13.5px; }
.app-mobile .dk-sx-slot .seg button { white-space: nowrap; }
@media (max-width: 380px) { .app-mobile .dk-sx-brand b { display: none; } }
.app-mobile .dk-sx #sxBody:not([hidden]) { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px calc(var(--sab) + 18px); align-content: start; }
.app-mobile .dk-sx .sx-stage::after { display: none; }

/* The ClyDoc orb on the phone dashboard */
.app-mobile .cy-orb { width: min(300px, 82vw); }
.app-mobile .cy-head { filter: none; }
.app-mobile .dk-orb { min-height: 0; padding: 18px 0 8px; }

/* Nothing can make an app page wider than the phone: sideways panning dragged the fixed bottom menu with it (2026-10-24) */
html.app-mobile, html.app-mobile body { overflow-x: clip; max-width: 100%; }
.app-mobile .dk-orb { min-width: 0; }
.app-mobile .dk-orb-cv { max-width: 100%; }
.app-mobile .dk-dash { grid-template-columns: minmax(0, 1fr); }
.app-mobile .dk-dash > *, .app-mobile .dk-row1 > * { min-width: 0; }

/* Bottom menu: the website's dark navy, bold icons and labels, ClyDoc blue for the open page (2026-10-24) */
.app-mobile .mb-nav { background: #0a0f1f; border-top: 1px solid #1f2a45; box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.6); transform: translateZ(0); }
.app-mobile .mb-nav a, .app-mobile .mb-nav button { color: #97a3bc; font-weight: 700; }
.app-mobile .mb-ic svg { width: 23px; height: 23px; stroke-width: 2.6; }
.app-mobile .mb-nav .on { color: #fff; }
.app-mobile .mb-nav .on .mb-ic, .app-mobile[data-theme="dark"] .mb-nav .on .mb-ic { background: rgba(59, 110, 245, 0.22); color: #5b8cff; box-shadow: inset 0 0 0 1px rgba(94, 211, 243, 0.3); }

/* Consult a Doctor on phones: three equal tabs that fit the screen, room above the floating AI button */
.app-mobile [data-page="consult"] .cn-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; overflow: visible; padding: 4px; }
.app-mobile [data-page="consult"] .cn-tabs > button { min-width: 0; padding: 9px 6px; white-space: normal; text-align: center; line-height: 1.2; font-size: 12.5px; justify-content: center; }
.app-mobile [data-page="consult"] { padding-bottom: 76px; }

/* About ClyDoc header on phones: a compact logo, wordmark and tagline */
.app-mobile .dk-about .ab-hero { grid-template-rows: auto; row-gap: 8px; padding: 24px 16px 22px; }
.app-mobile .dk-about .ab-icon { grid-row: auto; width: 84px; height: 84px; }
.app-mobile .dk-about .ab-hero .x1-word { justify-self: center; }
.app-mobile .dk-about .ab-hero .ab-word { height: 20px; }
.app-mobile .dk-about .ab-tag { margin-top: 12px; font-size: 15px; }

/* Bigger tap targets on phones (2026-10-24) */
.app-mobile .seg button { min-height: 38px; padding-left: 14px; padding-right: 14px; }
.app-mobile .lt-letters a, .app-mobile .lt-letters span { width: 34px; height: 34px; font-size: 0.85rem; }
.app-mobile input[type="range"] { height: 34px; }
.app-mobile input[type="checkbox"]:not(.sr) { width: 20px; height: 20px; }
.app-mobile .row-del { min-height: 36px; min-width: 40px; }
.app-mobile .link-btn { min-height: 34px; padding: 6px 4px; }
.app-mobile .dk-pill-btn { min-height: 36px; display: inline-flex; align-items: center; }
.app-mobile .dk-x { width: 36px; height: 36px; }

/* Room at the end of every page so the floating AI button never covers the last card */
.app-mobile main { padding-bottom: calc(var(--mb-nav) + var(--sab) + 92px); }
