
body[data-controller=mini] .mobile-terminal>#thermal-dots.dual-host-metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:1fr!important;height:100%!important;width:100%!important;margin:0!important;padding:8px 12px!important;gap:8px!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important}
.device-preview{min-width:0;border:1px solid #18354d;border-radius:7px;background:#071827;display:flex;align-items:center;justify-content:center;padding:6px;gap:8px;color:#cce4f5;font:10px/1.3 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif}
.device-preview .identity{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:64px;flex:none}.device-preview .identity b{font-size:10px;font-weight:600;white-space:nowrap}.device-preview .picture{height:38px;width:42px;background-image:url('/device-reference.png');background-repeat:no-repeat;background-size:307px 205px;background-position:-104px -55px}.device-preview .picture.mini{background-position:-200px -61px;height:26px}
.device-preview .readings{width:76px;flex:none;display:grid;grid-template-columns:28px 1fr;gap:3px 4px;align-items:center}.device-preview .readings span{color:#7891a8;font:9px/1.2 -apple-system,sans-serif}.device-preview .readings b{font-size:10px;font-weight:500;white-space:nowrap;text-align:left}.device-preview .readings .activity{grid-column:1/-1;margin-top:2px;display:flex;gap:6px;font-size:8px;color:#54e1c1;white-space:nowrap}.device-preview .activity small{color:#7891a8;font-size:8px}
@media(min-width:721px){.device-preview{gap:20px;padding:8px 14px}.device-preview .identity{flex-direction:row;width:150px;gap:12px}.device-preview .identity b{font-size:12px;width:96px;text-align:left}.device-preview .picture{width:42px;height:38px}.device-preview .readings{width:148px;grid-template-columns:repeat(3,1fr);gap:5px 6px}.device-preview .readings span{grid-row:1;font-size:9px}.device-preview .readings b{grid-row:2;font-size:11px}.device-preview .activity{grid-row:3!important;font-size:9px!important;justify-content:flex-start}.device-preview .activity small{font-size:9px}}

.device-preview .activity>span{color:#54e1c1;font:inherit}.device-preview .activity small span{font:inherit;color:inherit}.device-preview[data-online="false"] .activity>span{color:#f1b84b}
/* Codex 与 Chat 使用相同外框和可用高度。 */
body[data-controller=mini] #focus-pager>.mobile-focus,body[data-controller=mini] #focus-pager>.agent-slide{padding:8px;box-sizing:border-box;height:100%;min-height:0}
#focus-pager .chat-terminal,#focus-pager .codex-empty,#focus-pager .terminal-card{height:100%;width:100%;min-height:0;box-sizing:border-box;border-radius:10px}
#focus-pager .chat-history{display:none}#focus-pager .chat-terminal{grid-template-rows:61px minmax(0,1fr)}
.codex-empty{display:grid;grid-template-rows:61px minmax(0,1fr) auto;border:1px solid var(--line);background:#081725;overflow:hidden}.codex-empty .codex-bar{height:61px!important;min-height:0!important;display:flex!important;align-items:center;padding:12px!important;border:0;border-bottom:1px solid var(--line);font-size:12px}.codex-empty .empty-message{display:grid;place-content:center;gap:8px;text-align:center;color:var(--muted);font-size:10px}.empty-message b{color:var(--cyan);font-size:14px}
@media(max-width:720px){body[data-controller=mini] .mobile-terminal:has(#mobile-task-list:empty),body[data-controller=mini] .mobile-terminal:has(#mobile-task-list>.terminal-empty){grid-template-rows:112px 61px minmax(0,1fr) 54px!important}}
@media(max-width:359px){.device-preview{gap:4px;padding:4px}.device-preview .identity{width:56px}.device-preview .identity b{font-size:9px}.device-preview .readings{width:68px;grid-template-columns:24px 1fr}}
/* 恢复原版底部列表至少132px；窄而高的窗口正文不无限拉长。 */
@media(max-width:720px){body[data-controller=mini] .mobile-terminal,body[data-controller=mini] .mobile-terminal:has(#mobile-task-list:empty),body[data-controller=mini] .mobile-terminal:has(#mobile-task-list>.terminal-empty){grid-template-rows:112px 61px minmax(0,min(130vw,calc(var(--app-height,100dvh) - 355px))) minmax(132px,1fr)!important}body[data-controller=mini] #mobile-task-list{min-height:132px;height:100%;overflow-y:auto}body[data-controller=mini] #focus-pager{min-height:0;max-height:100%;overflow:hidden}}

/* Codex 和 Chat 使用相同的原输入组件尺寸、边距和按钮。 */
.codex-empty .codex-compose{display:flex;flex-direction:column;gap:0;padding:9px 12px 10px;border-top:1px solid var(--line);background:#06111def}
.codex-compose .chat-compose-row{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px}
.codex-compose .follow-attach{width:44px;height:44px;border:0;border-radius:50%;background:#d3ebff0b;color:#bdcfdf}
.codex-compose .attachment-icon{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
.codex-compose textarea{font:inherit;font-size:16px;line-height:1.35}
.codex-empty{background:linear-gradient(155deg,#071827,#050d17);border-color:var(--line)}
.codex-empty .codex-bar{background:#071522}
.codex-empty .codex-compose textarea{font-family:inherit;font-size:15px;line-height:22px;padding:10px 12px;border-radius:20px;min-width:0}
.codex-empty .codex-compose .follow-attach{font-size:16px}
#focus-pager .codex-empty{border-width:2px}
/* 已有 Codex 会话沿用原跟进事件，只统一输入栏的视觉参数。 */
#focus-pager .terminal-card .follow{gap:8px;padding:9px 0 10px;background:#06111def}
#focus-pager .terminal-card .follow .follow-text{min-width:0;height:44px;font-family:inherit;font-size:15px;line-height:22px;padding:10px 12px;border:1px solid #294761;border-radius:20px;background:#081725;color:var(--ink)}
#focus-pager .terminal-card .follow .follow-attach{flex:0 0 44px;width:44px;height:44px;border:0;border-radius:50%;background:#d3ebff0b;color:#bdcfdf}
#focus-pager .terminal-card .follow .follow-send{flex:0 0 44px;width:44px;height:44px;border-radius:50%}
.codex-empty .codex-compose .follow-attach:not(:disabled){display:grid;place-items:center;background:#d3ebff0b;color:#bdcfdf;box-shadow:none}

/* 只给现有附件按钮补上与输入框相同的蓝色描边。 */
body #chat-compose #chat-attach,body .codex-empty .codex-compose .follow-attach,body #focus-pager .terminal-card .follow .follow-attach{border:1px solid #294761!important;box-sizing:border-box}
body .chat-attachment .document-attachment,body .follow-attachment-preview .document-attachment{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:4px;border:0;background:#0a2030;color:#cce4f5;font:9px/1.3 -apple-system,sans-serif;white-space:normal;overflow-wrap:anywhere;overflow:hidden}
/* 附件缩略项的移除按钮保持小尺寸，不继承发送按钮的大小。 */
body .chat-compose .follow-attachment-preview>span>button,body .chat-compose .chat-attachment>button{position:absolute;right:2px;top:2px;width:17px;height:17px;min-height:0;padding:0;border:0;border-radius:50%;background:#03101bd9;color:#fff;font-size:14px;font-weight:400;line-height:17px;box-shadow:none}
body .chat-compose .follow-attachment-preview>span:has(.document-attachment),body .chat-attachment:has(.document-attachment){flex-basis:108px;width:108px;height:46px}
body .chat-compose .document-attachment{padding:5px 20px 5px 6px;text-align:left;justify-content:flex-start}
/* 收紧用户标注的设备区留白，保留双卡与原字号层级。 */
@media(max-width:720px){body[data-controller=mini] .mobile-terminal,body[data-controller=mini] .mobile-terminal:has(#mobile-task-list:empty),body[data-controller=mini] .mobile-terminal:has(#mobile-task-list>.terminal-empty){grid-template-rows:92px 61px minmax(0,min(130vw,calc(var(--app-height,100dvh) - 335px))) minmax(132px,1fr)!important}
body[data-controller=mini] .mobile-terminal>#thermal-dots.dual-host-metrics{padding:5px 8px!important;gap:8px!important}
.device-preview{padding:6px 8px;gap:10px;justify-content:center}.device-preview .identity{width:64px;flex:0 0 64px}.device-preview .readings{width:76px;flex:0 0 76px;grid-template-columns:24px 46px;column-gap:6px}.device-preview .readings b{text-align:left}.device-preview .activity{justify-content:space-between;gap:2px!important}}
header .model-cell:before{background-image:url('/icon-512.png')!important}.brand .mark{background-image:url('/icon-512.png')!important}
@media(max-width:720px){.device-preview .readings .activity{justify-content:flex-start;gap:4px!important}}

/* 较宽的竖屏仅增加设备图与参数组间距，不拉开参数和值。 */
@media(min-width:480px) and (max-width:720px){.device-preview{gap:18px}.device-preview .identity{width:88px;flex-basis:88px}}
@media(max-width:359px){.device-preview{padding:4px;gap:4px}.device-preview .identity{width:56px;flex-basis:56px}.device-preview .readings{width:70px;flex-basis:70px;grid-template-columns:24px 40px}}

.device-preview .connection-dot{color:#54e1c1!important}.device-preview[data-online="false"] .connection-dot{color:#ff7185!important}#remote-latency{margin-left:auto;margin-right:64px;color:var(--muted);font:10px/1.3 -apple-system,sans-serif;white-space:nowrap;font-variant-numeric:tabular-nums}
#mobile-quick{position:relative;padding-right:176px!important}#mobile-quick #remote-latency{position:absolute;right:70px;top:50%;transform:translateY(-50%);display:block;margin:0;max-width:100px;overflow:hidden;text-overflow:ellipsis}

/* 保持卡片尺寸，仅增加设备筛选的轻微高亮。 */
.device-preview[role="button"]{cursor:pointer;transition:border-color .18s,box-shadow .18s,background .18s}
.device-preview.device-selected{border-color:#58c9e1!important;background:rgba(38,94,119,.22)!important;box-shadow:inset 0 0 18px #58c9e113,0 0 0 1px #58c9e12b}
.device-preview[role="button"]:focus-visible{outline:2px solid #58c9e1;outline-offset:2px}

.observed-stop{height:max-content;min-height:28px;padding:5px 8px;border:1px solid #8b3442;border-radius:5px;background:#3a1520;color:#ff8c9d;font:inherit;font-size:10px;white-space:nowrap;cursor:pointer}
.observed-stop:disabled{opacity:.45;cursor:not-allowed}
