.mobile-toolbar,.mobile-login-card,.mobile-home-intro{display:none}
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 html{height:100%;overflow:hidden;overscroll-behavior:none}
 body,body.desktop-workspace,body.desktop-workspace.list-collapsed{display:flex;flex-direction:column;grid-template-columns:none;width:100%;max-width:100%;height:var(--mobile-height,100dvh);min-height:0;overflow:hidden;margin:0;font-size:15px;background:var(--paper,#000)}
 body.desktop-workspace.dark{--paper:#000;--panel:#151618;--text:#f1f4f8;--muted:#949ba5;--line:#25282d;--accent:#4699ff;--accent-soft:#14273e}
 body .sidebar,body.desktop-workspace .sidebar{position:relative;inset:auto;display:flex;flex-direction:row;align-items:center;flex:0 0 auto;gap:8px;width:100%;height:calc(68px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 0 0 10px;border-right:0;border-bottom:1px solid var(--line);background:var(--paper);overflow:hidden;z-index:10}
 body.desktop-workspace .account-avatar{position:static;flex:0 0 38px;width:38px;height:38px;margin:0;border-radius:11px;font-size:21px;box-shadow:0 0 0 1px #ffffff0d}
 body .sidebar nav,body.desktop-workspace .sidebar nav{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex:1;gap:4px;min-width:0;width:0;height:100%;padding:0 12px 0 0;margin:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x}
 body .sidebar nav::-webkit-scrollbar{display:none}
 body.desktop-workspace .sidebar .nav,body.desktop-workspace .sidebar .nav[data-page=settings]{position:static;display:flex;flex:0 0 auto;flex-direction:column;align-items:center;justify-content:center;scroll-snap-align:center;gap:4px;min-width:66px;width:auto;min-height:52px;height:52px;padding:6px 9px;border-radius:11px;white-space:nowrap;font-size:11px;line-height:1.2;color:var(--muted);font-weight:500;background:transparent}
 body.desktop-workspace .sidebar .nav span{font-size:20px;line-height:21px;width:auto}
 body.desktop-workspace .sidebar .nav.active{background:var(--accent-soft);color:var(--accent)}
 body .sidebar .brand,body .sidebar .side-bottom,body .sidebar .nav-label{display:none!important}
 .mobile-toolbar{display:flex;flex:0 0 62px;align-items:center;gap:9px;min-width:0;padding:8px 14px;border-bottom:1px solid var(--line);background:var(--paper);z-index:8}
 .mobile-heading{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.mobile-heading h1{font:600 19px/1.2 -apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft Yahei',sans-serif;letter-spacing:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-heading>span{font-size:11px;line-height:1.2;color:var(--muted)}.mobile-heading>span:empty{display:none}
 .mobile-back{height:44px;width:33px;flex:0 0 33px;font-size:38px;line-height:1;color:var(--text);padding:0;text-align:left}
 .mobile-action{flex:0 0 auto;border:0;border-radius:9px;min-height:40px;min-width:46px;padding:9px 12px;background:var(--accent-soft);color:var(--accent);font-size:13px;font-weight:600;white-space:nowrap}
 .mobile-sync{flex:0 0 27px;width:27px;height:40px;padding:0;color:var(--muted);font-size:9px}.mobile-sync.synced{color:#39c99b}
 body.desktop-workspace .desktop-secondary,body.desktop-workspace.list-collapsed .desktop-secondary{display:none;grid-column:auto;height:auto;flex:1;min-height:0;width:100%;border:0;background:var(--paper);overflow:hidden}
 body.desktop-workspace[data-mobile-view=list] .desktop-secondary{display:flex;flex-direction:column}
 body.desktop-workspace .secondary-heading{display:none}
 body.desktop-workspace #secondary-body{display:block;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:14px 12px 22px;overscroll-behavior-y:contain;scrollbar-width:thin}
 body.desktop-workspace .sync-state{flex:0 0 auto;width:100%;min-height:32px;padding:8px 15px calc(8px + env(safe-area-inset-bottom));text-align:left;font-size:10px;border-top:1px solid var(--line);color:var(--muted);background:var(--paper)}
 body main,body.desktop-workspace main,body.desktop-workspace.list-collapsed main,body.desktop-workspace[data-module=notes] main{display:block;flex:1;min-height:0;min-width:0;height:auto;width:100%;margin:0;max-width:none;padding:14px 12px calc(24px + env(safe-area-inset-bottom));overflow-x:hidden;overflow-y:auto;grid-column:auto;overscroll-behavior-y:contain}
 body.desktop-workspace[data-mobile-view=list] main{display:none}
 body.desktop-workspace main>header{display:none}
 body.desktop-workspace .page{max-width:none;margin:0;width:100%;min-width:0}
 body.desktop-workspace .panel{padding:18px 16px;margin:0 0 14px;border-radius:14px;min-width:0}
 body.desktop-workspace h2{font-size:21px;letter-spacing:0}body.desktop-workspace h3{font-size:15px}body.desktop-workspace p{overflow-wrap:anywhere}
 body.desktop-workspace input,body.desktop-workspace select,body.desktop-workspace textarea{font-size:16px;max-width:100%;min-width:0;border-radius:10px;min-height:44px}
 body.desktop-workspace button,body.desktop-workspace a{touch-action:manipulation}
 body.desktop-workspace .primary,body.desktop-workspace .secondary{min-height:44px;border-radius:9px;padding:10px 14px;font-size:13px}
 body.desktop-workspace .icon-btn{min-height:44px;width:44px}
 body.desktop-workspace .field{font-size:12px;gap:8px;margin:14px 0}
 body.desktop-workspace .inline-actions{gap:8px;flex-wrap:wrap;min-width:0}
 body.desktop-workspace .fields-grid{grid-template-columns:minmax(0,1fr);gap:0}
 body.desktop-workspace .panel-heading{gap:12px;min-width:0;margin-bottom:16px}
 body.desktop-workspace .desktop-list-row,body.desktop-workspace[data-module=notes] #note-list .desktop-list-row{display:flex;width:100%;min-width:0;min-height:83px;padding:17px 16px;border:1px solid var(--line);border-radius:12px;margin:0 0 10px;gap:8px;background:var(--panel);text-align:left;overflow:hidden}
 body.desktop-workspace .desktop-list-row strong,body.desktop-workspace[data-module=notes] #note-list strong{font-size:16px;font-weight:550;line-height:1.4;max-width:100%;color:var(--text)}
 body.desktop-workspace .desktop-list-row small,body.desktop-workspace[data-module=notes] #note-list small{font-size:12px;line-height:1.5;color:var(--muted)}
 body.desktop-workspace .desktop-list-row.selected,body.desktop-workspace[data-module=notes] #note-list .desktop-list-row.selected{background:var(--panel);border-color:var(--line)}
 body.desktop-workspace .desktop-list-row:active{background:var(--accent-soft);border-color:var(--accent)}
 body.desktop-workspace #secondary-body>.secondary:first-child,body.desktop-workspace #secondary-body>.text-btn{display:none}
 body.desktop-workspace .secondary-controls,body.desktop-workspace[data-module=notes] .secondary-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;padding:0 0 14px;min-width:0;border:0;width:100%;margin:0;background:var(--paper)}
 body.desktop-workspace .secondary-controls>input{grid-column:1/-1;width:100%;min-width:0;margin:0}
 body.desktop-workspace .secondary-controls select{width:100%;font-size:14px;min-height:42px}
 body.desktop-workspace .secondary-controls>#note-new,body.desktop-workspace .secondary-controls>#book-import,body.desktop-workspace .secondary-controls>#community-refresh{display:none}
 body.desktop-workspace .secondary-controls .text-btn{font-size:12px;min-height:42px;white-space:nowrap;padding:8px}
 body.desktop-workspace #secondary-body #note-list,body.desktop-workspace[data-module=notes] #note-list,body.desktop-workspace #secondary-body #room-list,body.desktop-workspace #secondary-body .resource-grid{display:flex;flex-direction:column;gap:0;min-width:0;width:100%;max-height:none;margin:0;overflow:visible}
 body.desktop-workspace #secondary-body #room-list .list-item{min-height:79px;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:16px 10px;background:transparent}
 body.desktop-workspace #secondary-body #room-list .list-item strong{font-size:16px;display:block;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.desktop-workspace #secondary-body #room-list .list-item small{font-size:12px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.desktop-workspace #secondary-body .resource-card{display:block;position:relative;min-width:0;max-width:100%;margin:0 0 11px;padding:17px;border:1px solid var(--line);border-radius:13px;background:var(--panel)}
 body.desktop-workspace #secondary-body .resource-card h3{font-size:16px;line-height:1.6;margin:0 0 9px}
 body.desktop-workspace #secondary-body .resource-card p{font-size:12px;line-height:1.6;max-height:40px;overflow:hidden;margin:8px 0}
 body.desktop-workspace #secondary-body .resource-card .forum-cover{float:none;width:100%;height:135px;margin:0 0 13px;object-fit:cover;border-radius:8px}
 body.desktop-workspace #secondary-body .resource-card button{min-height:40px;font-size:12px}
 body.desktop-workspace #secondary-body .resource-card .inline-actions{margin-top:12px}
 body.desktop-workspace #forum-search-form{display:block;grid-column:1/-1;margin:0;width:100%}
 body.desktop-workspace #forum-search-form>.field{margin:0 0 10px}
 body.desktop-workspace #forum-search-form>.inline-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:end}
 body.desktop-workspace #forum-search-form .inline-actions .field{margin:0;gap:5px;font-size:11px}
 body.desktop-workspace #forum-search-form select{font-size:13px;padding:8px;min-height:42px}
 body.desktop-workspace #forum-search-form button{min-height:42px;padding:8px 12px}
 body.desktop-workspace #forum-status{grid-column:1/-1;font-size:11px;margin:0}
 body.desktop-workspace .empty-state{font-size:13px;padding:38px 22px;line-height:1.9;width:100%}
 .mobile-login-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:48px 20px 35px;margin:15px 0;border:1px solid var(--line);border-radius:17px;background:var(--panel)}
 .mobile-empty-icon{display:grid;place-items:center;width:64px;height:64px;border-radius:19px;background:var(--accent-soft);color:var(--accent);font-size:30px;margin-bottom:14px}
 .mobile-login-card h2{margin:9px 0;font-size:21px}.mobile-login-card p{font-size:13px;line-height:1.8;color:var(--muted);margin:5px 0 22px}.mobile-login-card .primary{width:100%;max-width:260px}
 body.mobile-chat-guest #secondary-body>.secondary-controls,body.mobile-chat-guest #room-list{display:none!important}
 .mobile-home-intro{display:block;padding:12px 5px 24px}.mobile-home-intro h2{font-size:25px!important;line-height:1.5;margin:9px 0 12px;font-weight:600}.mobile-home-intro p{font-size:12px;color:var(--muted);line-height:1.8;margin:4px 0}.mobile-home-intro #mobile-today{font-size:12px;color:var(--accent)}
 body.desktop-workspace #home>.welcome{display:none}
 body.desktop-workspace .home-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
 body.desktop-workspace .home-card{padding:18px 14px;min-height:144px;border-radius:14px}
 body.desktop-workspace .home-icon{width:36px;height:36px;font-size:22px;border-radius:11px;margin:0 0 16px}
 body.desktop-workspace .home-card strong{font-size:15px;font-weight:550;letter-spacing:0}
 body.desktop-workspace .home-card p{font-size:11px;line-height:1.7;margin-top:9px}
 body.desktop-workspace footer{margin:18px 3px 0;font-size:10px;line-height:1.8}
 body.desktop-workspace #practice>.welcome{display:none}
 body.desktop-workspace .practice-grid{display:block}
 body.desktop-workspace .counter-card{padding:17px 14px;border-radius:16px;margin-bottom:14px}
 body.desktop-workspace .card-top{margin-bottom:8px}
 body.desktop-workspace .mantra{margin:18px 0 9px}.mobile-workspace .mantra>.overline{display:none}
 body.desktop-workspace .mantra h2{font-size:21px;line-height:1.5;letter-spacing:1px;margin:0 0 6px}
 body.desktop-workspace .counter{width:260px;height:260px;max-width:100%;margin:8px auto 0;aspect-ratio:1}
 body.desktop-workspace .count-actions{display:flex;gap:8px;justify-content:space-between;margin:17px 0 10px}
 body.desktop-workspace .count-actions button{min-height:44px;flex:1;font-size:12px;padding:8px 4px;border-radius:9px}
 body.desktop-workspace .counter-footer{padding:10px 0;font-size:10px}
 body.desktop-workspace .right-stack{display:block}.mobile-workspace .goal-stats{gap:16px}.mobile-workspace .goal-value{margin-top:18px}
 body.desktop-workspace .record-summary{flex-wrap:wrap;font-size:13px;gap:13px;padding-top:8px}
 body.desktop-workspace .table-wrap{overflow-x:auto;max-width:100%}.mobile-workspace th,.mobile-workspace td{padding:14px 7px;white-space:nowrap;font-size:12px}
 .mobile-options{padding:14px;margin-bottom:14px;background:var(--panel);border:1px solid var(--line);border-radius:14px;min-width:0}
 .mobile-options>.empty-state{display:none}.mobile-options .secondary-controls{display:flex!important;flex-wrap:wrap;gap:10px;padding:0!important;background:transparent!important}
 .mobile-options>.secondary-controls>.field{flex:1;min-width:120px}.mobile-options #calendar-date{width:100%;margin-bottom:8px}.mobile-options #month-prev,.mobile-options #month-next{flex:1}.mobile-options #month-today{flex:2}
 .mobile-options .field{margin:0!important}.mobile-options #world-add{display:flex;align-items:end;gap:9px}.mobile-options #world-add>.field{flex:1}.mobile-options #world-compare{width:100%}
 body.desktop-workspace #sun>.welcome,body.desktop-workspace #calendar>.welcome{display:none}
 body.desktop-workspace .calendar-toolbar{justify-content:center}.mobile-workspace .calendar-toolbar h2{font-size:18px;margin:0}
 body.desktop-workspace .calendar-grid,.mobile-workspace .calendar-weekdays{gap:3px}.mobile-workspace .calendar-weekdays{padding:13px 0;font-size:11px}.mobile-workspace .calendar-day{min-width:0;min-height:65px;padding:9px 1px;gap:6px;border-radius:8px}.mobile-workspace .calendar-day b{font-size:18px}.mobile-workspace .calendar-day small{font-size:8px;max-width:100%;overflow:hidden}
 body.desktop-workspace .calendar-detail{padding:16px;margin:16px 0}.mobile-workspace .calendar-detail strong{font-size:18px}
 body.desktop-workspace .sun-result{grid-template-columns:1fr;gap:9px;margin:17px 0}.mobile-workspace .sun-stat{display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px;padding:16px;text-align:left}.mobile-workspace .sun-stat strong{font-size:28px;grid-column:2;grid-row:1/3;margin:0}.mobile-workspace .sun-stat small{font-size:10px}
 body.desktop-workspace .world-clocks{grid-template-columns:minmax(0,1fr);gap:11px;margin-top:0}.mobile-workspace .clock-card{padding:17px}.mobile-workspace .clock-card strong{font-size:37px;margin:15px 0}.mobile-workspace .clock-card p{font-size:11px}
 body.desktop-workspace .profile-heading{gap:15px;margin:14px 3px 25px}.mobile-workspace .profile-big-avatar{width:57px;height:57px;font-size:28px;border-radius:14px}.mobile-workspace .profile-heading h2{margin:0 0 8px;font-size:20px}.mobile-workspace #profile-email{font-size:12px;line-height:1.8;overflow-wrap:anywhere}
 body.desktop-workspace #profile .panel{width:100%;max-width:none}.mobile-workspace #profile .inline-actions>button{flex:1 1 auto;font-size:12px}.mobile-workspace #account-info{font-size:11px;padding:14px}.mobile-workspace .profile-heading>div{min-width:0}
 body.desktop-workspace .setting{display:flex;align-items:center;flex-wrap:wrap;padding:19px 0;gap:12px}.mobile-workspace .setting p{font-size:11px;line-height:1.7}.mobile-workspace .setting h3{font-size:14px;margin-bottom:5px}.mobile-workspace .setting>div:first-child{flex:1;min-width:160px}.mobile-workspace .setting input:not([type=checkbox]){max-width:100%;min-width:0}.mobile-workspace .setting input[type=checkbox]{min-height:22px}.mobile-workspace .backup-actions{flex-wrap:wrap}.mobile-workspace .prose{padding:20px 16px}.mobile-workspace .prose textarea{font-size:16px}
 body.desktop-workspace[data-module=notes] main{padding:0;display:flex;flex-direction:column;overflow:hidden}
 body.desktop-workspace[data-mobile-view=list][data-module=notes] main{display:none}
 body.desktop-workspace[data-module=notes] #notes.active{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;margin:0}
 body.desktop-workspace[data-module=notes] #notes>.panel{padding:16px 17px 0;margin:0;border:0;border-radius:0;flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;background:var(--paper)}
 body.desktop-workspace[data-module=notes] .notes-layout{margin:0;display:flex;flex:1;min-height:0;gap:0;width:100%}
 body.desktop-workspace[data-module=notes] #note-editor:not([hidden]){flex:1;min-height:0;width:100%;padding:0}
 body.desktop-workspace[data-module=notes] #note-title{font-size:22px;min-height:46px;line-height:1.5;padding:5px 0 14px;letter-spacing:0;border-radius:0}
 body.desktop-workspace[data-module=notes] #note-body{font-size:16px;line-height:1.85;min-height:0;flex:1;resize:none;padding:0 0 20px;border-radius:0}
 body.desktop-workspace[data-module=notes] .notes-toolbar{display:flex;flex-wrap:nowrap;gap:4px;padding:5px 11px;min-height:49px;overflow-x:auto;flex:0 0 auto;background:var(--panel);scrollbar-width:none}
 body.desktop-workspace[data-module=notes] .notes-toolbar>span{display:none}.mobile-workspace .note-tool{min-height:40px;padding:8px 10px;font-size:12px;flex:0 0 auto}
 body.desktop-workspace[data-module=notes] .note-findbar{display:none}.mobile-workspace .notes-editor-footer{padding:8px 17px calc(8px + env(safe-area-inset-bottom));font-size:10px;background:var(--paper)}
 body.desktop-workspace[data-module=notes] #notes>.panel>details{font-size:11px;margin:0;padding:8px 0;max-height:120px;overflow:auto}.mobile-workspace #note-saved{font-size:10px;line-height:1.5}.mobile-workspace #note-copy-rich{min-height:44px;font-size:12px}
 body.desktop-workspace[data-module=chat][data-mobile-view=detail] main{display:flex;flex-direction:column;padding:0;overflow:hidden}
 body.desktop-workspace[data-module=chat][data-mobile-view=detail] #chat.active{display:flex;flex-direction:column;flex:1;min-height:0}
 body.desktop-workspace[data-module=chat][data-mobile-view=detail] #chat>.panel{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;border:0;margin:0;padding:0;background:var(--paper)}
 .mobile-workspace #chat>.panel>.panel-heading{display:none}
 body.desktop-workspace #people-chat:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0;margin:0}
 body.desktop-workspace #people-chat>.panel-heading{padding:7px 13px;margin:0;flex:0 0 auto;border-bottom:1px solid var(--line)}.mobile-workspace #room-title,.mobile-workspace #account-logout{display:none}
 body.desktop-workspace #people-chat>.panel-heading .inline-actions{width:100%;justify-content:flex-end;gap:8px}.mobile-workspace #people-chat>.panel-heading button{min-height:34px;font-size:11px;padding:7px 10px}
 body.desktop-workspace .chat-messages{flex:1;min-height:0;max-height:none;margin:0;padding:15px 12px;gap:14px;overflow-y:auto;overscroll-behavior-y:contain}
 body.desktop-workspace .chat-bubble{padding:12px 14px;max-width:87%;font-size:15px;line-height:1.7;border-radius:12px}.mobile-workspace .chat-bubble small{font-size:10px}
 body.desktop-workspace #people-form{flex:0 0 auto;margin:0;padding:9px 12px calc(9px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--panel)}.mobile-workspace #people-form>.field{font-size:0;gap:0;margin:0 0 7px}.mobile-workspace #people-input{height:58px;min-height:44px;max-height:120px;font-size:16px;line-height:1.5;resize:vertical}.mobile-workspace #people-form .panel-heading{margin:0;gap:8px;flex-wrap:nowrap}.mobile-workspace #people-queue{font-size:10px;line-height:1.4;flex:1;min-width:0}.mobile-workspace #people-send{min-width:74px;min-height:40px}
 body.desktop-workspace #redbook>.panel>.panel-heading{display:none}.mobile-workspace #forum-close{display:none}.mobile-workspace #forum-detail{padding-top:0;margin-top:0!important}.mobile-workspace #forum-detail h2{font-size:22px;line-height:1.6;margin:0}.mobile-workspace #forum-author{font-size:11px;line-height:1.7}.mobile-workspace #forum-body{font-size:16px;line-height:1.9;padding:12px 0;max-height:none;overflow:visible}.mobile-workspace .forum-media{gap:12px;margin:16px 0}.mobile-workspace #forum-reactions{margin:18px 0}.mobile-workspace #forum-reply{font-size:16px}
 .mobile-workspace #library>.panel{border-radius:12px}.mobile-workspace #reader{margin:0}.mobile-workspace .reader-body{padding:17px 0;font-size:17px;line-height:1.95;max-height:none;overflow:visible}.mobile-workspace .reader-controls{display:flex;flex-wrap:wrap;gap:10px}.mobile-workspace .reader-controls .field{flex:1 1 100%;max-width:none}.mobile-workspace .reader-controls button{min-height:42px}.mobile-workspace .reader-pdf{height:65vh}
 body.desktop-workspace.focus{display:flex;flex-direction:column}.mobile-workspace.focus .mobile-toolbar{display:none}.mobile-workspace.focus main{padding:48px 12px 20px!important;max-width:none}.mobile-workspace.focus .counter{width:min(80vw,340px);height:min(80vw,340px)}
 body.desktop-workspace dialog{max-width:calc(100vw - 24px);max-height:calc(var(--mobile-height,100dvh) - 30px);padding:22px 18px;border-radius:15px;overflow:auto}.mobile-workspace dialog input,.mobile-workspace dialog textarea{font-size:16px}
 body.desktop-workspace #toast{max-width:calc(100vw - 30px);width:max-content;bottom:calc(18px + env(safe-area-inset-bottom));font-size:12px;line-height:1.6}
}
@media(max-width:350px){.mobile-toolbar{padding-left:10px;padding-right:10px}.mobile-heading h1{font-size:17px}.mobile-action{padding:8px 10px}.mobile-workspace .home-card{padding:16px 11px}.mobile-workspace .home-card strong{font-size:14px}.mobile-workspace .counter{width:235px;height:235px}}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.mobile-workspace #note-title:focus-visible,body.mobile-workspace #note-body:focus-visible{outline:none}body.mobile-workspace .counter-footer>span:first-child{font-size:0}body.mobile-workspace .counter-footer>span:first-child:before{content:"轻触计数 · 自动保存";font-size:10px}}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.mobile-workspace .account-avatar{width:44px;height:44px;flex-basis:44px}body.mobile-workspace .mobile-back{width:44px;flex-basis:44px}body.mobile-workspace #reader-close{display:none}body.mobile-workspace[data-module=notes] #notes>.panel>details{display:none}body.mobile-workspace .mobile-trash{display:block;margin:20px 4px;color:var(--muted);font-size:13px}body.mobile-workspace .mobile-trash>summary{padding:12px 0;min-height:44px}body.mobile-workspace .mobile-trash #note-trash{margin-top:4px}body.mobile-workspace .mobile-trash .list-item{font-size:13px;padding:14px}body.mobile-workspace .mobile-trash button{min-height:40px;float:right;font-size:12px;padding:8px 12px}body.mobile-workspace[data-module=notes] #notes>.panel{padding-bottom:4px}}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.desktop-workspace[data-module=library][data-mobile-view=detail] main{display:flex;flex-direction:column;padding:0;overflow:hidden}body.desktop-workspace[data-module=library][data-mobile-view=detail] #library.active{display:flex;flex-direction:column;flex:1;min-height:0}body.desktop-workspace[data-module=library][data-mobile-view=detail] #reader:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0;margin:0;border:0;border-radius:0;padding:14px 16px 10px}body.mobile-workspace #reader>.panel-heading{flex:0 0 auto;margin-bottom:8px}body.mobile-workspace #reader-title{font-size:18px;line-height:1.5;margin:0}body.mobile-workspace #reader .reader-controls{flex:0 0 auto;gap:8px;margin-bottom:6px}body.mobile-workspace #reader .reader-controls .field{margin:8px 0}body.mobile-workspace #reader-body{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior-y:contain;padding:14px 0;font-size:17px;line-height:1.95}body.mobile-workspace #reader-pdf{flex:1;min-height:0;height:auto;margin:8px 0}body.mobile-workspace #reader-bookmarks{flex:0 0 auto;max-height:90px;overflow-y:auto;margin:8px 0}}

/* Hongshu has one fixed navigation strip; its page heading scrolls with the feed. */
.mobile-compose-fab{display:none}
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 body.mobile-workspace[data-mobile-module=redbook] .mobile-toolbar{position:static;min-height:62px;margin:-14px -12px 14px;width:calc(100% + 24px);flex-shrink:0;z-index:auto}
 body.mobile-workspace[data-mobile-module=redbook] #secondary-body{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
 body.mobile-workspace[data-mobile-module=redbook] .sync-state{display:none}
 body.mobile-workspace .mobile-compose-fab{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:calc(22px + env(safe-area-inset-bottom));display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:52px;min-width:100px;padding:13px 18px;border:0;border-radius:17px;background:var(--accent);color:#fff;font-size:15px;font-weight:600;line-height:1.4;box-shadow:0 8px 28px #0007;z-index:12;touch-action:manipulation}
 body.mobile-workspace:has(#forum-compose-dialog[open]) .mobile-compose-fab{visibility:hidden}
}
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 body.mobile-workspace[data-module=home]>.mobile-toolbar{display:none}
 body.desktop-workspace[data-module=home] main{padding:10px 10px calc(16px + env(safe-area-inset-bottom))}
 body.desktop-workspace #home #profile-auth{padding:12px;margin-bottom:10px;border-radius:12px;scroll-margin-top:10px}
 body.desktop-workspace #home .profile-heading{margin:0 0 10px;gap:9px}body.desktop-workspace #home .profile-heading h2{font-size:16px;margin:0 0 2px}body.desktop-workspace #home #profile-email{font-size:11px;line-height:1.5}
 body.desktop-workspace #home #account-login{grid-template-columns:minmax(0,1fr);gap:8px}
 body.desktop-workspace #home #account-login .field{font-size:0;gap:0;margin:0}
 body.desktop-workspace #home #account-login input{font-size:16px;height:44px;min-height:44px}
 body.desktop-workspace #home #account-login .inline-actions,body.desktop-workspace #home #account-login-button{width:100%;min-height:44px}
 body.desktop-workspace #home #account-panel>p{display:none}body.desktop-workspace #home #community-status{font-size:10px;margin-top:6px}
 body.desktop-workspace #home .home-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body.desktop-workspace #home .home-card{min-height:84px;padding:12px 10px;grid-template-columns:27px minmax(0,1fr);column-gap:7px;border-radius:12px}
 body.desktop-workspace #home .home-icon{width:27px;height:30px;font-size:19px;border-radius:8px}
 body.desktop-workspace #home .home-card strong{font-size:14px;line-height:1.4}body.desktop-workspace #home .home-card p{font-size:10px;line-height:1.5;margin:3px 0 0}
 body.desktop-workspace #home #account-info{padding:8px 10px;font-size:11px}
 body.desktop-workspace #home .home-account-details .inline-actions{display:flex;gap:8px;flex-wrap:wrap}body.desktop-workspace #home .home-account-details .inline-actions>button{font-size:12px;min-height:44px;flex:1 1 auto}
}

/* Original-app style: two columns, natural-height text and image cards. */
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 body.mobile-workspace #secondary-body #forum-feed{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:4px;gap:10px;align-items:start;margin:0;min-width:0}
 body.mobile-workspace #secondary-body #forum-feed .forum-feed-card{grid-row-end:span var(--forum-span,1);align-self:start;position:relative;margin:0;padding:11px 10px 10px;border:1px solid var(--line);border-radius:13px;min-width:0;overflow:hidden;background:var(--panel)}
 body.mobile-workspace #secondary-body #forum-feed h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden;font-size:16px;font-weight:600;line-height:1.5;margin:0 0 7px;overflow-wrap:anywhere}
 body.mobile-workspace #secondary-body #forum-feed .forum-excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:7;max-height:none;font-size:14px;line-height:1.6;margin:0 0 12px;overflow:hidden;color:var(--muted)}
 body.mobile-workspace #secondary-body #forum-feed .has-cover .forum-excerpt{-webkit-line-clamp:3}
 body.mobile-workspace #secondary-body #forum-feed .forum-cover{display:block;float:none;width:calc(100% + 20px);max-width:none;height:auto;max-height:260px;object-fit:cover;margin:-11px -10px 10px;border-radius:0}
 body.mobile-workspace #secondary-body #forum-feed .forum-card-meta{display:flex;align-items:center;justify-content:space-between;gap:5px;margin:10px 0 0;font-size:10px;line-height:1.7;min-height:20px}
 body.mobile-workspace #secondary-body #forum-feed .forum-card-counts{gap:7px}
 body.mobile-workspace #secondary-body #forum-feed .forum-read{position:absolute;inset:0;opacity:0;min-height:44px;width:100%;height:100%;padding:0;margin:0;border:0;border-radius:13px}
 body.mobile-workspace #secondary-body #forum-feed .forum-feed-card:focus-within{outline:2px solid var(--accent);outline-offset:2px}
 body.mobile-workspace #secondary-body #forum-feed>.empty-state{grid-column:1/-1;grid-row:auto;min-height:110px;margin:0}
 body.mobile-workspace[data-module=redbook] #forum-search-form>.field{font-size:0;gap:0;margin:0 0 8px}
 body.mobile-workspace[data-module=redbook] #forum-search-form .inline-actions{gap:8px;flex-wrap:nowrap}
 body.mobile-workspace[data-module=redbook] #forum-search-form .inline-actions>.field{font-size:0;gap:0;margin:0;flex:1;min-width:0}
 body.mobile-workspace[data-module=redbook] #forum-search-form select{font-size:13px;padding:8px;min-height:40px}
 body.mobile-workspace[data-module=redbook] #forum-search-form .secondary{min-height:40px;padding:8px 10px}
 body.mobile-workspace[data-module=redbook] #forum-status{font-size:10px;margin:6px 0 10px}
}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 body.mobile-workspace[data-module=downloads] main{display:flex;flex:1;min-height:0;height:auto;padding:0;overflow:hidden}
 body.mobile-workspace[data-module=downloads] main>header{display:none}
 body.mobile-workspace[data-module=downloads] .mobile-toolbar{flex:0 0 54px;padding-top:5px;padding-bottom:5px}
 body.mobile-workspace #downloads.active{flex:1;min-height:0;max-width:none}
}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 body.mobile-workspace[data-module=offerings] main{display:flex;flex:1;min-height:0;height:auto;padding:0;overflow:hidden}
 body.mobile-workspace[data-module=offerings] main>header{display:none}
 body.mobile-workspace[data-module=offerings] .mobile-toolbar{flex:0 0 54px;padding-top:5px;padding-bottom:5px}
 body.mobile-workspace #offerings.active{flex:1;min-height:0;max-width:none}
}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 body.mobile-workspace[data-module=redbook][data-mobile-view=list] .mobile-toolbar{gap:8px}
 body.mobile-workspace[data-module=redbook][data-mobile-view=list] .mobile-heading{flex:0 0 72px}
 body.mobile-workspace .mobile-toolbar>.mobile-forum-search{display:flex;flex:1;min-width:0;margin:0;font-size:0;gap:0}
 body.mobile-workspace .mobile-toolbar>.mobile-forum-search input{width:100%;min-width:0;min-height:40px;height:40px;padding:8px 11px;font-size:16px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
 body.mobile-workspace[data-module=redbook] #forum-status:empty{display:none}
}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.mobile-workspace .jy-filters{gap:8px}.mobile-workspace .jy-filters input{flex:1 1 100%;min-width:0}.mobile-workspace .jy-filters select{flex:1;min-width:0;font-size:13px}.mobile-workspace #jy-new{display:none}.mobile-workspace #jy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mobile-workspace #jy-grid .jy-card{padding:11px}.mobile-workspace .jy-cover{width:calc(100% + 22px);margin:-11px -11px 10px}.mobile-workspace .jy-card h3{font-size:16px}.mobile-workspace .jy-card p{font-size:13px}.mobile-workspace .jy-card small{font-size:10px}.mobile-workspace #jy-detail{padding:16px 14px}.mobile-workspace #jy-detail h2{font-size:22px}.mobile-workspace #jy-detail .inline-actions>button{min-height:44px;flex:1 1 auto}.mobile-workspace #jy-compose .fields-grid{grid-template-columns:1fr 1fr;gap:0 12px}}
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.mobile-workspace #jy-detail>.text-btn:first-child{display:none}}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 body.mobile-workspace[data-module=chat] .sync-state{display:none}
 body.mobile-workspace[data-module=chat] .chat-bottom-nav{display:flex;padding:6px 6px calc(7px + env(safe-area-inset-bottom));flex:0 0 auto;background:var(--paper);border-top:1px solid var(--line)}
 body.mobile-workspace[data-module=chat] .chat-bottom-nav button{min-height:51px;gap:4px;font-size:12px;border-radius:10px}
 body.mobile-workspace[data-module=chat][data-mobile-view=detail] .chat-bottom-nav{display:none}
 body.mobile-workspace[data-module=chat] .chat-assistant-entry{padding:14px 5px 18px;min-height:78px}.mobile-workspace .chat-assistant-entry strong{font-size:16px}.mobile-workspace .chat-assistant-entry small{font-size:12px}
 body.mobile-workspace[data-module=chat] #secondary-body{padding:10px 12px 16px}.mobile-workspace .chat-hub-pane{padding:0 3px 15px}.mobile-workspace .chat-hub-row{padding:18px 0}.mobile-workspace .chat-person-text strong{font-size:16px}.mobile-workspace .chat-person-text small{font-size:12px}.mobile-workspace .chat-person-icon{width:42px;height:42px;flex-basis:42px}.mobile-workspace .chat-contact-search input{font-size:16px}.mobile-workspace .chat-contact-search button{min-height:44px}
 body.mobile-workspace[data-module=chat]:not([data-chat-section=chats]) .mobile-login-card{display:none}
 body.mobile-workspace.chat-assistant-open #chat.active{display:flex;flex-direction:column;flex:1;min-height:0}.mobile-workspace.chat-assistant-open #file-assistant-panel{display:block;flex:1;min-height:0;overflow:auto;padding:18px 14px calc(20px + env(safe-area-inset-bottom))}.mobile-workspace .assistant-send{display:flex;flex-direction:column;gap:10px}.mobile-workspace .assistant-send>*{width:100%;min-width:0}.mobile-workspace .assistant-item{padding:13px}.mobile-workspace .assistant-item button{min-height:44px}.mobile-workspace .chat-group-choice input,.mobile-workspace .chat-setting>input{min-height:21px;width:21px}
}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.mobile-workspace #file-assistant-panel>h2{display:none}}
/* Only the global horizontal navigation remains fixed. Module headings belong to their scroll surface. */
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 body.mobile-workspace .mobile-toolbar{position:static;flex-shrink:0;min-height:62px;margin:-14px -12px 14px;width:calc(100% + 24px);z-index:auto}
 body.mobile-workspace[data-module=chat] #secondary-body>.mobile-toolbar{margin:-10px -12px 12px}
 body.mobile-workspace[data-module=chat] #people-messages>.mobile-toolbar{margin:-15px -12px 14px}
 body.mobile-workspace #file-assistant-panel>.mobile-toolbar{margin:-18px -14px 16px;width:calc(100% + 28px)}
 body.mobile-workspace[data-module=downloads] .mobile-toolbar,body.mobile-workspace[data-module=offerings] .mobile-toolbar{display:none}
 body.mobile-workspace[data-module=notes] #secondary-body{padding:14px 0 90px}
 body.mobile-workspace[data-module=notes] #secondary-body>.mobile-toolbar{margin:-14px 0 0;width:100%;padding-left:13px;padding-right:13px;border-bottom:1px solid var(--line)}
 body.mobile-workspace[data-module=notes] .mobile-heading{align-items:center;text-align:center}body.mobile-workspace[data-module=notes] #mobile-subtitle{display:none}
 body.mobile-workspace .mobile-notes-menu{display:block;min-width:40px;width:40px;height:44px;padding:0;font-size:24px;color:var(--muted)}
 body.mobile-workspace[data-module=notes] .sync-state,body.mobile-workspace[data-module=notes] .mobile-trash{display:none}
 body.mobile-workspace[data-module=notes] #secondary-body>.secondary-controls{display:none!important}
 body.mobile-workspace[data-module=notes].notes-search-open #secondary-body>.secondary-controls{display:block!important;padding:12px 14px!important;background:var(--paper)}
 body.mobile-workspace[data-module=notes] #secondary-body>.secondary-controls>select,body.mobile-workspace[data-module=notes] #secondary-body>.secondary-controls>button{display:none!important}
 body.mobile-workspace[data-module=notes] #note-search{width:100%;min-height:42px;font-size:16px}
 body.mobile-workspace[data-module=notes] #note-list{display:block;margin:0;min-width:0;width:100%}
 body.mobile-workspace[data-module=notes] #note-list .desktop-note-entry{margin:0;border-bottom:1px solid var(--line);position:relative}
 body.mobile-workspace[data-module=notes] #note-list .desktop-list-row{display:flex;flex-direction:row;align-items:center;gap:13px;margin:0;padding:19px 37px 19px 18px;min-height:113px;border:0;border-radius:0;background:var(--paper)}
 body.mobile-workspace[data-module=notes] #note-list .note-row-text{gap:11px;min-width:0;flex:1}
 body.mobile-workspace[data-module=notes] #note-list .note-row-text>strong{display:block;font-size:16px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
 body.mobile-workspace[data-module=notes] #note-list .note-row-text>small{font-size:14px;line-height:1.6;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.mobile-workspace[data-module=notes] #note-list time{font-size:12px;line-height:1.3;color:var(--muted)}
 body.mobile-workspace .note-row-thumbnail{width:61px;height:61px;flex-basis:61px;object-fit:cover;border-radius:8px}
 body.mobile-workspace .note-row-more{top:12px;right:2px;min-height:44px;height:44px;width:32px;font-size:24px}
 body.mobile-workspace .mobile-note-fab{display:flex;position:fixed;align-items:center;justify-content:center;right:22px;bottom:calc(22px + env(safe-area-inset-bottom));z-index:12;width:54px;height:54px;border-radius:50%;background:var(--accent);color:white;font-size:30px;box-shadow:0 6px 20px #0005}
 body.mobile-workspace:not([data-module=notes]) .mobile-note-fab,body.mobile-workspace[data-mobile-view=detail] .mobile-note-fab{display:none!important}
 body.mobile-workspace #notes-menu{top:calc(68px + env(safe-area-inset-top));height:calc(var(--mobile-height,100dvh) - 68px - env(safe-area-inset-top));max-height:none;left:0;margin:0;border-radius:0;padding:5px 0 20px}
 body.mobile-workspace #notes-menu .notes-menu-row{min-height:53px;padding:14px 21px;font-size:16px}
 body.mobile-workspace[data-module=notes][data-notes-layout=grid] #note-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:12px}
 body.mobile-workspace[data-module=notes][data-notes-layout=grid] #note-list .desktop-note-entry{border:1px solid var(--line);border-radius:12px;overflow:hidden}
 body.mobile-workspace[data-module=notes][data-notes-layout=grid] #note-list .desktop-list-row{height:100%;align-items:flex-start;padding:17px 29px 17px 12px;min-height:150px;flex-direction:column}
 body.mobile-workspace[data-module=notes][data-notes-layout=grid] #note-list .note-row-text{width:100%}
 body.mobile-workspace[data-module=notes][data-notes-layout=grid] #note-list .note-row-thumbnail{width:100%;height:95px;flex-basis:auto}
 body.mobile-workspace[data-module=notes][data-mobile-view=detail] main{display:block;overflow-y:auto;padding:0;height:auto;min-height:0}
 body.mobile-workspace[data-module=notes][data-mobile-view=detail] main>.mobile-toolbar{margin:0;width:100%}
 body.mobile-workspace[data-module=notes] #notes.active{display:block;min-height:0;flex:none}
 body.mobile-workspace[data-module=notes] #notes>.panel{display:block;overflow:visible;flex:none;padding:16px 17px}
 body.mobile-workspace[data-module=notes] .notes-layout{display:block;flex:none;min-height:0}
 body.mobile-workspace[data-module=notes] #note-editor:not([hidden]){display:flex;flex-direction:column;min-height:0}
 body.mobile-workspace[data-module=notes] #note-body{flex:none;min-height:320px;max-height:none;height:auto;resize:none;overflow:hidden}
 body.mobile-workspace[data-module=notes] .notes-toolbar{position:static;min-height:48px}.mobile-workspace #notes-resource-body{padding:14px}
 body.mobile-workspace[data-module=library][data-mobile-view=detail] main{display:block;overflow-y:auto;padding:14px 12px 22px}
 body.mobile-workspace[data-module=library][data-mobile-view=detail] #library.active,body.mobile-workspace[data-module=library][data-mobile-view=detail] #reader:not([hidden]){display:block;flex:none;overflow:visible}
 body.mobile-workspace #reader-body{flex:none!important;min-height:0!important;max-height:none!important;overflow:visible!important}
 body.mobile-workspace #reader-pdf{height:70dvh;min-height:400px}
}

/* Redbook: visible board tabs, with secondary controls in the right menu. */
body.desktop-workspace #forum-search-form.forum-toolbar-form{display:flex;flex-direction:column;gap:10px}
#forum-search-form.forum-toolbar-form .forum-toolbar-legacy{display:none!important}
#forum-search-form .forum-search-row{display:flex;align-items:center;gap:7px;min-width:0}
#forum-search-form .forum-search-row>.field{display:flex;flex-direction:row;align-items:center;gap:7px;flex:1;min-width:0;margin:0;font-size:0}
#forum-search-form .forum-search-row input{flex:1;width:0;min-width:0;box-sizing:border-box;font-size:16px}
#forum-find{flex:0 0 auto;white-space:nowrap}
.forum-board-toolbar{display:flex;align-items:center;gap:7px;min-width:0;width:100%;position:relative}
.forum-board-tabs{display:flex;align-items:center;gap:5px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}
.forum-board-tabs::-webkit-scrollbar{display:none}
#forum-search-form .forum-board-tabs button{flex:0 0 auto;padding:8px 11px;border:0;background:transparent;color:var(--muted);font-size:var(--user-nav-font,16px);white-space:nowrap;min-height:42px}
#forum-search-form .forum-board-tabs button[aria-pressed=true]{color:var(--accent);background:var(--accent-soft);border-radius:9px;font-weight:600}
.forum-view-menu{flex:0 0 auto;position:static}
.forum-view-menu>summary{list-style:none;cursor:pointer;display:grid;place-items:center;width:40px;height:42px;border:1px solid var(--line);border-radius:9px;font-size:20px;color:var(--text)}
.forum-view-menu>summary::-webkit-details-marker{display:none}
.forum-view-options{position:absolute;right:0;top:calc(100% + 6px);width:190px;max-height:60dvh;overflow:auto;padding:8px;z-index:30;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 26px #0005}
#forum-search-form .forum-view-options button{display:block;width:100%;text-align:left;min-height:42px;margin:0;padding:9px 12px;border:0;border-radius:7px;background:transparent;color:var(--text);font-size:var(--user-body-font,16px)}
#forum-search-form .forum-view-options button[hidden]{display:none!important}
#forum-search-form .forum-view-options button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent)}
.forum-view-options hr{border:0;border-top:1px solid var(--line);margin:6px 0}.forum-view-options>span{display:block;font-size:12px;padding:6px 12px 2px}
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){
 body.mobile-workspace[data-module=redbook] .mobile-toolbar>.mobile-forum-search{gap:6px;align-items:center;flex-direction:row}
 body.mobile-workspace[data-module=redbook] .mobile-forum-search input{flex:1;min-width:0;width:0}
 body.mobile-workspace[data-module=redbook] #forum-find{font-size:14px;padding:8px;min-height:40px;border-radius:9px}
 body.mobile-workspace[data-module=redbook] .mobile-heading{flex-basis:54px}
 body.mobile-workspace[data-module=redbook] #forum-search-form .forum-search-row:empty{display:none}
 body.mobile-workspace[data-module=redbook] .forum-board-toolbar{margin-top:-4px}
 body.mobile-workspace[data-module=redbook] #forum-search-form .forum-board-tabs button{padding:8px 11px}
}

.world-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 18px}.world-actions button{white-space:nowrap}#world-conversion{display:grid;grid-template-columns:1fr 1.4fr auto;gap:12px;align-items:end;margin-bottom:20px}#world-conversion[hidden],#world-repeat-field[hidden]{display:none!important}#world-conversion .field{min-width:0;margin:0}#world-conversion input,#world-conversion select{width:100%;box-sizing:border-box;min-width:0}#world-repeat-field,#world-conversion-status{grid-column:1/-1}.world-clock-day:empty{display:none}.world-clock-zone{overflow-wrap:anywhere}.world-region-dialog{width:min(520px,calc(100vw - 28px));max-height:85dvh;overflow:auto;box-sizing:border-box;background:var(--panel,#161616);color:var(--text,#eee);border:1px solid var(--line,#333);border-radius:16px;padding:18px}.world-region-dialog [data-search]{width:100%;box-sizing:border-box;margin:12px 0}.world-region-row{display:flex;border-bottom:1px solid var(--line,#333);align-items:center;gap:8px;padding:6px 0}.world-region-row>button:first-child{flex:1;min-width:0;text-align:left;border:0;background:transparent;color:inherit}.world-region-row b,.world-region-row small{display:block;overflow-wrap:anywhere}.world-region-row small{font-size:13px;color:var(--muted);margin-top:5px}.world-region-row>button:last-child{font-size:22px}.world-clock-time{font-variant-numeric:tabular-nums}
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.mobile-workspace #world-conversion{grid-template-columns:1fr}body.mobile-workspace #world-conversion-status,body.mobile-workspace #world-repeat-field{grid-column:1}body.mobile-workspace #world>.panel>.panel-heading{display:none}body.mobile-workspace .world-actions{margin-top:0}body.mobile-workspace .world-actions button{flex:1 1 calc(50% - 8px);padding:10px 8px}}

