
html.tc-phone { --tcp-tabs: calc(62px + env(safe-area-inset-bottom, 0px)); --tcp-top: var(--as-top, 56px); }
html.tc-phone, html.tc-phone body { height: 100%; overflow: hidden !important; overscroll-behavior: none; background: #060d1f; }
html.tc-phone.tcp-kb { --tcp-tabs: 0px; }

html.tc-phone .tlw,
html.tc-phone .lab-view-switch,
html.tc-phone header.as-top .txa-fab,
html.tc-phone .aip-nudge,
html.tc-phone .lab-home-bar { display: none !important; }

html.tc-phone header.as-top .as-title { display: flex; align-items: center; gap: 9px; font-weight: 700; color: #fff; }
html.tc-phone .tcp-logo { width: 26px; height: 26px; border-radius: 7px; flex: none; }

html.tc-phone #codeLab {
  position: fixed !important; left: 0; right: 0; top: var(--tcp-top); bottom: var(--tcp-tabs); z-index: 5;
  display: flex !important; flex-direction: column; margin: 0 !important; padding: 0 !important; max-width: none !important; width: auto !important;
  border: 0 !important; border-radius: 0 !important; background: #060d1f; overflow: hidden; box-shadow: none !important;
}
html.tc-phone #codeLab > .lab-left, html.tc-phone #codeLab > .lab-right { flex: 1 1 auto; min-height: 0; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
html.tc-phone #codeLab[data-view="preview"] > .lab-left { display: none !important; }
html.tc-phone #codeLab:not([data-view="preview"]) > .lab-right { display: none !important; }
html.tc-phone #codeLab > .lab-left { display: flex; flex-direction: column; }

html.tc-phone #codeLab .lab-editor { flex: 1 1 auto; min-height: 0; display: flex !important; flex-direction: column; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; height: auto !important; max-height: none !important; overflow: hidden; }
html.tc-phone #codeLab .lab-editor > * { flex: none; }
html.tc-phone #codeLab .lab-panel { flex: 1 1 0 !important; min-height: 0 !important; height: auto !important; max-height: none !important; overflow: hidden; }
html.tc-phone #codeLab .lab-panel[hidden] { display: none !important; }
html.tc-phone #codeLab .lab-panel .CodeMirror { height: 100% !important; max-height: none !important; min-height: 0 !important; font-size: 13.5px; }
html.tc-phone #codeLab .lab-panel textarea { height: 100% !important; }

html.tc-phone #codeLab .lab-pbar { display: flex !important; flex-wrap: nowrap !important; align-items: center; gap: 7px; padding: 8px 10px !important; margin: 0 !important; min-height: 0; border-radius: 0 !important; border-width: 0 0 1px 0 !important; }
html.tc-phone #codeLab .lab-pbar .lab-pbtn-proj { flex: 1 1 auto; min-width: 0; height: 38px; border-radius: 11px !important; }
html.tc-phone #codeLab .lab-pbar .lab-pbtn-proj .lab-pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.tc-phone #codeLab .lab-pbar [data-track="codelab-project-new"] { flex: none; width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 11px !important; }
html.tc-phone #codeLab .lab-pbar .lab-psync { flex: none; }
html.tc-phone #codeLab .lab-pbar .lab-psync .lab-psync-t { display: none; }
html.tc-phone #codeLab .lab-pbar .lab-pbar-tools { display: flex !important; flex: none; flex-wrap: nowrap !important; width: auto !important; margin: 0 !important; gap: 0; }
html.tc-phone #codeLab .lab-pbar .lab-pbar-tools > *:not([data-track="codelab-publish-open"]) { display: none !important; }
html.tc-phone #codeLab .lab-pbar [data-track="codelab-publish-open"] { display: inline-flex !important; height: 38px; padding: 0 14px; border-radius: 11px !important; font-weight: 700; }

html.tc-phone #codeLab .lab-editor-bar { display: block !important; padding: 6px 10px 0 !important; margin: 0 !important; min-height: 0 !important; height: auto !important; }
html.tc-phone #codeLab .lab-editor-bar > .lcl-near,
html.tc-phone #codeLab .lab-editor-bar > .lab-tools,
html.tc-phone #codeLab .lab-editor-bar > .lab-askai,
html.tc-phone #codeLab .lab-editor-bar .tc-themebtn { display: none !important; }
html.tc-phone #codeLab .lab-editor-bar .lab-tabs { margin: 0 !important; padding: 0 !important; min-height: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
html.tc-phone #codeLab .lab-editor-bar .lab-tabs .lab-tab { height: 36px; min-height: 0; flex: none; }
html.tc-phone #codeLab .lab-welcome { margin: 6px 10px 0 !important; }
html.tc-phone #codeLab .lab-keys { padding: 6px 8px !important; margin: 0 !important; gap: 6px; flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
html.tc-phone #codeLab .lab-keys::-webkit-scrollbar, html.tc-phone #codeLab .lab-tabs::-webkit-scrollbar { display: none; }
html.tc-phone #codeLab .lab-keys .lab-key { flex: none; min-width: 38px; height: 38px; border-radius: 9px !important; }
html.tc-phone #codeLab .lab-keys .tcp-key { color: #7dd3fc; display: inline-grid; place-items: center; padding: 0; }
html.tc-phone #codeLab .lab-keys .tcp-key svg { width: 18px; height: 18px; }
html.tc-phone #codeLab .lab-editor-foot { display: none !important; }

html.tc-phone #codeLab > .lab-right { display: flex; flex-direction: column; }
html.tc-phone #codeLab .lab-preview { flex: 1 1 auto; min-height: 0; display: flex !important; flex-direction: column; margin: 0 !important; border: 0 !important; border-radius: 0 !important; height: auto !important; max-height: none !important; }
html.tc-phone #codeLab .lab-preview > * { flex: none; }
html.tc-phone #codeLab .lab-preview > iframe.lab-frame { flex: 1 1 0; min-height: 0; height: auto !important; max-height: none !important; width: 100% !important; }
html.tc-phone #codeLab .lab-console { flex: none; margin: 0 !important; border-radius: 0 !important; max-height: 38%; overflow: auto; }

html.tc-phone .tcp-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1270; height: var(--tcp-tabs);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; padding: 7px 4px env(safe-area-inset-bottom, 0px);
  background: #081127; border-top: 1px solid rgba(120, 170, 255, .18); box-sizing: border-box;
}
html.tc-phone.tcp-kb .tcp-tabs { display: none; }
html.tc-phone .tcp-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
  font: 600 10.5px/1.2 Inter, system-ui, sans-serif; color: #7e8fb5; -webkit-tap-highlight-color: transparent; min-width: 0; }
