:root {
  color-scheme: dark;
  --gray-0: #fff;
  --gray-75: #f3f3f3;
  --gray-100: #ededed;
  --gray-300: #afafaf;
  --gray-500: #5d5d5d;
  --gray-600: #414141;
  --gray-700: #303030;
  --gray-750: #282828;
  --gray-800: #212121;
  --gray-900: #181818;
  --gray-1000: #0d0d0d;
  --blue-300: #339cff;
  --red-300: #ff6764;
  --green-300: #40c977;
  --surface: var(--gray-900);
  --surface-elevated: var(--gray-800);
  --surface-secondary: var(--gray-750);
  --surface-hover: var(--gray-700);
  --text: var(--gray-0);
  --text-secondary: rgba(255,255,255,.7);
  --text-tertiary: rgba(255,255,255,.5);
  --border: rgba(255,255,255,.08);
  --border-heavy: rgba(255,255,255,.16);
  --focus: rgba(51,156,255,.7);
  --sidebar-width: 275px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}

/* MiniAGI controls: preserve the Codex layout and add liquid-glass affordances. */
.miniagi-theme {
  --surface: #0a1020;
  --surface-elevated: rgba(18, 27, 49, .78);
  --surface-secondary: rgba(25, 37, 64, .72);
  --surface-hover: rgba(67, 92, 143, .34);
  --border: rgba(182, 213, 255, .16);
  --border-heavy: rgba(203, 226, 255, .28);
  --focus: rgba(106, 197, 255, .9);
}
.miniagi-theme body, .miniagi-theme .app-view { background: radial-gradient(1000px 700px at 80% -20%, rgba(92,164,255,.18), transparent 65%), radial-gradient(800px 600px at -10% 110%, rgba(154,104,255,.12), transparent 65%), var(--surface); }
.miniagi-theme .drawer, .miniagi-theme .topbar, .miniagi-theme .composer-surface-chrome, .miniagi-theme .modal-card, .miniagi-theme .progress-pip {
  background: linear-gradient(145deg, rgba(32,48,82,.72), rgba(14,22,42,.78));
  border-color: rgba(205,228,255,.18);
  box-shadow: 0 18px 48px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.14);
  backdrop-filter: blur(22px) saturate(135%);
}
.miniagi-theme button, .miniagi-theme .composer-context, .miniagi-theme .suggestions button, .miniagi-theme .secondary-button, .miniagi-theme .primary-button, .miniagi-theme .login-button {
  border: 1px solid rgba(207,230,255,.18);
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(152,195,255,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 5px 16px rgba(0,0,0,.16);
  backdrop-filter: blur(14px) saturate(140%);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.miniagi-theme button:hover { background: linear-gradient(135deg, rgba(255,255,255,.24), rgba(152,195,255,.16)); box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 22px rgba(0,0,0,.22); transform: translateY(-1px); }
.miniagi-theme button:active { transform: translateY(0) scale(.98); }
.miniagi-theme .icon-button, .miniagi-theme .drawer-action, .miniagi-theme .composer-button, .miniagi-theme .logout-button { border-color: transparent; box-shadow: none; }
.miniagi-theme .send-button, .miniagi-theme .login-button, .miniagi-theme .primary-button { color: #07111f; background: linear-gradient(135deg, #d9f2ff, #8dccff 48%, #c0adff); }
.miniagi-theme .message-row.user .message-card { background: linear-gradient(135deg, rgba(97,168,255,.34), rgba(153,121,255,.24)); border: 1px solid rgba(190,220,255,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.miniagi-theme .message-card pre, .miniagi-theme .tool-card, .miniagi-theme .approval-card { background: rgba(3,9,20,.72); border-color: rgba(150,195,255,.2); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.miniagi-theme .progress-pip { border-radius: 18px; }

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: var(--surface); color: var(--text); }
body { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.hidden { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand svg, .login-logo, .empty-state > svg { fill: currentColor; stroke: none; }
.mobile-only { display: none; }

.login-view { min-height: 100svh; display: grid; place-items: center; padding: 24px; background: var(--surface); }
.login-panel { width: min(100%, 360px); text-align: center; }
.login-logo { width: 46px; height: 46px; margin-bottom: 22px; color: var(--gray-0); }
.login-panel h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -.04em; }
.login-panel > p { margin: 9px 0 30px; color: var(--text-secondary); }
.login-panel form { text-align: left; }
.login-panel label { display: grid; gap: 8px; margin: 16px 0; }
.login-panel label span { font-size: 13px; color: var(--text-secondary); }
.login-panel input, .settings-modal select, .input-question input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--border-heavy); border-radius: 10px; background: var(--surface); }
.login-button, .primary-button { min-height: 48px; border-radius: 9999px; background: var(--gray-0); color: var(--gray-1000); font-weight: 600; }
.login-button { width: 100%; margin-top: 10px; }
.login-button:hover, .primary-button:hover { background: var(--gray-100); }
.login-panel small { display: block; margin-top: 24px; color: var(--text-tertiary); font-size: 11px; }
.form-error { min-height: 18px; margin: 10px 0 0; color: var(--red-300); font-size: 12px; text-align: center; }

.app-view { display: flex; width: 100%; height: 100svh; background: var(--surface); }
.drawer { width: var(--sidebar-width); flex: none; display: flex; flex-direction: column; padding: 10px 8px; background: var(--surface-elevated); border-right: 1px solid var(--border); z-index: 20; }
.drawer-header { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; }
.brand svg { width: 22px; height: 22px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: transparent; color: var(--text-secondary); }
.icon-button:hover { background: rgba(255,255,255,.07); color: var(--text); }
.icon-button svg { width: 20px; height: 20px; }
.drawer-action { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 11px; border-radius: 10px; background: transparent; color: var(--text); text-align: left; }
.drawer-action:hover { background: rgba(255,255,255,.07); }
.drawer-action svg { width: 19px; height: 19px; }
.drawer-search { height: 38px; display: flex; align-items: center; gap: 10px; margin: 5px 2px 12px; padding: 0 10px; border-radius: 10px; background: rgba(255,255,255,.05); color: var(--text-tertiary); }
.drawer-search svg { width: 17px; height: 17px; }
.drawer-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.drawer-section-title { display: flex; justify-content: space-between; padding: 8px 12px 5px; color: var(--text-tertiary); font-size: 11px; }
.thread-list { min-height: 0; flex: 1; overflow-y: auto; scrollbar-width: thin; }
.thread-item { width: 100%; min-height: 39px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: transparent; color: var(--text-secondary); text-align: left; }
.thread-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.thread-item.active { background: rgba(255,255,255,.09); color: var(--text); }
.thread-icon { width: 20px; color: var(--text-tertiary); text-align: center; }
.thread-copy { min-width: 0; flex: 1; }
.thread-copy strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 400; }
.thread-copy small { display: none; }
.drawer-footer { padding-top: 7px; border-top: 1px solid var(--border); }
.drawer-action.subdued { color: var(--text-secondary); }
.account-row { min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 5px 9px; }
.account-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #7c5cff; font-size: 11px; font-weight: 600; }
.account-copy { min-width: 0; flex: 1; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-copy strong { font-size: 12px; font-weight: 500; }
.account-copy small { margin-top: 2px; color: var(--text-tertiary); font-size: 10px; }
.logout-button { padding: 6px; background: transparent; color: var(--text-tertiary); font-size: 10px; }
.drawer-backdrop { display: none; }

.chat-layout { min-width: 0; flex: 1; display: flex; flex-direction: column; background: var(--surface); }
.topbar { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: rgba(24,24,24,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); z-index: 5; }
.topbar-title { min-width: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.topbar-title strong { max-width: min(50vw, 500px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 600; }
.topbar-title span { display: flex; align-items: center; gap: 5px; color: var(--text-tertiary); font-size: 10px; }
.topbar-title span b { font-weight: 400; }
.connection-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: var(--text-tertiary); }
.connection-dot.online { background: var(--green-300); }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.model-badge { color: var(--text-tertiary); font-size: 11px; }

.messages { min-height: 0; flex: 1; overflow-y: auto; padding: 30px max(18px, calc((100% - 760px)/2)) 28px; scroll-behavior: smooth; }
.empty-state { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state > svg { width: 34px; height: 34px; color: var(--text); }
.empty-state h2 { margin: 18px 0 6px; font-size: 24px; font-weight: 500; letter-spacing: -.035em; }
.empty-state p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.suggestions button { padding: 8px 12px; border: 1px solid var(--border-heavy); border-radius: 9999px; background: transparent; color: var(--text-secondary); font-size: 12px; }
.suggestions button:hover { background: rgba(255,255,255,.06); color: var(--text); }

.message-row { width: 100%; max-width: 760px; display: flex; gap: 10px; margin: 0 auto 24px; }
.message-row.user { justify-content: flex-end; }
.message-avatar { display: none; }
.message-card { max-width: 100%; color: var(--text); font-size: 14px; line-height: 1.65; }
.message-row.user .message-card { max-width: min(78%, 580px); padding: 9px 14px; border-radius: 18px; background: var(--surface-hover); }
.message-card p { margin: 0; overflow-wrap: anywhere; }
.message-card p + p { margin-top: 12px; }
.message-card ul, .message-card ol { margin: 8px 0; padding-left: 22px; }
.message-card pre { max-width: 100%; overflow-x: auto; margin: 14px 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--gray-1000); font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.message-card code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.message-card p code { padding: 2px 5px; border-radius: 5px; background: var(--surface-elevated); font-size: .92em; }
.message-meta { margin-top: 7px; color: var(--text-tertiary); font-size: 10px; }
.message-row.user .message-meta { display: none; }

.tool-card { width: 100%; max-width: 760px; margin: 0 auto 13px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.025); overflow: hidden; }
.tool-head { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 8px 11px; color: var(--text-secondary); font-size: 12px; }
.tool-head b { color: var(--text); font-weight: 500; }
.tool-status { margin-left: auto; color: var(--text-tertiary); font-size: 10px; }
.tool-output { max-height: 240px; overflow: auto; padding: 10px 12px; border-top: 1px solid var(--border); color: var(--text-secondary); white-space: pre-wrap; font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }

.typing-indicator { display: flex; align-items: center; gap: 4px; width: min(760px, calc(100% - 36px)); margin: 0 auto 8px; color: var(--text-tertiary); font-size: 11px; }
.typing-indicator span { width: 4px; height: 4px; border-radius: 50%; background: var(--text-secondary); animation: pulse 1.2s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: .14s; }
.typing-indicator span:nth-child(3) { animation-delay: .28s; }
.typing-indicator em { margin-left: 5px; font-style: normal; }

.composer { flex: none; padding: 6px max(14px, calc((100% - 780px)/2)) 8px; background: linear-gradient(transparent, var(--surface) 22%); }
.composer-surface-chrome { min-height: 82px; border-radius: 22px; background: var(--surface-hover); box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 0 0 1px var(--border); overflow: hidden; }
.composer textarea { width: 100%; max-height: 180px; display: block; resize: none; padding: 14px 16px 5px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; line-height: 1.45; }
.composer textarea::placeholder { color: var(--text-tertiary); }
.composer-toolbar { height: 42px; display: flex; align-items: center; gap: 7px; padding: 3px 8px 8px; }
.composer-button { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 50%; background: transparent; color: var(--text-secondary); }
.composer-button:hover { background: rgba(255,255,255,.08); color: var(--text); }
.composer-button svg { width: 20px; height: 20px; }
.composer-context { min-width: 0; display: flex; align-items: center; gap: 3px; padding: 6px 4px; background: transparent; color: var(--text-tertiary); font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.send-button { width: 30px; height: 30px; display: grid; place-items: center; flex: none; margin-left: auto; border-radius: 50%; background: var(--gray-0); color: var(--gray-1000); }
.send-button svg { width: 18px; height: 18px; stroke-width: 2.1; }
.stop-button span { width: 9px; height: 9px; border-radius: 2px; background: var(--gray-1000); }
.safe-bottom { height: env(safe-area-inset-bottom); flex: none; background: var(--surface); }

.modal-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.62); }
.modal-card { position: relative; width: min(100%, 480px); padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-elevated); box-shadow: 0 16px 42px rgba(0,0,0,.45); }
.modal-card h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.modal-card > p { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.modal-card pre { max-height: 190px; overflow: auto; padding: 12px; border-radius: 8px; background: var(--gray-1000); color: var(--gray-100); white-space: pre-wrap; font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.modal-heading { display: flex; align-items: center; justify-content: space-between; }
.settings-modal label, .input-question label { display: grid; gap: 8px; margin-top: 16px; color: var(--text-secondary); font-size: 12px; }
.settings-modal p { color: var(--text-tertiary); font-size: 11px; }
.approval-actions, .modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.primary-button, .secondary-button { min-height: 42px; flex: 1; padding: 0 14px; border-radius: 9999px; font-size: 12px; font-weight: 600; }
.secondary-button { background: rgba(255,255,255,.08); color: var(--text); }
.secondary-button:hover { background: rgba(255,255,255,.12); }
.sheet-handle { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(105px + env(safe-area-inset-bottom)); z-index: 100; max-width: calc(100vw - 32px); padding: 9px 13px; border: 1px solid var(--border); border-radius: 9999px; background: var(--surface-secondary); box-shadow: 0 8px 26px rgba(0,0,0,.35); color: var(--text); font-size: 12px; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: .18s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pulse { 0%, 65%, 100% { opacity: .35; } 32% { opacity: 1; transform: translateY(-2px); } }

@media (max-width: 760px) {
  .mobile-only { display: grid; }
  .drawer { position: fixed; inset: 0 auto 0 0; width: min(88vw, 340px); padding-top: max(10px, env(safe-area-inset-top)); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 12px 0 36px rgba(0,0,0,.38); }
  .drawer.open { transform: translateX(0); }
  .drawer-backdrop { position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.52); }
  .drawer-backdrop.show { display: block; }
  .topbar { height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0; border-bottom-color: transparent; }
  .topbar-title { flex: 1; }
  .topbar-title strong { max-width: 58vw; }
  .topbar-actions { width: 40px; justify-content: flex-end; }
  .model-badge { display: none; }
  .messages { padding: 22px 16px 16px; }
  .message-row { margin-bottom: 22px; }
  .message-row.user .message-card { max-width: 86%; }
  .composer { padding: 6px 10px 8px; }
  .composer-surface-chrome { border-radius: 22px; }
  .composer-context { max-width: 220px; }
  .empty-state { justify-content: center; padding-bottom: 10vh; }
  .empty-state h2 { font-size: 22px; }
  .suggestions { margin-top: 18px; }
  .modal-layer { place-items: end center; padding: 0; }
  .modal-card { width: 100%; max-width: none; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 20px 20px 0 0; }
  .sheet-handle { width: 38px; height: 4px; display: block; margin: -10px auto 20px; border-radius: 9999px; background: var(--gray-500); }
  .approval-actions { flex-direction: column-reverse; }
  .approval-actions button { width: 100%; }
  .login-view { padding: 22px; }
}

/* Mobile interaction stability */
button,a,[role="button"],.thread-item,.suggestions button{touch-action:manipulation}
.danger-note{color:#ff9b9b!important}
@media(max-width:760px){input,textarea,select{font-size:16px!important}.composer-toolbar{min-width:0}.composer-context{flex:1 1 auto;max-width:none;overflow:hidden}.send-button{width:32px;min-width:32px;height:32px;min-height:32px;padding:0;aspect-ratio:1;flex:0 0 32px;margin-left:0}.composer-context+.send-button{margin-left:auto}.send-button svg{display:block;width:18px;height:18px}.composer-surface-chrome{overflow:hidden}}

/* Compact, always-available controls for mobile task flow. */
.chat-layout { position: relative; }
.jump-to-bottom { position: absolute; right: max(18px, calc((100% - 780px) / 2)); bottom: calc(104px + env(safe-area-inset-bottom)); z-index: 14; min-width: 84px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid var(--border-heavy); border-radius: 999px; background: rgba(40,40,40,.95); box-shadow: 0 10px 26px rgba(0,0,0,.35); color: var(--text); backdrop-filter: blur(14px); transition: opacity .18s, transform .18s; }
.app-view.progress-active .jump-to-bottom { bottom: calc(174px + env(safe-area-inset-bottom)); }
.jump-to-bottom:hover { background: var(--surface-hover); }
.jump-to-bottom span { font-size: 18px; line-height: 1; }
.jump-to-bottom em { font-style: normal; font-size: 11px; font-weight: 600; }

.progress-pip { position: absolute; right: max(14px, calc((100% - 780px) / 2)); bottom: calc(105px + env(safe-area-inset-bottom)); left: max(14px, calc((100% - 780px) / 2)); z-index: 13; height: 58px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 15px; background: rgba(33,33,33,.96); box-shadow: 0 14px 34px rgba(0,0,0,.38); backdrop-filter: blur(20px) saturate(1.1); }
.progress-pip-track { position: absolute; inset: 0 0 auto; height: 3px; overflow: hidden; background: rgba(255,255,255,.07); }
.progress-pip-track span { display: block; width: 36%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6cbaff, #f5fbff 52%, #6cbaff); box-shadow: 0 0 14px rgba(91,178,255,.86); animation: progress-sweep 1.55s ease-in-out infinite; }
.progress-pip-main { height: 100%; display: flex; align-items: center; gap: 10px; padding: 3px 8px 1px 12px; }
.progress-pip-orb { width: 25px; height: 25px; flex: 0 0 25px; border: 2px solid rgba(255,255,255,.21); border-top-color: #9bd1ff; border-right-color: #fff; border-radius: 50%; box-shadow: 0 0 16px rgba(54,156,255,.38); animation: progress-spin 1.05s linear infinite; }
.progress-pip-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.progress-pip-copy strong, .progress-pip-copy span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.progress-pip-copy strong { color: var(--text); font-size: 12px; font-weight: 650; letter-spacing: -.01em; }
.progress-pip-copy span { color: var(--text-tertiary); font: 10px/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; }
.progress-pip-action { height: 30px; flex: none; padding: 0 9px; border-radius: 8px; background: rgba(255,255,255,.09); color: var(--text-secondary); font-size: 10px; font-weight: 650; letter-spacing: .02em; }
.progress-pip-action:hover { background: rgba(255,255,255,.16); color: var(--text); }
.progress-pip-action[disabled] { opacity: .42; cursor: default; }
.progress-pip-stop { width: 30px; height: 30px; display: grid; flex: none; place-items: center; border-radius: 8px; background: rgba(255,103,100,.16); color: #ffaaa7; }
.progress-pip-stop:hover { background: rgba(255,103,100,.26); }
.progress-pip-stop span { width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
.progress-pip.is-complete .progress-pip-track span { width: 100%; animation: none; background: linear-gradient(90deg, #40c977, #d7ffe7); box-shadow: 0 0 12px rgba(64,201,119,.68); }
.progress-pip.is-complete .progress-pip-orb { border-color: #40c977; animation: none; }
.progress-pip.is-complete .progress-pip-orb::after { display: block; content: "✓"; color: #7cf2a9; font-size: 15px; font-weight: 800; line-height: 20px; text-align: center; }
.progress-pip.is-complete .progress-pip-orb { box-shadow: 0 0 14px rgba(64,201,119,.28); }
.app-view.progress-active .messages { padding-bottom: 96px; }

@keyframes progress-sweep { 0% { transform: translateX(-115%); } 52%, 100% { transform: translateX(292%); } }
@keyframes progress-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .jump-to-bottom { right: 16px; bottom: calc(106px + env(safe-area-inset-bottom)); min-width: 40px; width: 40px; padding: 0; border-radius: 50%; }
  .jump-to-bottom em { display: none; }
  .progress-pip { right: 10px; bottom: calc(106px + env(safe-area-inset-bottom)); left: 10px; height: 56px; border-radius: 14px; }
  .progress-pip-main { padding-left: 11px; }
  .progress-pip-action { min-width: 37px; padding: 0 7px; }
  .app-view.progress-active .messages { padding-bottom: 92px; }
  .app-view.progress-active .jump-to-bottom { bottom: calc(170px + env(safe-area-inset-bottom)); }
}
