@@ -358,25 +358,34 @@ body { overflow: hidden; }
358358code { font-size : .9em ; }
359359
360360/* ---- 顶栏:紧凑 + 汉堡按钮 ---- */
361- .topbar { gap : 8 px ; padding : 8 px 10px ; }
361+ .topbar { gap : 6 px ; padding : 7 px 10px ; flex-wrap : nowrap; overflow : hidden ; }
362362.btn-tree {
363- width : 38 px ; height : 38 px ; flex : 0 0 38 px ; border-radius : 10px ; font-size : 19 px ; line-height : 1 ;
363+ width : 36 px ; height : 36 px ; flex : 0 0 36 px ; border-radius : 10px ; font-size : 18 px ; line-height : 1 ;
364364 color : var (--muted ); background : var (--glass ); border : 1px solid var (--line ); display : grid; place-items : center;
365365}
366366.btn-tree : hover { color : var (--accent ); border-color : var (--accent ); }
367- .brand { gap : 7px ; }
368- .brand-name { font-size : 15px ; }
369- .brand .ver { font-size : 10px ; padding : 2px 6px ; }
370- .actions { gap : 6px ; }
371- .actions .btn { padding : 8px 12px ; font-size : 12.5px ; }
372- .crumb { font-size : 11px ; }
367+ .brand { gap : 5px ; min-width : 0 ; flex : 0 0 auto; }
368+ .brand-name { font-size : 15px ; white-space : nowrap; }
369+ .brand .ver { font-size : 10px ; padding : 1px 6px ; flex : 0 0 auto; }
370+ .crumb { flex : 0 1 auto; min-width : 0 ; max-width : 90px ; font-size : 11px ; }
371+ .actions { gap : 5px ; flex : 0 0 auto; display : flex; align-items : center; min-width : 0 ; }
372+
373+ /* ed-switch 紧凑化,三按钮防撑 */
374+ .ed-switch { gap : 1px ; padding : 2px ; }
375+ .ed-switch .ed-btn { min-width : 24px ; padding : 4px 7px ; font-size : 11.5px ; letter-spacing : .3px ; }
376+
377+ /* ✓ 实时转译:在极窄屏缩为纯图标模式 */
378+ .btn .live { padding : 7px 10px ; font-size : 12px ; white-space : nowrap; }
379+
380+ /* 导出按钮:减少文字(移 ▾),更紧凑 */
381+ # btnExport .btn .solid { padding : 7px 10px ; font-size : 12px ; }
373382
374383/* 导出下拉:窄屏下铺满可读 */
375384.menu { position : fixed; left : 12px ; right : 12px ; top : 54px ; width : auto; min-width : 0 ; }
376385.menu button { padding : 12px 12px ; font-size : 14px ; }
377386
378387/* ---- 布局单列,侧栏改为左侧滑出抽屉 ---- */
379- .layout { height : calc (100vh - 54px ); }
388+ .layout { height : calc (100vh - 54px ); display : flex; flex-direction : column; min-height : 0 ; overflow : hidden; }
380389.drawer-scrim { position : fixed; inset : 0 ; z-index : 55 ; background : rgba (40 , 30 , 15 , .42 ); -webkit-backdrop-filter : blur (2px ); backdrop-filter : blur (2px ); }
381390body .drawer-open { overflow : hidden; }
382391.tree {
@@ -391,18 +400,18 @@ body.drawer-open { overflow: hidden; }
391400.tree-item .ops { display : flex; gap : 4px ; }
392401.tree-item .ops span { padding : 2px 6px ; font-size : 15px ; }
393402.tree-empty { font-size : 13px ; margin-top : 22px ; }
394- .workspace { width : 100% ; min-width : 0 ; }
403+ .workspace { width : 100% ; min-width : 0 ; min-height : 0 ; flex : 1 ; display : flex; flex-direction : column; overflow : hidden; }
395404
396405/* ---- 顶部面板:代码 / 预览 / 画布 ---- */
397406.tabs { padding : 8px 10px 0 ; gap : 2px ; }
398407.tab { flex : 1 ; text-align : center; padding : 10px 4px ; font-size : 13px ; white-space : nowrap; }
399- .pane { padding : 10px ; }
408+ .pane { padding : 10px ; flex : 1 ; min-height : 0 ; overflow : hidden; }
400409.editor-head { gap : 6px ; }
401410.shortcut { display : none !important ; }
402411.editor-snippets { gap : 6px ; }
403- .editor-snippets .snippet { padding : 7 px 11 px ; font-size : 12px ; }
412+ .editor-snippets .snippet { padding : 8 px 12 px ; font-size : 12px ; white-space : nowrap; touch-action : manipulation ; }
404413.codearea , .editor-highlight , .editor-gutter { font-size : 13px ; line-height : 1.6 ; }
405- .editor-wrap { --gutter : 40px ; }
414+ .editor-wrap { --gutter : 40px ; min-height : 0 ; }
406415.editor-wrap textarea .codearea { padding-left : calc (40px + 11px ); }
407416.editor-highlight { padding-left : calc (40px + 11px ); }
408417.editor-mark { left : 40px ; }
@@ -455,16 +464,47 @@ body.drawer-open { overflow: hidden; }
455464.statusbar { margin : 8px 10px 10px ; padding : 5px 10px ; font-size : 11px ; }
456465.sb-right { font-size : 10.5px ; }
457466
458- /* ---- 窄屏(≤400px)进一步压缩,避免横向溢出 ---- */
459- @media (max-width : 400px ) {
467+ /* ---- 极窄屏(≤360px):隐藏次要文本,仅保留核心操作 ---- */
468+ @media (max-width : 360px ) {
469+ .brand-name { font-size : 13px ; }
470+ .brand .ver { font-size : 9px ; padding : 1px 5px ; }
471+ .crumb { max-width : 60px ; }
472+ .btn .live { padding : 7px 8px ; font-size : 11px ; }
473+ .btn .live ::before { content : "" ; } /* 保持占位 */
474+ # btnExport .btn .solid { padding : 7px 8px ; font-size : 11.5px ; }
475+ .ed-switch .ed-btn { min-width : 22px ; padding : 3px 6px ; font-size : 11px ; }
476+ .btn-tree { width : 32px ; height : 32px ; flex-basis : 32px ; font-size : 17px ; border-radius : 9px ; }
477+ .topbar { padding : 6px 7px ; gap : 5px ; }
478+ .pane { padding : 8px 7px 10px ; }
479+ .editor-snippets .snippet { padding : 6px 8px ; font-size : 11px ; }
480+ .bottom-panel { margin : 6px 7px 0 ; flex-basis : 38vh ; }
481+ .statusbar { margin : 6px 7px 8px ; }
482+ }
483+
484+ /* ---- 超窄屏(≤320px):再砍一刀 ---- */
485+ @media (max-width : 320px ) {
486+ .brand-name { display : none; }
487+ .crumb { max-width : 0 ; overflow : hidden; }
488+ .brand { gap : 3px ; }
489+ .brand .ver { font-size : 9px ; padding : 1px 5px ; }
490+ .btn .live { display : none; } /* 实时转译图标隐藏 */
491+ .ed-switch .ed-btn { min-width : 20px ; padding : 3px 5px ; font-size : 10.5px ; }
492+ # btnExport .btn .solid { padding : 7px 9px ; font-size : 11px ; }
493+ .bottom-panel { flex-basis : 34vh ; }
494+ .tabs { padding : 6px 6px 0 ; }
495+ .tab { padding : 8px 2px ; font-size : 12px ; }
496+ .home-card { padding : 24px 16px ; }
497+ .home-card h1 { font-size : 21px ; }
498+ }
499+
500+ /* ---- 窄屏(≤400px):过渡优化 ---- */
501+ @media (max-width : 400px ) and (min-width : 321px ) {
460502 .topbar { padding : 7px 8px ; gap : 6px ; }
461503 .btn-tree { width : 34px ; height : 34px ; flex-basis : 34px ; }
462- .brand { gap : 5px ; min-width : 0 ; }
463- .brand-name { font-size : 14px ; white-space : nowrap; overflow : hidden; max-width : 72px ; text-overflow : ellipsis; }
504+ .brand-name { font-size : 14px ; }
464505 .brand .ver { font-size : 9.5px ; padding : 1px 5px ; }
465- .crumb { max-width : 84 px ; overflow : hidden; text-overflow : ellipsis; white-space : nowrap; display : block ; }
506+ .crumb { max-width : 80 px ; }
466507 .actions .btn { padding : 7px 10px ; font-size : 12px ; }
467- .actions .btn : first-of-type { letter-spacing : 0 ; }
468508 .pane { padding : 8px 8px 10px ; }
469509 .tabs { padding : 6px 8px 0 ; gap : 1px ; }
470510 .tab { padding : 9px 3px ; font-size : 12.5px ; letter-spacing : -.2px ; }
@@ -476,21 +516,11 @@ body.drawer-open { overflow: hidden; }
476516 .editor-wrap textarea .codearea { padding-left : calc (34px + 9px ); }
477517 .editor-highlight { padding-left : calc (34px + 9px ); }
478518 .editor-mark { left : 34px ; }
479- .bottom-panel { margin : 6px 8px 0 ; flex-basis : 42 vh ; }
519+ .bottom-panel { margin : 6px 8px 0 ; flex-basis : 40 vh ; }
480520 .btab { font-size : 12px ; padding : 8px 10px ; }
481521 .statusbar { margin : 6px 8px 8px ; }
482522 .home-card { padding : 26px 18px ; }
483523 .home-card h1 { font-size : 23px ; }
484524 .menu { left : 8px ; right : 8px ; top : 50px ; }
485525 .graph-canvas { min-height : 50vh ; }
486- }
487-
488- /* ---- 极窄屏(≤340px):隐藏次要文本,仅保留核心操作 ---- */
489- @media (max-width : 340px ) {
490- .brand-name { display : none; }
491- .crumb { max-width : 40px ; }
492- .preview-bar .preview-fname { max-width : 90px ; overflow : hidden; text-overflow : ellipsis; white-space : nowrap; }
493- .graph-tools label { font-size : 12px ; }
494- .console-filter { display : none; }
495- .home-actions .btn .big { padding : 13px 12px ; font-size : 14px ; }
496526}
0 commit comments