/* Workspace start, readable topic preview and expanded editing. */
[hidden]{display:none!important}.at-home .viewbar,.at-home .bottom-area,.at-home #appearance,.at-home #search,.at-home #undo,.at-home #redo,.at-home #fileMenu,.at-home .toolbar-divider{display:none!important}
.sidebar-close{display:none}.icon-button{width:44px;height:44px}.topbar-left{gap:4px}.home-maps-button{color:var(--green)}
.stage.home-stage{height:auto;min-height:calc(100dvh - 81px);padding:38px;overflow:visible;background-image:none}.map-home{max-width:1100px;margin:auto}.home-intro{margin-bottom:30px}.home-eyebrow{color:var(--green);font-size:13px;margin:0 0 8px}.home-intro h1{font-size:32px;line-height:1.6;margin:0 0 8px}.home-description,.home-storage-note{color:var(--muted);line-height:1.9;font-size:14px}.home-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.home-actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;margin:0;padding:10px 22px}.home-search{max-width:440px;margin:0 0 18px}.home-map-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}.home-map-card{display:flex;flex-direction:column;align-items:stretch;text-align:start;padding:18px;border:1px solid var(--line);background:var(--paper);border-radius:18px;min-width:0;box-shadow:0 3px 15px var(--shadow)}.home-map-card:hover{border-color:var(--green)}.home-map-card .type-preview{width:100%;height:90px;margin-bottom:15px}.home-map-card strong{font-size:17px;line-height:1.8;overflow-wrap:anywhere}.home-map-meta{font-size:12px;color:var(--green);margin-top:6px}.home-map-description{font-size:12px;color:var(--muted);line-height:1.9;margin-top:10px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.home-empty{padding:30px;border:1px dashed var(--line);border-radius:16px;color:var(--muted);font-size:14px;line-height:2}.home-storage-note{font-size:12px;margin-top:25px}
.viewbar:has(.focus-usage-tip){flex-wrap:wrap}.focus-usage-tip{flex:1 0 100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border:1px solid var(--line);border-radius:11px;background:var(--hover);color:var(--muted);font-size:12px;line-height:1.8}.focus-usage-tip button{flex:none;color:var(--green);font-size:12px;min-height:40px;padding:6px}
.focus-preview-card{cursor:pointer}.focus-preview-card .card-topline{margin-bottom:4px;min-height:36px}.focus-preview-card .card-topline .icon-button{width:40px;height:40px}.focus-card-copy{outline-offset:4px;border-radius:7px}.focus-card-copy:focus-visible{outline:2px solid var(--green)}.focus-title-preview{margin:0;min-height:0!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden!important;overflow-wrap:anywhere}.focus-note-preview{margin:8px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden!important;white-space:pre-wrap;min-height:0}.focus-edit-cue{display:block;font-size:11px;color:var(--green);margin-top:8px}.focus-preview-card .focus-branch-actions{display:flex;gap:7px;justify-content:stretch;bottom:13px;left:18px;right:18px;padding-top:8px}.focus-branch-actions:empty{display:none}.focus-branch-actions button{flex:1;min-width:0;min-height:44px;padding:5px 7px;border:1px solid var(--line);border-radius:9px;background:var(--hover);color:var(--green);font-size:11px!important;line-height:1.6;text-decoration:none;white-space:normal}.focus-preview-card .card-kicker{font-size:11px}.focus-preview-card .active-notes{max-height:54px}.focus-scene:has(.focus-preview-card){--card-h:270px}
.topic-editor{inset:0;margin:auto;width:min(820px,calc(100% - 40px));height:min(780px,90dvh);max-width:none;max-height:none;padding:0;border:0;background:transparent;color:var(--ink);overflow:visible}.topic-editor::backdrop{background:#14271d66;backdrop-filter:blur(5px)}.topic-editor-panel{height:100%;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:24px;background:var(--paper);box-shadow:0 25px 80px #0003;overflow:hidden;transform-origin:top left}.topic-editor-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 26px;border-bottom:1px solid var(--line);flex:none}.topic-editor-head p{font-size:11px;color:var(--muted);margin:0 0 5px}.topic-editor-head h2{font-size:21px;margin:0}.topic-editor-head button{min-width:84px;min-height:46px;margin:0}.topic-editor-body{padding:24px 26px;overflow-y:auto;display:flex;flex-direction:column;gap:22px;flex:1;min-height:0}.editor-label{display:flex;flex-direction:column;gap:9px;font-size:12px;color:var(--muted)}.topic-editor textarea{display:block;width:100%;padding:12px 15px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);margin:0;max-height:none!important;outline-offset:2px;resize:vertical}.topic-editor textarea:focus{border-color:var(--green);outline:2px solid color-mix(in srgb,var(--green) 18%,transparent)}.topic-editor .editor-title{font-size:24px;line-height:1.7;min-height:100px;height:105px}.topic-editor .editor-notes{font-size:18px;line-height:1.9;min-height:280px;height:35vh}.editor-counts{display:flex;gap:20px;flex-wrap:wrap;font-size:11px;color:var(--muted)}.editor-counts .near-limit{color:var(--warning)}.editor-save{font-size:12px;color:var(--muted);margin:0}.editor-save.error{color:var(--danger)}.editor-open{overflow:hidden}.type-lock-note{font-size:12px!important;color:var(--muted);line-height:1.9;margin:10px 0 16px}.type-name-label{margin:0 0 14px}
@media(max-width:900px),(max-width:1000px) and (max-height:500px){
 .sidebar-close{display:grid;position:absolute;top:12px;left:10px}.sidebar .brand{margin-top:12px}.topbar{padding-inline:8px}.topbar-right,.topbar-left{gap:0}.topbar-right{flex:1}.topbar-left #appearance,.topbar-left #undo,.topbar-left #redo,.topbar-left .toolbar-divider{display:none}.topbar .icon-button,.topbar-right .icon-button,.topbar-left .icon-button{width:44px;min-width:44px;height:44px}.topbar .ai-top-action{min-width:44px;min-height:44px;margin:0 2px;padding:5px}.workspace-name{font-size:11px;max-width:none;flex:1;min-width:0}.stage.home-stage{padding:26px 18px;min-height:calc(100dvh - 66px)}.home-intro h1{font-size:27px}.home-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.home-actions button{font-size:12px;padding:8px}.home-map-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}.home-map-card{padding:13px;border-radius:14px}.home-map-card strong{font-size:15px}.home-map-card .type-preview{height:70px;margin-bottom:8px}.home-map-meta,.home-map-description{font-size:11px}.home-description{font-size:13px}.home-empty{padding:22px;font-size:13px}.focus-usage-tip{font-size:11px;padding:7px 9px;gap:6px}.focus-usage-tip button{font-size:11px;max-width:60px;line-height:1.5;min-height:44px}.viewbar{gap:9px}.focus-preview-card .card-kicker{font-size:10px}.focus-preview-card .focus-branch-actions{left:12px;right:12px;bottom:11px;gap:4px}.focus-branch-actions button{font-size:10px!important;padding:4px}.focus-preview-card .active-title{font-size:22px}.focus-preview-card .active-notes{font-size:16px;line-height:1.5;max-height:48px}.focus-edit-cue{font-size:10px;margin-top:5px}.focus-scene:has(.focus-preview-card){--card-h:250px}
 .typed-focus .typed-neighbor.dir-up,.typed-focus .typed-neighbor.dir-down{min-height:44px;height:auto}.typed-focus .typed-neighbor.dir-up .depth-relation,.typed-focus .typed-neighbor.dir-down .depth-relation{display:block!important;font-size:9px}.typed-focus .typed-neighbor.dir-up strong,.typed-focus .typed-neighbor.dir-down strong{font-size:11px}
 .topic-editor{position:fixed;inset:0;width:100%;height:var(--visual-height,100dvh);margin:0;max-height:none}.topic-editor-panel{border:0;border-radius:0}.topic-editor-head{padding:15px 18px}.topic-editor-head h2{font-size:19px}.topic-editor-head p{font-size:10px}.topic-editor-body{padding:20px 18px;gap:20px}.topic-editor .editor-title{font-size:22px;height:105px}.topic-editor .editor-notes{font-size:18px;min-height:240px;height:36dvh}.topic-editor textarea{padding:12px}.editor-counts{font-size:11px;gap:12px}
}
@media(max-width:900px) and (max-height:700px),(max-width:1000px) and (max-height:500px){
 body:not(.keyboard-open) .depth-scene.focus-scene:has(.focus-preview-card){--card-h:220px}.focus-preview-card .focus-title-preview{-webkit-line-clamp:1}.focus-preview-card .active-notes{font-size:16px;max-height:44px;line-height:1.4}.focus-preview-card .card-topline{min-height:32px;margin-bottom:0}.focus-preview-card .card-topline .icon-button{height:36px}.focus-edit-cue{margin-top:3px}.focus-preview-card .focus-card-copy{margin-top:0}
}
.home-actions button{width:auto;min-width:160px}.topic-editor-head>div{flex:1;min-width:0}.topic-editor-head button{width:auto;flex:none}.focus-preview-card .focus-branch-actions button{min-height:44px}.focus-card-copy{user-select:none;-webkit-user-select:none}
@media(max-width:900px),(max-width:1000px) and (max-height:500px){.home-actions button{width:100%;min-width:0}}
@media(prefers-reduced-motion:reduce){.topic-editor-panel{scroll-behavior:auto}}

/* Both view names stay visible and easy to tap on phones. */
.view-toggle{flex-shrink:0}.view-toggle button{min-height:44px;white-space:nowrap;padding-inline:12px}.view-toggle button[aria-pressed="true"]{font-weight:650}.overview-tools .fit{min-height:44px}.focus-usage-tip button{min-height:44px}
