/* utono v2.0 Phase 2 — navigation, library, search & profile. Official assets only. */
/* Sidebar and navigation */
.sidebar-head{padding-bottom:13px;min-height:100px}
.sidebar-content{padding-bottom:36px}
.sidebar-section{margin-bottom:19px}
.section-title{font-size:10px;letter-spacing:.105em;color:var(--utono-subtle);margin-bottom:8px}
.nav-item{min-height:40px;border-radius:10px;gap:11px}
.sidebar .nav-item:hover{background:var(--utono-selected)}
.v2-sidebar-search{width:calc(100% - 8px);margin:0 4px 24px;display:flex;gap:10px;align-items:center;background:var(--utono-card);border:1px solid var(--utono-border);border-radius:11px;min-height:42px;padding:0 11px;text-align:left;color:var(--utono-muted);font-size:12px;cursor:pointer}
.v2-sidebar-search span{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.v2-sidebar-search kbd{font:500 9px var(--utono-font);white-space:nowrap;color:var(--utono-subtle);border:1px solid var(--utono-border);border-radius:6px;padding:2px 4px}
.v2-sidebar-search:hover{border-color:var(--utono-action);color:var(--utono-text)}
.v2-folder-dot{height:11px;width:11px;flex:0 0 11px;border-radius:50%;background:var(--utono-action);margin-left:3px;margin-right:3px;border:1px solid color-mix(in srgb,var(--utono-text) 5%, transparent)}
.v2-folder-dot-0{background:#A7B89F}.v2-folder-dot-1{background:#DCC9A8}.v2-folder-dot-2{background:#D6E9F6}.v2-folder-dot-3{background:#B8A6D7}.v2-folder-dot-4{background:#E7AFA6}.v2-folder-dot-5{background:#8CB2C1}
.theme-dark .v2-folder-dot-0{background:#7A8F7E}.theme-dark .v2-folder-dot-1{background:#D6C9A8}.theme-dark .v2-folder-dot-2{background:#8CB3D9}
.v2-sidebar-tip{margin:2px 7px 17px;border-top:1px solid var(--utono-border);padding:15px 9px 0;display:flex;gap:9px;align-items:flex-start;color:var(--utono-subtle);font-size:11px;line-height:1.55}
.v2-sidebar-tip svg{flex-shrink:0;margin-top:1px}
.sidebar-footer{padding-bottom:16px}
/* Library */
.v2-library-page{max-width:1700px;margin-inline:auto}
.v2-library-page .page-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px}
.v2-library-page .page-header h1{font-size:clamp(27px,3vw,35px);margin:4px 0 6px}
.v2-library-page .page-subtitle{font-size:13px}
.v2-library-heading-actions{flex-shrink:0}
.v2-library-controls{display:flex;justify-content:space-between;align-items:center;gap:14px;padding-bottom:17px;margin-bottom:22px;border-bottom:1px solid var(--utono-border)}
.v2-library-filters{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-width:0}
.v2-library-filters button{border:1px solid transparent;padding:7px 13px;border-radius:999px;color:var(--utono-muted);font-size:12px;min-height:35px;background:transparent;white-space:nowrap;cursor:pointer}
.v2-library-filters button.active{background:var(--utono-selected);color:var(--utono-text);font-weight:700}
.v2-library-filters button:hover{background:var(--utono-selected);color:var(--utono-text)}
.v2-library-page .toolbar{display:flex;align-items:center;gap:8px;margin:0}
.v2-library-search{background:var(--utono-card);border:1px solid var(--utono-border);border-radius:10px;min-width:39px;height:39px;display:grid;place-items:center;color:var(--utono-muted);cursor:pointer}
.v2-library-search:hover{border-color:var(--utono-action)}
.v2-library-page .select-control{min-width:120px;max-width:157px;height:39px;border-radius:10px;color:var(--utono-text);font-size:12px}
.v2-library-page .toolbar-group{height:39px;border-radius:10px}
.v2-date-heading{font-size:12px;font-weight:710;margin:0 0 14px;color:var(--utono-text);letter-spacing:-.005em}
.v2-note-group{margin-bottom:31px;min-width:0}
.v2-library-page .notes-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,248px),1fr));gap:15px}
.v2-note-card{height:275px;min-height:0;display:flex;flex-direction:column;position:relative;padding:18px;gap:9px;overflow:hidden;cursor:pointer;box-shadow:none;transition:border-color .14s,box-shadow .14s,transform .14s}
.v2-note-card.v2-with-photo{height:335px}
.v2-note-card .card-top{align-items:flex-start;gap:6px;min-height:unset}
.v2-note-card .card-title{font-size:15px;line-height:1.38;letter-spacing:-.015em;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:0}
.v2-note-card .card-menu{flex-shrink:0;margin-top:-7px;margin-right:-7px}
.v2-note-card .card-preview{color:var(--utono-muted);font-size:12px;line-height:1.55;flex:1;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;min-height:0}
.v2-card-chips{display:flex;gap:6px;align-items:center;flex-wrap:wrap;min-height:24px}
.v2-folder-chip{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;max-width:170px;overflow:hidden;text-overflow:ellipsis;min-height:24px;padding:2px 10px;background:var(--utono-selected);border-radius:999px;color:var(--utono-text);font-size:10px;font-weight:600;line-height:1.4}
.v2-media-chip{display:inline-flex;align-items:center;gap:5px;border-radius:999px;background:var(--utono-surface-muted);color:var(--utono-muted);font-size:10px;padding:4px 8px}
.v2-note-card .card-bottom{margin-top:0;padding-top:8px;border-top:1px solid var(--utono-border);display:flex;align-items:center;min-height:32px;flex-shrink:0}
.v2-note-card .card-bottom span{font-size:11px}
.v2-note-card .card-star{color:var(--utono-action)}
/* Gallery/list thumbnails are private images. A placeholder stays visible offline. */
.v2-thumbnail{position:relative;display:grid;place-items:center;flex-shrink:0;overflow:hidden;border-radius:10px;color:var(--utono-action);background:var(--utono-selected);border:1px solid var(--utono-border)}
.v2-thumbnail img{display:block;height:100%;width:100%;object-fit:cover;object-position:center}
.v2-thumbnail-card{width:100%;height:126px;border-radius:10px;margin-bottom:2px}
.v2-thumbnail-row{width:76px;height:70px;border-radius:9px}
.v2-thumbnail-rail{width:62px;height:65px;border-radius:9px}
.v2-thumbnail-search{width:65px;height:65px;border-radius:11px}
.v2-note-row{display:flex;gap:15px;align-items:center;padding:14px;border-radius:13px;min-height:98px;box-shadow:none}
.v2-note-row .row-main{display:flex;flex-direction:column;align-items:flex-start;gap:4px;flex:1;min-width:0}
.v2-note-row .row-title{font-size:14px;font-weight:700}
.v2-note-row .row-preview{font-size:12px;line-height:1.5;color:var(--utono-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.v2-note-row .row-time{font-size:11px;color:var(--utono-muted);white-space:nowrap}
.v2-note-row .v2-folder-chip{margin-top:2px}
.utono-rail-note .v2-thumbnail{width:61px;height:65px;flex-basis:61px}
.utono-rail-note{min-height:94px;align-items:flex-start;gap:10px}
.utono-rail-note-text{padding-top:3px}
.utono-rail-filter button{white-space:nowrap;padding-inline:9px}
/* Search: mobile full-height app-native sheet; desktop floating command palette */
.v2-search-open{overflow:hidden!important}
#v2-search-root{position:fixed;inset:0;z-index:1200;pointer-events:none}
#v2-search-root:empty{display:none}
.v2-search-backdrop{position:absolute;inset:0;background:rgba(10,14,11,.69);pointer-events:auto}
.v2-search-sheet{pointer-events:auto;position:absolute;top:min(10vh,95px);left:50%;transform:translateX(-50%);width:min(680px,calc(100vw - 30px));max-height:min(790px,85dvh);display:flex;flex-direction:column;border-radius:20px;background:var(--utono-card);border:1px solid var(--utono-border);color:var(--utono-text);box-shadow:0 32px 90px rgba(0,0,0,.2);overflow:hidden}
.v2-search-sheet header{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid var(--utono-border)}
.v2-search-sheet header>div{display:flex;align-items:center;gap:10px;flex:1;min-width:0}
.v2-search-sheet header input{flex:1;min-width:0;background:transparent;border:0;outline:none;color:var(--utono-text);font-size:17px;min-height:42px;font-family:inherit}
.v2-search-sheet header input:focus-visible{outline:0!important}
.v2-search-sheet header>button{width:40px;height:40px;display:grid;place-items:center;background:var(--utono-selected);border:0;border-radius:10px;color:var(--utono-text);cursor:pointer}
.v2-search-categories{display:flex;gap:7px;overflow-x:auto;padding:13px 18px 14px;border-bottom:1px solid var(--utono-border);scrollbar-width:none}
.v2-search-categories button{min-height:32px;white-space:nowrap;padding:5px 14px;border-radius:999px;border:1px solid var(--utono-border);background:var(--utono-card);color:var(--utono-muted);font-size:12px;cursor:pointer}
.v2-search-categories button.active{background:var(--utono-action);color:var(--utono-action-ink);border-color:var(--utono-action)}
.v2-search-results{flex:1;min-height:0;overflow-y:auto;padding:14px 18px 20px;overscroll-behavior:contain}
.v2-search-result-head{font-size:12px;font-weight:700;display:flex;justify-content:space-between;color:var(--utono-text);margin:7px 0 12px}
.v2-search-result-head span{color:var(--utono-muted);font-weight:500}
.v2-search-recent{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:2px 0 14px;border-bottom:1px solid var(--utono-border);margin-bottom:12px}
.v2-search-recent>strong{font-size:11px;color:var(--utono-muted);width:100%}
.v2-search-recent button{display:inline-flex;align-items:center;gap:6px;font-size:11px;border-radius:999px;padding:7px 12px;color:var(--utono-text);border:1px solid var(--utono-border);background:var(--utono-surface-muted);cursor:pointer}
.v2-search-hit{width:100%;display:flex;align-items:center;gap:14px;padding:12px 8px;text-align:left;border:1px solid transparent;border-bottom-color:var(--utono-border);background:transparent;color:var(--utono-text);cursor:pointer;border-radius:9px}
.v2-search-hit:hover,.v2-search-hit:focus-visible{background:var(--utono-selected);border-color:var(--utono-border)}
.v2-search-hit>span:nth-child(2){display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}
.v2-search-hit strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v2-search-hit small{font-size:11px;font-style:normal;color:var(--utono-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v2-search-hit em{font-size:10px;font-style:normal;color:var(--utono-subtle)}
.v2-search-hit>.ico{flex-shrink:0;color:var(--utono-muted)}
.v2-search-empty{padding:64px 15px;text-align:center;display:flex;flex-direction:column;gap:9px;align-items:center;color:var(--utono-muted)}
.v2-search-empty strong{color:var(--utono-text);font-size:15px}
.v2-search-sheet footer{padding:13px 18px;color:var(--utono-subtle);font-size:11px;line-height:1.5;border-top:1px solid var(--utono-border)}
/* Profile / settings */
.v2-profile-page{max-width:1020px;margin-inline:auto;padding-bottom:80px}
.v2-profile-page>h1{font-size:clamp(27px,3vw,36px);margin:4px 0 6px;letter-spacing:-.04em}
.v2-profile-header{display:flex;align-items:center;gap:17px;padding:22px;margin:29px 0;background:var(--utono-card);border:1px solid var(--utono-border);border-radius:18px;min-width:0}
.v2-profile-avatar{height:60px;width:60px;border-radius:50%;background:var(--utono-selected);color:var(--utono-action);display:grid;place-items:center;flex:0 0 60px}
.v2-profile-header>div:nth-child(2){flex:1;min-width:0}
.v2-profile-header h2{font-size:19px;letter-spacing:-.02em;margin:0 0 2px}
.v2-profile-header p{color:var(--utono-muted);font-size:12px;overflow-wrap:anywhere;margin:0}
.v2-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.v2-setting-card{background:var(--utono-card);border:1px solid var(--utono-border);border-radius:16px;padding:22px;min-width:0}
.v2-setting-card h2{font-size:17px;font-weight:700;margin:0 0 7px}
.v2-setting-card>p{font-size:12px;line-height:1.6;color:var(--utono-muted);margin:0 0 17px}
.v2-setting-card small{color:var(--utono-subtle);font-size:11px;line-height:1.5;display:block;margin-top:15px}
.v2-appearance-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.v2-appearance-options button{border:1px solid var(--utono-border);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;min-height:97px;border-radius:12px;background:var(--utono-surface-muted);color:var(--utono-muted);cursor:pointer}
.v2-appearance-options button strong{font-size:12px;font-weight:650}
.v2-appearance-options button.active{background:var(--utono-selected);border-color:var(--utono-action);color:var(--utono-text);box-shadow:inset 0 0 0 1px var(--utono-action)}
.v2-setting-actions{display:flex;flex-direction:column;gap:5px}
.v2-setting-actions>button{display:flex;align-items:center;gap:13px;width:100%;padding:11px 0;border:0;border-bottom:1px solid var(--utono-border);background:transparent;color:var(--utono-text);text-align:left;min-height:46px;cursor:pointer;font-size:12px}
.v2-setting-actions>button:hover{color:var(--utono-action)}
.v2-setting-actions>button>.ico:last-child{margin-left:auto;color:var(--utono-muted)}
.v2-setting-info{display:flex;align-items:center;gap:12px;font-size:12px;padding:11px 0;color:var(--utono-muted)}
.v2-signout{border:1px solid var(--utono-border);background:transparent;border-radius:10px;margin-top:24px;min-height:44px;padding:0 18px;color:var(--utono-danger);cursor:pointer}
@media(max-width:1100px){.v2-library-page .notes-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,215px),1fr))}.v2-library-controls{flex-wrap:wrap}.v2-library-page .toolbar{margin-left:auto}}
@media(max-width:720px){
  .v2-sidebar-search{margin-bottom:16px}
  .v2-library-page .page-header{display:grid;grid-template-columns:minmax(0,1fr) 45px;align-items:start;margin-bottom:18px;gap:10px}
  .v2-library-page .page-header h1{font-size:26px}
  .v2-library-heading-actions{grid-column:2;grid-row:1;align-self:start;margin-top:3px}
  .v2-library-heading-actions .action-btn{width:43px;min-width:43px;overflow:hidden;white-space:nowrap;font-size:0;gap:0;padding:0;justify-content:center}
  .v2-library-heading-actions .action-btn svg{width:20px;height:20px}
  .v2-library-controls{display:block;margin-bottom:21px;padding-bottom:13px}
  .v2-library-filters{gap:3px;flex-wrap:nowrap;overflow-x:auto;margin-bottom:12px;scrollbar-width:none}
  .v2-library-filters button{font-size:11px;padding:6px 11px;flex-shrink:0}
  .v2-library-page .toolbar{margin-left:0;justify-content:flex-end}
  .v2-library-page .notes-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
  .v2-note-card{padding:12px;min-height:216px;height:245px;gap:8px}
  .v2-note-card.v2-with-photo{height:280px}
  .v2-thumbnail-card{height:92px}
  .v2-note-card .card-title{font-size:13px}
  .v2-note-card .card-preview{font-size:11px;-webkit-line-clamp:3}
  .v2-note-card .card-menu{min-width:27px;width:27px;height:27px}
  .v2-note-card .card-bottom{margin-top:0;font-size:10px}
  .v2-folder-chip{font-size:9px;max-width:130px;min-height:22px;padding:2px 8px}
  .v2-media-chip{display:none}
  .v2-date-heading{margin-bottom:11px}
  .v2-note-group{margin-bottom:23px}
  .v2-thumbnail-row{width:60px;height:65px}
  .v2-note-row{gap:9px;padding:12px}
  .v2-note-row .row-time{display:none}
  .v2-search-sheet{top:0;bottom:0;left:0;transform:none;width:100%;max-height:100dvh;border:0;border-radius:0;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
  .v2-search-sheet header{padding:9px 14px}
  .v2-search-sheet header input{font-size:16px}
  .v2-search-results{padding-inline:12px}
  .v2-profile-page{padding-bottom:110px}
  .v2-profile-header{padding:16px;gap:12px;margin-block:21px}
  .v2-profile-avatar{width:48px;height:48px;flex-basis:48px}
  .v2-profile-header .action-btn{font-size:11px;white-space:nowrap;padding:0 10px}
  .v2-profile-header h2{font-size:16px}
  .v2-profile-grid{grid-template-columns:1fr;gap:13px}
  .v2-setting-card{padding:18px}
}
@media(max-width:380px){.v2-library-page .notes-grid{gap:9px}.v2-note-card{padding:10px;height:246px}.v2-note-card.v2-with-photo{height:274px}.v2-thumbnail-card{height:78px}.v2-note-card .card-preview{-webkit-line-clamp:2}.v2-search-sheet footer{font-size:10px}.v2-profile-header{flex-wrap:wrap}.v2-profile-header>div:nth-child(2){min-width:130px}.v2-profile-header .action-btn{margin-left:auto}}
@media(prefers-reduced-motion:reduce){.v2-search-backdrop,.v2-search-sheet,.v2-note-card{transition:none!important}}