html.tc-phone .tcp-tab .tcp-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
html.tc-phone .tcp-ic { width: 52px; height: 30px; border-radius: 15px !important; display: grid; place-items: center; transition: background-color .15s; }
html.tc-phone .tcp-ic svg { width: 22px; height: 22px; }
html.tc-phone .tcp-tab.is-on { color: #fff; }
html.tc-phone .tcp-tab.is-on .tcp-ic { background: rgba(31, 123, 255, .22); color: #58b6ff; }
html.tc-phone .tcp-tab-ai .tcp-ic { color: #fff; background: linear-gradient(135deg, #1f7bff, #8b5cf6); box-shadow: 0 4px 16px -4px #6d5cff; }
html.tc-phone .tcp-tab-ai.is-on .tcp-ic { color: #fff; background: linear-gradient(135deg, #1f7bff, #8b5cf6); box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 4px 16px -4px #6d5cff; }
html.tc-phone .tcp-tab:focus-visible .tcp-ic { outline: 2px solid #58b6ff; outline-offset: 2px; }

html.tc-phone .txa-panel { bottom: var(--tcp-tabs) !important; top: 0 !important; height: auto !important; max-height: none !important; }
html.tc-phone .as-alerts { bottom: calc(var(--tcp-tabs) + 10px) !important; top: auto !important; }

html.tc-phone .tcp-frame { position: fixed; left: 0; right: 0; top: 0; bottom: var(--tcp-tabs); z-index: 1262; background: #060d1f; }
html.tc-phone .tcp-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #060d1f; }

html.tc-phone .tcp-sheetwrap { position: fixed; left: 0; right: 0; top: 0; bottom: var(--tcp-tabs); z-index: 1264; display: flex; align-items: flex-end; background: rgba(2, 6, 18, .62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
html.tc-phone .tcp-sheet { width: 100%; max-height: 86%; overflow-y: auto; box-sizing: border-box; padding: 10px 16px 16px; border-radius: 24px 24px 0 0 !important; background: #0c1733; border-top: 1px solid rgba(88, 182, 255, .3); color: #e6eeff; font-family: Inter, system-ui, sans-serif; animation: tcp-up .18s ease-out; }
@keyframes tcp-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.tc-phone .tcp-sheet { animation: none; } }
html.tc-phone .tcp-grab { display: block; width: 40px; height: 4px; border-radius: 3px !important; background: rgba(255, 255, 255, .25); margin: 0 auto 10px; }
html.tc-phone .tcp-sheethead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
html.tc-phone .tcp-sheethead b { font: 700 16px 'Space Grotesk', Inter, sans-serif; }
html.tc-phone .tcp-x { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px !important; border: 1px solid rgba(120, 170, 255, .2); background: rgba(255, 255, 255, .04); color: #cbd5e1; cursor: pointer; padding: 0; }
html.tc-phone .tcp-x svg { width: 17px; height: 17px; }
html.tc-phone .tcp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
html.tc-phone .tcp-tool { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 4px 11px; border-radius: 14px !important; cursor: pointer;
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(120, 170, 255, .16); font: 600 11.5px/1.25 Inter, system-ui, sans-serif; color: #d6e2fb; text-align: center; min-width: 0; }
html.tc-phone .tcp-tool:active { background: rgba(31, 123, 255, .16); }
html.tc-phone .tcp-tic { width: 38px; height: 38px; border-radius: 12px !important; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
html.tc-phone .tcp-tic svg { width: 19px; height: 19px; }
html.tc-phone .tcp-acct { display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 12px; padding: 11px 12px; border-radius: 14px !important; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(120, 170, 255, .16); color: #e6eeff; font: 500 13px Inter, system-ui, sans-serif; }
html.tc-phone .tcp-av { width: 34px; height: 34px; border-radius: 50% !important; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #a855f7); font-weight: 700; color: #fff; }
html.tc-phone .tcp-an { flex: 1; min-width: 0; }
html.tc-phone .tcp-an b { display: block; font-weight: 600; }
html.tc-phone .tcp-an small { display: block; color: #8ea0c4; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.tc-phone .tcp-acct > svg { width: 18px; height: 18px; color: #8ea0c4; flex: none; }

html.tc-phone #codeLab #labFind:not([hidden]), html.tc-phone #codeLab #labReplace:not([hidden]) { display: flex !important; flex-wrap: wrap; gap: 6px; margin: 6px 10px 0 !important; }
html.tc-phone #codeLab #labFind input, html.tc-phone #codeLab #labReplace input { flex: 1 1 120px; min-width: 0; font-size: 16px; }

html.tc-phone .tc-themepop { left: 12px !important; right: 12px !important; top: auto !important; bottom: calc(var(--tcp-tabs) + 12px) !important; width: auto !important; max-width: none !important; max-height: 62vh !important; }

html.tc-phone header.as-top [data-track="app-bell"] { display: none !important; }

html.tc-phone .tcp-hint { position: fixed; left: 0; right: 0; top: 0; z-index: 2147483000; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
  background: #0f2a55; color: #eaf2ff; font: 600 14px/1.4 Inter, system-ui, -apple-system, sans-serif; border-bottom: 1px solid rgba(127, 220, 255, .35); }
html.tc-phone .tcp-hint span { flex: 1; min-width: 0; }
html.tc-phone .tcp-hint svg { width: 16px; height: 16px; vertical-align: -3px; }
html.tc-phone .tcp-hint b { color: #7fdcff; }
html.tc-phone .tcp-hint button { flex: none; width: 32px; height: 32px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
