/* Ace Mobile follows the native iPhone app's obsidian, ivory and gold language. */
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] {
  --gold: #e4bd63;
  --line: rgba(255, 226, 170, .22);
  --muted: #bdb3a2;
  color: #f4ecdd;
  background: radial-gradient(circle at 50% 8%, rgba(228, 189, 99, .15), transparent 38%), #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] :is(h1, h2) {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.025em;
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] .sidebar {
  background: #0c0c10;
  border-color: var(--line);
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] .sidebar nav a[aria-current="page"] {
  background: rgba(228, 189, 99, .10);
  border-color: rgba(228, 189, 99, .45);
  color: #f1d48e;
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] :is(.panel, .task-card, .composer) {
  background: #0c0c10;
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .04);
  border-radius: 20px;
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] #pairing {
  background: radial-gradient(circle at 50% 0, rgba(228, 189, 99, .11), transparent 55%), #0c0c10;
  border-color: rgba(255, 226, 170, .36);
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] :is(.primary, .secondary, .danger) {
  border-radius: 999px;
  min-height: 50px;
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] .primary {
  background: #e4bd63;
  color: #0a0806;
  border-color: #e4bd63;
  box-shadow: 0 10px 24px rgba(228, 189, 99, .20);
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] .secondary {
  background: rgba(255,255,255,.045);
  color: #f4ecdd;
  border-color: var(--line);
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] .danger {
  background: rgba(255, 107, 107, .08);
  color: #ff9c9c;
  border-color: rgba(255, 107, 107, .35);
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] :is(input:not([type="checkbox"]), textarea, select) {
  background: #131318;
  border-color: var(--line);
  color: #f4ecdd;
  border-radius: 15px;
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] .message {
  background: #131318;
  border-color: var(--line);
  color: #f4ecdd;
  border-radius: 18px;
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] .message[data-role="user"] {
  background: #211b12;
  border-color: rgba(228, 189, 99, .35);
}
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] :is(.eyebrow, .message strong, .text-button) { color: #f1d48e; }
html:not([data-ace-theme="ocean"]) body[data-surface="mobile"] .mobile-tabs button[aria-pressed="true"] {
  background: radial-gradient(circle, rgba(228,189,99,.17), transparent 75%);
  color: #e4bd63;
  border: 0;
}
@media (max-width: 760px) {
  body[data-surface="mobile"] .app-shell { display: block; }
  body[data-surface="mobile"] .sidebar { height: 64px; padding: 10px 20px; border: 0; position: static; background: transparent; }
  body[data-surface="mobile"] .brand { font-size: 24px; margin: 0; min-height: 44px; font-family: ui-serif, Georgia, serif; }
  body[data-surface="mobile"] .sidebar nav,
  body[data-surface="mobile"] .sidebar-footer,
  body[data-surface="mobile"] .sidebar > .eyebrow { display: none; }
  body[data-surface="mobile"] main { padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
  body[data-surface="mobile"] .page-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body[data-surface="mobile"] .mobile-header { min-height: 32px; padding: 0 4px; }
  body[data-surface="mobile"] #pairing { margin-top: 4px; padding: 24px 20px 26px; }
  body[data-surface="mobile"] #pairing h2 { font-size: 2.25rem; line-height: 1.05; margin: 8px 0 12px; max-width: 12ch; }
  body[data-surface="mobile"] #pairing > p:not(.eyebrow) { font-size: .9rem; line-height: 1.5; }
  body[data-surface="mobile"] .pair-choice { margin-top: 20px; }
  body[data-surface="mobile"] .pair-choice > * { min-width: 0; min-height: 60px; padding: 12px 10px; line-height: 1.2; }
  body[data-surface="mobile"] .mobile-tabs {
    position: fixed;
    left: 50%; bottom: calc(8px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 20;
    display: grid;
    width: min(calc(100% - 24px), 560px);
    height: 68px;
    padding: 4px;
    margin: 0;
    border: 1px solid rgba(255, 226, 170, .18);
    border-radius: 999px;
    background: rgba(12, 12, 16, .96);
    box-shadow: 0 12px 26px rgba(0,0,0,.55);
  }
  body[data-surface="mobile"] .mobile-tabs button { display: grid; place-content: center; gap: 2px; min-height: 56px; font-size: 11px; border-radius: 999px; }
  body[data-surface="mobile"] .mobile-tabs button::before { display: block; font-size: 20px; line-height: 1; font-weight: 400; }
  body[data-surface="mobile"] .mobile-tabs button[data-tab="chat"]::before { content: "♠"; }
  body[data-surface="mobile"] .mobile-tabs button[data-tab="vision"]::before { content: "▣"; }
  body[data-surface="mobile"] .mobile-tabs button[data-tab="world"]::before { content: "◎"; }
  body[data-surface="mobile"] .mobile-tabs button[data-tab="tasks"]::before { content: "☑"; }
  body[data-surface="mobile"] .mobile-tabs button[data-tab="connect"]::before { content: "▦"; }
  body[data-surface="mobile"] .conversation { max-height: 42dvh; }
}
body:not([data-surface="mobile"]) .mobile-menu-open { display: none; }
@media (prefers-reduced-motion: no-preference) {
  body[data-surface="mobile"] .primary:active,
  body[data-surface="mobile"] .secondary:active { transform: scale(.98); }
}
body[data-surface="mobile"] .home-actions { display: flex; flex-wrap: wrap; gap: 12px; }
body[data-surface="mobile"] .home-actions .text-button { min-height: 44px; }
body[data-surface="mobile"] .app-links { display: grid; gap: 4px; margin-top: 14px; }
body[data-surface="mobile"] .app-links a { display: flex; align-items: center; min-height: 48px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; }
body[data-surface="mobile"] .app-links a::after { content: "↗"; margin-left: auto; color: var(--gold); }
body[data-surface="mobile"] #mac-fullscreen { position: absolute; z-index: 2; top: 28px; right: 8px; min-height: 44px; }
body[data-surface="mobile"] .screen-wrap { min-height: 54px; }
body[data-surface="mobile"].mac-immersive .screen-wrap { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; margin: 0; background: #000; }
body[data-surface="mobile"].mac-immersive #mac-screen { width: auto; max-width: 100vw; max-height: 100dvh; margin: 0; object-fit: contain; }
body[data-surface="mobile"].mac-immersive #mac-fullscreen { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
body[data-surface="mobile"].mac-immersive #mac-targets { display: none; }
body[data-surface="mobile"].stealth-active .sidebar,
body[data-surface="mobile"].stealth-active main > :not(#stealth-screen) { display: none !important; }
body[data-surface="mobile"] .task-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 4px; margin: 18px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: #111115; }
body[data-surface="mobile"] .task-tabs button { min-height: 44px; min-width: 0; padding: 8px 2px; border: 0; border-radius: 999px; background: transparent; color: #a99f8e; font-size: 12px; font-weight: 600; }
body[data-surface="mobile"] .task-tabs button[aria-pressed="true"] { color: #120e08; background: #e4bd63; }
body[data-surface="mobile"] .schedule-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; padding: 16px 4px 4px; }
body[data-surface="mobile"] .schedule-heading .button-row { margin: 0; gap: 6px; }
body[data-surface="mobile"] .schedule-heading .button-row button { min-height: 44px; padding: 8px 12px; font-size: 12px; }
body[data-surface="mobile"] .schedule-card p + p { margin-top: 8px; }
body[data-surface="mobile"] .schedule-card .button-row { gap: 8px; }
body[data-surface="mobile"] .schedule-card .button-row button { min-height: 44px; padding: 8px 12px; font-size: 12px; }
@media (max-width: 370px) { body[data-surface="mobile"] .schedule-heading { display: block; } body[data-surface="mobile"] .schedule-heading .button-row { margin-top: 12px; } }
body[data-surface="mobile"] #stealth-screen:not([hidden]) { position: fixed; z-index: 50; inset: 0; display: grid; place-content: center; justify-items: center; gap: 20px; background: #000; text-align: center; }
body[data-surface="mobile"] #stealth-screen p + p { color: var(--muted); font-size: 14px; }
body[data-surface="mobile"] #stealth-off { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); }
body[data-surface="mobile"] #call-camera-video { width: 100%; max-height: 38dvh; margin-top: 16px; border-radius: 16px; object-fit: cover; background: #090909; }
body[data-surface="mobile"] .empty-action { display:block; width:min(100%,260px); margin:16px auto 24px; }
body[data-surface="mobile"] .empty-action[hidden] { display:none; }
body[data-surface="mobile"] #calls-view > .button-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
body[data-surface="mobile"] #calls-view > .button-row #call-camera { grid-column: 1 / -1; }
body[data-surface="mobile"] .call-history { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
body[data-surface="mobile"] .call-history h3 { margin-bottom: 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
body[data-surface="mobile"] .call-history-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
body[data-surface="mobile"] .call-history-row strong { grid-column: 1; font-size: 14px; }
body[data-surface="mobile"] .call-history-row span { grid-column: 1; color: var(--muted); font-size: 12px; }
body[data-surface="mobile"] .call-history-row time { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: 11px; white-space: nowrap; }

/* Match the current Ace BL five-space app. The account theme does not recolor Ace Mobile. */
body[data-surface="mobile"] {
  --gold: #e4bd63;
  --line: rgba(255, 226, 170, .12);
  --muted: #bdb3a2;
  color: #f4ecdd;
  color-scheme: dark;
  background: radial-gradient(circle at 50% 26%, rgba(233,190,99,.16), rgba(233,190,99,.05) 30%, transparent 64%), #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body[data-surface="mobile"] .app-shell { display: block; min-height: 100dvh; }
body[data-surface="mobile"] .sidebar { display: flex; position: static; width: min(100%, 680px); height: 60px; margin: auto; padding: 12px 16px 0; border: 0; background: transparent; }
body[data-surface="mobile"] .sidebar .brand { display:none; }
body[data-surface="mobile"] .sidebar :is(nav,.sidebar-footer,.eyebrow) { display: none; }
body[data-surface="mobile"] .mobile-menu-open { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-left: auto; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #16151a; color: #f4ecdd; font-size: 14px; }
body[data-surface="mobile"] #mobile-menu { position: fixed; inset: 0 auto 0 0; width: min(86vw, 360px); height: 100dvh; max-height: 100dvh; margin: 0; padding: calc(18px + env(safe-area-inset-top)) 20px 28px; border: 0; border-right: 1px solid #665a43; background: #0c0c10; color: #f4ecdd; overflow: auto; }
body[data-surface="mobile"] #mobile-menu::backdrop { background: #000b; }
body[data-surface="mobile"] .mobile-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; font: 600 25px ui-serif, Georgia, serif; }
body[data-surface="mobile"] .mobile-menu-close { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #16151a; color: #f4ecdd; font: 14px Inter, sans-serif; }
body[data-surface="mobile"] #mobile-menu nav { display: grid; gap: 3px; }
body[data-surface="mobile"] #mobile-menu nav .eyebrow { margin: 18px 8px 8px; }
body[data-surface="mobile"] #mobile-menu nav :is(a,button) { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: #f4ecdd; font-size: 16px; text-align: left; text-decoration: none; }
body[data-surface="mobile"] #mobile-menu nav :is(a,button):focus-visible { outline: 2px solid #e4bd63; }
body[data-surface="mobile"] #mobile-menu-spaces { display: grid; gap: 3px; }
body[data-surface="mobile"] .apps-ai-sharing label { display:flex; align-items:center; justify-content:space-between; gap:15px; min-height:58px; }
body[data-surface="mobile"] .apps-ai-sharing label span { display:grid; gap:4px; }
body[data-surface="mobile"] .apps-ai-sharing small { color:var(--muted); line-height:1.45; }
body[data-surface="mobile"] .apps-ai-sharing input { width:22px; height:22px; flex:none; accent-color:var(--gold); }
body[data-surface="mobile"] #ai-consent-dialog { width:min(100% - 32px,480px); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; border:1px solid var(--line); border-radius:22px; background:#111115; color:#f4ecdd; box-shadow:0 24px 80px #000a; }
body[data-surface="mobile"] #ai-consent-dialog::backdrop { background:#000c; }
body[data-surface="mobile"] #ai-consent-dialog h2 { margin:0 0 16px; }
body[data-surface="mobile"] #ai-consent-dialog p { line-height:1.5; color:var(--muted); }
body[data-surface="mobile"] #ai-consent-dialog .button-row { display:grid; gap:10px; margin:24px 0 16px; }
body[data-surface="mobile"] #ai-consent-dialog .button-row button { min-height:50px; }
body[data-surface="mobile"] #ai-consent-dialog a { color:var(--gold); }
body[data-surface="mobile"] .brand { min-height: 44px; margin: 0; color: #f4ecdd; font: 600 23px ui-serif, Georgia, serif; }
body[data-surface="mobile"] .brand img { width: 28px; height: 28px; }
body[data-surface="mobile"] main { width: min(100%, 680px); padding: calc(10px + env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom)); }
body[data-surface="mobile"][data-space="chat"] main { padding-bottom:0; }
body[data-surface="mobile"] .page-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body[data-surface="mobile"] :is(h1,h2,h3) { color: #f4ecdd; }
body[data-surface="mobile"] :is(.panel,.task-card,.composer) { background: #0c0c10; border: 1px solid var(--line); border-radius: 20px; box-shadow: inset 0 1px 0 rgba(255,226,170,.04); }
body[data-surface="mobile"] :is(.primary,.secondary,.danger) { border-radius: 999px; min-height: 50px; }
body[data-surface="mobile"] .primary { background: #e4bd63; border-color: #e4bd63; color: #0a0806; box-shadow: 0 8px 18px rgba(228,189,99,.20); }
body[data-surface="mobile"] .secondary { background: rgba(255,255,255,.05); color: #f4ecdd; border-color: var(--line); }
body[data-surface="mobile"] .danger { background: rgba(255,107,107,.08); color: #ff9c9c; border-color: rgba(255,107,107,.35); }
body[data-surface="mobile"] :is(input:not([type="checkbox"]),textarea,select) { color: #f4ecdd; background: #131318; border-color: var(--line); border-radius: 15px; }
body[data-surface="mobile"] :is(input,textarea)::placeholder { color: #8a8275; opacity: 1; }
body[data-surface="mobile"] .eyebrow { color: #8a8275; letter-spacing: .16em; }
body[data-surface="mobile"] .mobile-header { position:absolute; z-index:1; top:calc(16px + env(safe-area-inset-top)); left:max(20px,calc((100vw - 680px)/2 + 20px)); width:calc(min(100vw,680px) - 135px); min-height:44px; margin:0; padding:0; color:#bdb3a2; font-size:13px; }
body[data-surface="mobile"] .connection-dot { width: 7px; height: 7px; background: #8a8275; }
body[data-surface="mobile"] .connection-dot[data-online="true"] { background: #7fd6a4; box-shadow: 0 0 7px rgba(127,214,164,.55); }
body[data-surface="mobile"] #page-status { margin: 0 6px 8px; color: #f1d48e; }
body[data-surface="mobile"] #pairing { margin: 4px 0 0; padding: 24px 20px 26px; background: radial-gradient(circle at 50% 0, rgba(228,189,99,.11), transparent 55%), #0c0c10; border-color: rgba(255,226,170,.22); }
body[data-surface="mobile"] #pairing h2 { font: 400 clamp(2.15rem, 8vw, 3.2rem)/1.08 ui-serif, Georgia, serif; letter-spacing: -.025em; margin: 10px 0 14px; }
body[data-surface="mobile"] #pairing > p:not(.eyebrow) { color: #bdb3a2; font-size: 14px; line-height: 1.55; }
body[data-surface="mobile"] #pairing strong { color: #f4ecdd; }
body[data-surface="mobile"] .pair-choice { margin-top: 22px; }
body[data-surface="mobile"] .pair-choice > * { min-width: 0; flex: 1 1 145px; min-height: 60px; }
body[data-surface="mobile"] #pair-form textarea { overflow-wrap: anywhere; }
body[data-surface="mobile"] #mobile-app { min-height: calc(100dvh - 90px); }
body[data-surface="mobile"] .mobile-tabs { position: fixed; z-index: 20; left: 50%; right: auto; bottom: calc(8px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 32px), 560px); height: 64px; margin: 0; padding: 4px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0; background: #0c0c10; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 8px 20px rgba(0,0,0,.5); }
body[data-surface="mobile"] .mobile-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 56px; padding: 3px 0; color: #7f786c; background: transparent; border: 0; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
body[data-surface="mobile"] .mobile-tabs button[data-tab]::before { content: none; display: none; }
body[data-surface="mobile"] .mobile-tabs svg { display: block; width: 21px; height: 21px; flex: none; }
body[data-surface="mobile"] .mobile-tabs svg { width:26px; height:26px; }
body[data-surface="mobile"] .mobile-tabs button[aria-pressed="true"] { color: #e4bd63; background: radial-gradient(circle, rgba(228,189,99,.18), transparent 70%); }
body[data-surface="mobile"] [data-panel="chat"] { min-height: calc(100dvh - 145px); }
body[data-surface="mobile"] [data-panel="chat"] .section-heading { display:none; }
body[data-surface="mobile"] [data-panel="chat"] .section-heading > div:first-child { display: none; }
body[data-surface="mobile"] .home-actions { gap: 4px; }
body[data-surface="mobile"] .home-actions .text-button { min-height: 40px; padding: 5px 7px; font-size: 11px; color: #8a8275; }
body[data-surface="mobile"] .home-welcome { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:calc(100dvh - 220px - env(safe-area-inset-bottom)); padding:0 10px 34px; text-align:center; }
body[data-surface="mobile"] .ace-gem { display:block; width:106px; aspect-ratio:170/180; padding:0; border:0; background:transparent; cursor:pointer; }
body[data-surface="mobile"] .ace-gem svg { display: block; width: 100%; height: 100%; }
body[data-surface="mobile"][data-mac-online="false"] #ace-gem #gem-glow stop:first-child { stop-color:#c9a24b; stop-opacity:.16; }
body[data-surface="mobile"][data-mac-online="false"] #ace-gem #gem-glow stop:nth-child(2) { stop-opacity:.05; }
body[data-surface="mobile"][data-mac-online="false"] #ace-gem #gem-core stop:first-child { stop-color:#4b4b5a; }
body[data-surface="mobile"][data-mac-online="false"] #ace-gem #gem-core stop:last-child { stop-color:#15151b; }
body[data-surface="mobile"][data-mac-online="false"] #ace-gem g[clip-path] path:nth-child(1),
body[data-surface="mobile"][data-mac-online="false"] #ace-gem g[clip-path] path:nth-child(2) { fill:#23232c; }
body[data-surface="mobile"][data-mac-online="false"] #ace-gem g[clip-path] path:nth-child(3) { fill:#3a3a46; }
body[data-surface="mobile"][data-mac-online="false"] #ace-gem g[clip-path] path:nth-child(4),
body[data-surface="mobile"][data-mac-online="false"] #ace-gem g[clip-path] path:nth-child(7) { fill:#0e0e13; }
body[data-surface="mobile"][data-mac-online="false"] #ace-gem g[clip-path] path:nth-child(5) { fill:#1a1a21; }
body[data-surface="mobile"] .home-welcome h2 { margin: 0 0 10px; font: 400 32px/1.15 ui-serif, Georgia, serif; letter-spacing: -.02em; }
body[data-surface="mobile"] .home-welcome p { max-width:34ch; color:#bdb3a2; font:400 17px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
body[data-surface="mobile"] .home-suggestions { display:none; }
body[data-surface="mobile"] .home-suggestions button { min-height: 44px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: #e9e1d2; background: rgba(255,255,255,.04); font-size: 14px; }
body[data-surface="mobile"] .home-suggestions button:first-child { color: #f1d48e; border-color: rgba(228,189,99,.45); background: rgba(228,189,99,.1); }
body[data-surface="mobile"] #messages { min-height:0; max-height:none; padding:0; }
body[data-surface="mobile"] #messages:has(.message) { min-height:50dvh; padding-bottom:230px; }
body[data-surface="mobile"] .message { border-radius: 18px; color: #f4ecdd; background: #131318; border-color: var(--line); font-size: 15px; }
body[data-surface="mobile"] .message[data-role="user"] { color: #f4ecdd; background: #211b12; border-color: rgba(228,189,99,.35); }
body[data-surface="mobile"] .composer { position: fixed; z-index: 15; inset: auto 16px calc(84px + env(safe-area-inset-bottom)); width: min(calc(100% - 32px), 648px); margin: 0 auto; padding: 6px 8px; background: #101015; border-radius: 29px; box-shadow: 0 10px 24px rgba(0,0,0,.6); }
body[data-surface="mobile"] .composer-row { display: flex; align-items: end; gap: 4px; }
body[data-surface="mobile"] #composer-more { flex: none; width: 44px; height: 46px; min-height: 46px; padding: 0; border: 0; border-radius: 50%; color: #e4bd63; background: transparent; font-size: 29px; line-height: 1; }
body[data-surface="mobile"] #composer-more[aria-expanded="true"] { background: rgba(228,189,99,.12); }
body[data-surface="mobile"] .composer-row textarea { flex:1 1 auto; min-width:0; min-height:46px; max-height:100px; margin:0; padding:12px 14px; resize:none; border:0; background:transparent; font-size:16px; line-height:22px; white-space:pre; overflow-x:auto; overflow-y:hidden; }
body[data-surface="mobile"] .composer-row textarea:focus { outline: none; }
body[data-surface="mobile"] .composer:focus-within { border-color: rgba(228,189,99,.5); }
body[data-surface="mobile"] #chat-send { width: 46px; height: 46px; min-height: 46px; flex: none; padding: 0; border-radius: 50%; }
body[data-surface="mobile"] #chat-send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body[data-surface="mobile"] #chat-send[data-mode="mic"] .send-icon, body[data-surface="mobile"] #chat-send[data-mode="send"] .mic-icon { display: none; }
body[data-surface="mobile"] .composer-tools { justify-content: space-between; gap: 8px; margin: 2px 8px 0; font-size: 12px; }
body[data-surface="mobile"] .composer-tools[hidden] { display: none; }
body[data-surface="mobile"] .composer-tools :is(.file-button,.toggle) { min-height: 38px; }
body[data-surface="mobile"] .composer-tools .secondary,body[data-surface="mobile"] .composer-tools .danger { min-height: 36px; padding: 5px 10px; font-size: 12px; }
body[data-surface="mobile"] #voice-status { flex-basis: 100%; margin: 2px 0 4px; font-size: 11px; line-height: 1.25; }
body[data-surface="mobile"] .visually-hidden:not(:focus) { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
body[data-surface="mobile"] [data-panel]:not([data-panel="chat"]) { padding: 20px 0 80px; }
body[data-surface="mobile"] [data-panel]:not([data-panel="chat"]) > h2 { font: 400 28px/1.15 ui-serif, Georgia, serif; }
body[data-surface="mobile"] [data-panel]:not([data-panel="chat"]) > p.muted { margin-top: 8px; font-size: 14px; }
body[data-surface="mobile"] .panel { padding: 20px; }
body[data-surface="mobile"] .app-links a { border-color: var(--line); }
@keyframes ace-gem-breathe { from { transform: scale(1); opacity: .92; } to { transform: scale(1.025); opacity: 1; } }
@media (max-width: 390px) { body[data-surface="mobile"] .home-actions .text-button { font-size: 10px; padding-inline: 4px; } body[data-surface="mobile"] .home-suggestions button { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { body[data-surface="mobile"] .ace-gem { animation: none; } }

/* Mac matches the native compact screen header and readable viewport. */
body[data-surface="mobile"] .mac-space-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px; }
body[data-surface="mobile"] .mac-space-header h2 { margin: 0; font: 400 27px/1.1 ui-serif, Georgia, serif; }
body[data-surface="mobile"] .mac-space-header p { margin: 4px 0 0; color: #8a8275; font-size: 12px; }
body[data-surface="mobile"] .mac-header-actions { display: flex; gap: 4px; }
body[data-surface="mobile"] .mac-header-actions button { min-height: 44px; padding: 5px 8px; font-size: 11px; white-space: nowrap; }
body[data-surface="mobile"] .mac-header-actions button[aria-pressed="true"] { color: #e4bd63; border-color: rgba(228,189,99,.45); }
body[data-surface="mobile"] #screen-wrap { overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; }
body[data-surface="mobile"] .screen-canvas { position: relative; width: 100%; min-width: 100%; }
body[data-surface="mobile"] #screen-wrap[data-zoom="readable"] { max-height: 65dvh; }
body[data-surface="mobile"] #screen-wrap[data-zoom="readable"] .screen-canvas { width: 300%; }
body[data-surface="mobile"] #screen-wrap #mac-screen { display: block; width: 100%; max-width: none; height: auto; }
body[data-surface="mobile"].mac-immersive #screen-wrap { max-height: none; }
@media (max-width: 370px) {
  body[data-surface="mobile"] .mac-space-header { flex-wrap: wrap; }
  body[data-surface="mobile"] .mac-space-header p { white-space: nowrap; }
  body[data-surface="mobile"] .mac-header-actions { width: 100%; }
  body[data-surface="mobile"] .mac-header-actions button { flex: 1; }
}
@media (max-width: 760px) {
  body[data-surface="mobile"] #qr-scanner:not([hidden]) { position: fixed; z-index: 80; inset: 0; margin: 0; background: #050506; }
  body[data-surface="mobile"] #qr-video { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; object-fit: cover; }
  body[data-surface="mobile"] #qr-scanner::after { content: ""; position: absolute; top: 48%; left: 50%; width: min(68vw, 320px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid #e4bd63; border-radius: 18px; box-shadow: 0 0 0 100vmax #0005; pointer-events: none; }
  body[data-surface="mobile"] #qr-status { position: absolute; z-index: 1; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); left: 16px; margin: 0; padding: 12px 16px; border-radius: 12px; background: #09090bd9; color: #f5f1e9; text-align: center; }
  body[data-surface="mobile"] #stop-scan { position: absolute; z-index: 1; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); left: 16px; min-height: 52px; }
  body[data-surface="mobile"] #world-video,
  body[data-surface="mobile"] #call-camera-video { display: block; width: calc(100% + 74px); height: min(68vh, 700px); height: min(68dvh, 700px); max-height: none; margin: 16px -37px 0; border-radius: 0; object-fit: cover; background: #090909; }
}
/* World keeps the camera as the canvas, with controls above it like the phone app. */
body[data-surface="mobile"] [data-panel="world"] { padding: 0 !important; }
body[data-surface="mobile"] .world-stage { position: relative; isolation: isolate; width: calc(100% + 32px); height: calc(100vh - 196px); height: calc(100dvh - 196px - env(safe-area-inset-bottom)); min-height: 400px; margin-inline: -16px; overflow: hidden; background: #05080c; }
@media(max-width:760px){
  html:has(body[data-surface="mobile"]) { scrollbar-width:none; }
  html:has(body[data-surface="mobile"])::-webkit-scrollbar { display:none; }
  html:has(body[data-surface="mobile"][data-space="world"]) { overflow:hidden; }
  body[data-surface="mobile"][data-space="world"] { overflow:hidden; }
  body[data-surface="mobile"][data-space="world"] .sidebar { position:relative; z-index:22; }
  body[data-surface="mobile"][data-space="world"] .mobile-header { z-index:22; }
  body[data-surface="mobile"][data-space="world"] .world-stage { position:fixed; z-index:1; inset:0; width:100vw; height:100dvh; min-height:0; margin:0; }
  body[data-surface="mobile"][data-space="world"] .world-top { top:calc(58px + env(safe-area-inset-top)); }
  body[data-surface="mobile"][data-space="world"] .world-bottom { bottom:calc(78px + env(safe-area-inset-bottom)); }
}
body[data-surface="mobile"] .world-stage #world-video { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; max-height: none; margin: 0; border: 0; border-radius: 0; object-fit: cover; background: #05080c; }
body[data-surface="mobile"] #qr-video[hidden],body[data-surface="mobile"] #world-video[hidden],body[data-surface="mobile"] #call-camera-video[hidden] { display: none !important; }
body[data-surface="mobile"] .world-camera-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #e4bd63; font: 140px/1 ui-serif, Georgia, serif; background: radial-gradient(circle at 50% 38%, #1a3346, #07111c 65%, #030609); }
body[data-surface="mobile"] .world-camera-placeholder[hidden] { display: none; }
body[data-surface="mobile"] .world-top { position: absolute; z-index: 2; top: 0; right: 0; left: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 12px 16px 24px; background: linear-gradient(#000b, transparent); }
body[data-surface="mobile"] .world-live-status { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid #ffffff26; border-radius: 999px; background: #000a; color: #f4ecdd; font-size: 12px; font-weight: 650; }
body[data-surface="mobile"] .world-camera-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
body[data-surface="mobile"] .world-camera-actions button { min-height: 40px; padding: 8px 11px; background: #000b; border: 1px solid #ffffff38; color: #f4ecdd; font-size: 12px; }
body[data-surface="mobile"] .world-bottom { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; padding: 36px 14px 16px; background: linear-gradient(transparent, #000d 30%, #000e); }
body[data-surface="mobile"] .world-bottom .conversation { max-height: min(24dvh, 210px); margin: 0 0 8px; overflow: auto; background: #080b0ccc; border: 1px solid #ffffff24; border-radius: 16px; }
body[data-surface="mobile"] #world-messages[data-empty="true"] { display: none; }
body[data-surface="mobile"] .apps-rules details { border-top: 1px solid var(--line); }
body[data-surface="mobile"] .apps-rules summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 0; list-style: none; cursor: pointer; }
body[data-surface="mobile"] .apps-rules summary::-webkit-details-marker { display: none; }
body[data-surface="mobile"] .apps-rules summary::after { content: '›'; color: var(--gold); font-size: 24px; line-height: 1; }
body[data-surface="mobile"] .apps-rules details[open] summary::after { transform: rotate(90deg); }
body[data-surface="mobile"] .apps-rules summary strong { font-size: 14px; }
body[data-surface="mobile"] .apps-rules summary span { color: var(--muted); font-size: 12px; text-align: right; }
body[data-surface="mobile"] .apps-rules details p { display: block; margin: 0 0 14px; padding: 0 12px; border: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
body[data-surface="mobile"] .world-bottom .conversation .empty { padding: 10px 12px; color: #f4ecdd; font-size: 13px; }
body[data-surface="mobile"] .world-composer { display: flex; align-items: end; gap: 6px; margin: 0; padding: 6px; border: 1px solid #ffffff33; border-radius: 24px; background: #101015ee; }
body[data-surface="mobile"] .world-composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 104px; margin: 0; padding: 11px; resize: vertical; border: 0; background: transparent; font-size: 16px; }
body[data-surface="mobile"] .world-composer button { flex: none; min-height: 44px; height: 44px; padding: 0 12px; margin: 0; }
body[data-surface="mobile"] .world-composer #world-ask { width: 44px; padding: 0; font-size: 24px; }
@media (max-width: 380px) { body[data-surface="mobile"] .world-top { flex-direction: column; } body[data-surface="mobile"] .world-camera-actions { justify-content: flex-start; } }

/* Keep Mac controls reachable while its conversation remains in normal flow. */
body[data-surface="mobile"] #mac-chat-form { position: static; width: 100%; margin: 16px 0 0; padding: 12px; box-shadow: none; }
body[data-surface="mobile"] #chat-send:not([data-mode="stop"]) .stop-icon,
body[data-surface="mobile"] #chat-send[data-mode="stop"] :is(.send-icon, .mic-icon) { display: none; }
body[data-surface="mobile"] #mac-targets button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