/* Compact library path and search-adjacent tools menu on both layouts. */
.library-search-row{display:flex;align-items:center;gap:8px;position:relative;width:100%;min-width:0;margin:0}
.library-search-row>#book-search{flex:1;width:0;min-width:0;margin:0;box-sizing:border-box}
.library-view-menu{flex:0 0 auto;position:static}
.library-view-menu>summary{list-style:none;display:grid;place-items:center;cursor:pointer;width:42px;height:42px;border:1px solid var(--line);border-radius:10px;color:var(--text);font-size:20px}
.library-view-menu>summary::-webkit-details-marker{display:none}
.library-view-options{position:absolute;right:0;top:calc(100% + 6px);width:190px;max-height:65dvh;overflow:auto;padding:10px;z-index:35;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 26px #0005}
.library-view-options .library-actions{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0}
.library-view-options .library-actions button{text-align:left;width:100%;margin:0}
.library-view-options .library-actions .field{display:flex;flex-direction:column;margin:4px 0 0;gap:5px;font-size:12px;color:var(--muted)}
.library-view-options .library-actions select{width:100%;max-width:none;box-sizing:border-box;font-size:14px!important}
body.desktop-workspace #book-list{margin-top:0}
body.desktop-workspace .library-breadcrumbs{min-height:30px;padding:2px 0;margin:0;gap:4px}
body.desktop-workspace .library-breadcrumbs button{min-height:30px;padding:4px 6px;line-height:1.4;margin:0}
body.desktop-workspace .library-status{margin:6px 0;line-height:1.4}
body.desktop-workspace .library-file-grid{margin-top:8px}
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.mobile-workspace #book-list{padding-top:0}.library-search-row{margin-bottom:0}body.mobile-workspace[data-module=library] #secondary-body>.secondary-controls{margin-bottom:5px}}

body.desktop-workspace #sun-form{gap:8px;margin:0 0 10px}body.desktop-workspace #sun-form>.field{margin:0;gap:5px}body.desktop-workspace #sun-form input:not([type=hidden]){min-height:40px;padding:8px 10px}body.desktop-workspace #sun-form .inline-actions{gap:8px;margin:0}body.desktop-workspace #sun-form button{min-height:40px;padding:8px 12px}body.desktop-workspace #sun-result{gap:8px;margin-top:8px}body.desktop-workspace #sun-result>.muted{margin:4px 0 0}body.desktop-workspace #sun>.panel>.muted{margin:10px 0 0;font-size:12px;line-height:1.5}body.desktop-workspace #sun .sun-stat{padding:12px;margin:0}
@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.mobile-workspace[data-module=sun] .mobile-options{padding:10px;margin:0 0 8px}body.mobile-workspace[data-module=sun] .mobile-options .secondary-controls{gap:8px}body.mobile-workspace[data-module=sun] .mobile-options input,body.mobile-workspace[data-module=sun] .mobile-options select{min-height:40px;padding:8px 10px}body.mobile-workspace #sun>.panel{padding:12px}body.mobile-workspace #sun-form{display:flex;flex-wrap:wrap;align-items:end;gap:8px}body.mobile-workspace #sun-form>.field{flex:1 1 140px;min-width:0}body.mobile-workspace #sun-form .inline-actions{flex:0 0 auto;flex-wrap:wrap}body.mobile-workspace #sun-form .field input{width:100%;box-sizing:border-box}body.mobile-workspace #sun-result .sun-stat{padding:11px 12px;gap:3px}body.mobile-workspace #sun-result .sun-stat strong{font-size:28px}}

body.desktop-workspace #calendar-detail{display:flex;flex-direction:column;gap:8px;padding:0;background:transparent;margin:12px 0}
.calendar-date-card{background:var(--paper,#000);border:1px solid var(--line,#333);border-radius:10px;padding:13px 14px;line-height:1.65;overflow-wrap:anywhere}.calendar-date-card>strong{display:block;font-size:var(--user-heading-font,21px);line-height:1.5}.calendar-date-card>p{margin:7px 0 0}.calendar-date-card>small{display:block;color:var(--muted);margin-top:4px}.calendar-special-month{display:inline-block;margin-top:7px;font-size:12px;color:#e6bd54}.calendar-observance-text{color:#e6bd54}.calendar-lunar-card>strong{color:var(--accent)}.calendar-day.auspicious{border-color:#9a7a32}.calendar-day.special-month:not(.selected){background:color-mix(in srgb,var(--panel) 94%,#a43e46)}.calendar-day .calendar-day-event{color:#e6bd54;font-size:9px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.calendar-day.selected{outline:1px solid var(--accent)}

.calendar-haircut-card>strong{font-size:var(--user-heading-font,21px)}.calendar-haircut-card>small{font-size:12px;line-height:1.6}.calendar-haircut-details{margin-top:10px}.calendar-haircut-details>summary{cursor:pointer;color:var(--accent);padding:5px 0}.calendar-haircut-table{width:100%;border-collapse:collapse;margin:10px 0;font-size:14px;line-height:1.6}.calendar-haircut-table th,.calendar-haircut-table td{text-align:left;padding:8px 5px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.calendar-haircut-table th:first-child,.calendar-haircut-table td:first-child{white-space:nowrap}.calendar-haircut-table .current-day{background:var(--accent-soft);color:var(--accent)}.calendar-haircut-details>p{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}

body:not([data-module=notes]) #mobile-trash{display:none!important}

/* World time keeps live clocks separate from conversion. */
#world .world-conversion-back{grid-column:1/-1;justify-self:start}#world .clock-card .panel-heading{gap:8px}#world .clock-card .panel-heading>b{flex:1}#world .clock-card .panel-heading button{padding:6px 10px;white-space:nowrap}

#world .world-local-field{display:flex;flex-direction:column;gap:6px}#world .world-local-input{display:flex;align-items:center;gap:8px;min-width:0}#world .world-local-input input{flex:1;min-width:0;width:0}#world .world-local-input button{flex:0 0 auto;white-space:nowrap;padding:10px}

#world .world-clock-date-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0}#world .clock-card .world-clock-date{font-size:16px;line-height:1.5;margin:0;min-width:0;color:var(--text)}#world .world-clock-date-row button{flex:0 0 auto;white-space:nowrap;font-size:13px;padding:8px}

/* Compact world clock cards without reducing readable dates. */
#world>.panel{padding:12px}#world .world-actions{margin:0 0 10px;gap:8px}#world .world-clocks{gap:8px;margin-top:0}#world .clock-card{padding:12px}#world .clock-card .panel-heading{margin:0;gap:6px}#world .clock-card .panel-heading button{padding:4px 8px}#world .clock-card .world-clock-time{margin:6px 0 2px;line-height:1.15}#world .world-clock-date-row{margin:2px 0;gap:6px}#world .world-clock-date-row button{padding:5px 8px}#world .clock-card .world-clock-zone,#world .clock-card .world-clock-day{margin:2px 0;line-height:1.5}#world #world-conversion{gap:8px;margin-bottom:10px}#world #world-conversion-status{margin:0}

#world #world-conversion-status:empty{display:none}#world .world-actions #world-add{flex:0 0 auto}

@media(max-width:800px),(max-width:1100px) and (pointer:coarse){body.mobile-workspace[data-module=world] #world .world-actions{display:none}}

#world #world-conversion .world-base-field{flex-direction:row;align-items:center;gap:10px}#world .world-base-field>span{flex:0 0 auto;white-space:nowrap;font-size:16px}#world #world-base{flex:1;min-width:0;width:0}

#world #world-conversion .world-local-field{flex-direction:row;align-items:center;gap:10px}#world .world-local-field>label{flex:0 0 auto;white-space:nowrap;font-size:16px}#world .world-local-input{flex:1;min-width:0}

#account-confirm-field[hidden]{display:none!important}#account-register-status:empty{display:none}#account-register-status{grid-column:1/-1;margin:0;font-size:13px;line-height:1.5}#account-login .inline-actions{grid-column:1/-1}#account-login .inline-actions>button{flex:1;min-width:0}#account-confirm-field{grid-column:1/-1}
