/* Revision 2: local layout proposal. All colors come from the live app.css. */
@media(min-width:721px){ body.compact-dashboard #app-left-rail, body.compact-list #app-left-rail { height:calc(100dvh - var(--app-header-offset)) !important; bottom:0; } }
.compact-dashboard .dashboard-header { display:flex; justify-content:space-between; align-items:center; padding:0; margin:0 0 18px; border:0; }
.compact-dashboard #app-greeting { font-size:30px; margin:0; letter-spacing:-.025em; line-height:1.25; }
.library-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; max-width:560px; margin:0 0 24px; padding:0; border-bottom:1px solid var(--border); }
.library-tabs button { display:flex; justify-content:center; align-items:center; gap:7px; min-height:44px; border:0; border-bottom:2px solid transparent; border-radius:0; padding:8px 12px; background:transparent; color:var(--muted); font-size:14px; white-space:nowrap; cursor:pointer; }
.library-tabs button[aria-selected="true"] { border-bottom-color:var(--accent); color:var(--text); font-weight:650; }
.library-tabs button span { font-size:12px; color:var(--muted); }
.library-inactive { display:none !important; }
.compact-dashboard .app-layout { grid-template-columns:minmax(0,1fr) 260px; gap:32px; }
.compact-dashboard .app-panel-header { border:0; margin:0 0 12px; padding:0; }
.compact-dashboard .app-panel-header h3 { font-size:14px; font-weight:500; color:var(--muted); }
.compact-dashboard .app-panel { margin:0 0 22px; padding:0; }
.compact-dashboard #my-lists-grid { grid-template-columns:minmax(0,1fr); gap:10px; }
.compact-dashboard #my-lists-grid>.list-card { position:relative; padding:12px; gap:6px; }
.compact-dashboard #my-lists-grid>.list-card>header { position:relative; padding:0 !important; min-height:28px; margin:0; border:0; background:transparent; }
.compact-dashboard .list-card-title { padding:0 48px 0 0; font-size:18px; line-height:1.3; text-align:left; color:var(--text); }
.r2-card-more { position:absolute; right:0; top:-3px; width:44px; height:36px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:12px; cursor:pointer; }
.compact-dashboard .stats { gap:10px; align-items:center; }
.compact-dashboard .stats span { font-size:12px; }
.compact-dashboard .app-column-aside .list-card { box-shadow:none; }
.compact-dashboard .app-column-aside .list-card-title { font-size:14px; padding-right:0; }
.compact-dashboard .app-column-aside .tags { display:none; }
.compact-dashboard .app-column-aside .app-panel-header h3 { font-size:16px; color:var(--text); }
.compact-dashboard .tag, .compact-list #list-meta-tags .tag { display:inline-flex; align-items:center; min-height:24px; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--muted); font-size:12px; padding:2px; text-decoration:none; }
.compact-dashboard .tags, .compact-list #list-meta-tags { gap:6px; }
.compact-dashboard .tag:hover, .compact-list #list-meta-tags .tag:hover { color:var(--accent-strong); text-decoration:underline; transform:none; background:transparent; }
.r2-create-dock { display:none; }
.compact-list .inline-actions { align-items:center; gap:16px; }
.compact-list .inline-actions-left { gap:8px; flex-wrap:nowrap; }
.compact-list .inline-actions-right { margin-left:auto; gap:10px; align-items:center; }
.compact-list .inline-actions .btn { min-height:42px; border-radius:.65rem; }
.compact-list #list-star-btn { border:1px solid var(--border); background:var(--surface); color:var(--text); }
.compact-list #list-star-btn[aria-pressed="true"] { border-color:var(--accent); }
.compact-mode-status { color:var(--muted); font-size:13px; white-space:nowrap; }
.compact-list:not(.list-edit-mode) #owner-undo-btn, .compact-list:not(.list-edit-mode) #owner-edit-btn, .compact-list:not(.list-edit-mode) #list-save-status { display:none; }
.list-more-wrap { position:relative; }
.compact-popover { position:absolute; right:0; top:calc(100% + 6px); z-index:100; min-width:160px; padding:5px; border:1px solid var(--border); border-radius:10px; background:var(--surface); box-shadow:var(--shadow-soft); }
.compact-menu-item { display:block; width:100%; padding:10px 12px; min-height:44px; border:0; border-radius:5px; background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.compact-list .copy-menu-item { min-height:44px; }
.compact-list #list-copy-menu { min-width:200px; }
.r2-card-menu { z-index:100; }
@media(max-width:1099px){ .compact-dashboard .app-layout { grid-template-columns:minmax(0,1fr); } .compact-dashboard .app-column-aside { display:none; } }
/* Approved compact layout. Theme colors and list-item density remain inherited. */
body.compact-dashboard .app-quickstats,.library-panel-heading{display:none}
.compact-dashboard .dashboard-header{justify-content:flex-start;gap:20px;margin-bottom:16px}
.compact-dashboard #app-greeting{font-size:27px}
.library-toolbar{display:flex;align-items:center;gap:16px;width:calc(100% - 292px);margin-bottom:12px}
.library-tabs{flex:1;max-width:450px;gap:8px;margin:0;min-width:0}
.library-tabs button{padding:6px;min-height:44px;font-size:13px}
.library-count{margin-left:3px}
.library-sort-wrap{position:relative;flex:none;margin-left:auto}
#library-sort-button{height:44px;min-width:120px;padding:8px 12px}
.library-sort-wrap .compact-popover{min-width:210px}
.compact-dashboard .app-panel{margin-bottom:12px}
.compact-dashboard:not(.library-secondary-view) #dashboard-following-panel,
.compact-dashboard:not(.library-secondary-view) #dashboard-discover-panel{display:none}
.compact-dashboard.library-secondary-view .app-layout{grid-template-columns:minmax(0,1fr)}
.compact-dashboard.library-secondary-view .app-column:not(.app-column-aside),
.compact-dashboard.library-secondary-view .library-toolbar,
.compact-dashboard.library-secondary-view .app-column-aside .app-panel:not(.library-secondary-active){display:none}
.compact-dashboard.library-secondary-view .app-column-aside{display:flex}
.compact-dashboard.library-secondary-view .app-column-aside .list-card-title{font-size:18px}
.compact-dashboard #dashboard-recent-panel .tags{display:none}
.compact-dashboard .app-column-aside #admin-tools-panel{margin-top:22px}
.compact-dashboard .app-column-aside #admin-tools-panel input{max-width:100%}
body.app-mode>footer{width:100%;margin:0;padding:10px 24px;min-height:44px;gap:12px;align-items:center;flex:none;font-size:12px;position:relative;z-index:30}
body.app-mode>footer ul{flex-wrap:wrap;gap:18px}
body.app-mode>header{padding-left:24px!important;padding-right:24px!important}
@media(min-width:721px){body.compact-dashboard #app-left-rail,body.compact-list #app-left-rail{height:calc(100dvh - var(--app-header-offset) - var(--footer-visible-overlap,0px))!important;bottom:auto}}
.compact-admin-label{font-size:11px;color:var(--muted);padding:8px 12px 2px;border-top:1px solid var(--border);margin-top:4px}
.compact-menu-item{box-shadow:none!important}
.list-more-wrap .compact-menu-item{border:0;background:transparent;width:100%;justify-content:flex-start;text-align:left;border-radius:5px}
.list-card-options{position:absolute;right:0;top:0;z-index:2}
.list-card-options[open]{z-index:50}
.list-card-options summary{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:36px;list-style:none;cursor:pointer;color:var(--muted);font-size:12px;border-radius:6px}
.list-card-options summary::-webkit-details-marker{display:none}
.list-card-options .list-card-actions{position:absolute;right:0;top:100%;display:flex;flex-direction:column;align-items:stretch;min-width:170px;padding:5px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow-soft)}
.list-card-options .list-card-actions button{width:100%;height:auto;min-height:44px;padding:8px 12px;justify-content:flex-start;white-space:nowrap;font-size:13px}
.list-card-options summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.compact-list #owner-mode-btn{min-height:42px}
#mobile-create-list-fab-wrap{right:12px;bottom:calc(12px + var(--footer-visible-overlap,0px));width:auto;height:auto}
#mobile-create-list-fab{position:static;display:flex;align-items:center;justify-content:center;min-height:44px;height:44px;width:auto;min-width:96px;padding:8px 12px;border-radius:22px;background:var(--surface);color:var(--text);border:1px solid var(--border);box-shadow:none;transform:none;font-size:14px;line-height:1.2}
#mobile-create-list-fab::before,#mobile-create-list-fab::after{display:none}
#mobile-create-list-fab-menu{position:absolute;right:0;bottom:calc(100% + 6px);top:auto;width:160px;height:auto;display:flex;flex-direction:column;padding:5px;border:1px solid var(--border);border-radius:10px;background:var(--surface);box-shadow:var(--shadow-soft);pointer-events:auto}
#mobile-create-list-fab-menu .mobile-create-list-action{position:static;transform:none;opacity:1;pointer-events:auto;width:100%;height:auto;min-height:44px;margin:0;padding:10px 12px;border:0;border-radius:5px;background:transparent;color:var(--text);box-shadow:none;text-align:left;font-size:14px}
#mobile-create-list-fab-menu .mobile-create-list-action::before,#mobile-create-list-fab-menu .mobile-create-list-action::after{display:none}
@media(max-width:1099px){.library-toolbar{width:100%}}
@media(max-width:720px){
 body.app-mode>header{padding-left:12px!important;padding-right:12px!important}
 body.compact-dashboard main{padding:16px 6px 70px}
 .compact-dashboard .dashboard{padding:0}
 .compact-dashboard .dashboard-header{gap:12px;margin:0 6px 10px}
 .compact-dashboard #app-greeting{font-size:23px}
 .compact-dashboard .compact-create{min-height:44px;padding:8px 12px;font-size:13px}
 .library-toolbar{gap:8px;margin-bottom:10px}
 .library-tabs{gap:6px;max-width:none}
 .library-tabs button{min-height:48px;font-size:12px;padding:6px 2px;gap:3px}
 .library-tabs button span{font-size:11px}
 #library-sort-button{min-width:44px;width:44px;height:48px;padding:6px;font-size:18px}
 .library-sort-label{display:none}
 .compact-dashboard #my-lists-grid{gap:8px}
 .compact-dashboard #my-lists-grid>.list-card{padding:8px 10px;gap:4px}
 .compact-dashboard #my-lists-grid>.list-card>header{min-height:44px}
 .compact-dashboard .list-card-title{display:flex;align-items:center;min-height:44px;font-size:17px}
 .list-card-options summary{min-height:44px}
 .compact-dashboard .tag,.compact-list #list-meta-tags .tag{min-height:32px;font-size:12px;padding:2px}
 .compact-dashboard .tags{gap:4px}
 body.app-mode>footer{justify-content:center;text-align:center;padding:8px 6px;gap:3px;font-size:11px;min-height:48px}
 body.app-mode>footer ul{width:100%;justify-content:center;gap:12px}
 .compact-list .inline-actions{flex-wrap:wrap;gap:10px}
 .compact-list .inline-actions .btn{min-height:44px;font-size:13px;padding:.5rem .8rem}
 .compact-list .inline-actions-left{gap:8px;flex-wrap:wrap}
 .compact-list .inline-actions-right{flex-wrap:wrap;align-items:center;gap:10px}
 .compact-list main,.compact-dashboard main{padding-bottom:70px}
 .compact-list #list-page{padding-bottom:70px}
 /* Find stays directly available while the quiet scrolled utility is hidden. */
 .compact-list #list-items-search-toggle{display:inline-flex!important;min-height:44px}
}
@media(min-width:721px) and (max-width:1099px){
 body.app-mode>header{padding:.65rem .75rem!important}
 body.app-mode>header nav{flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:.45rem}
 body.app-mode>header .brand{flex:0 0 auto;font-size:1rem;gap:.45rem}
 body.app-mode>header .brand-badge{width:32px;height:32px}
 body.app-mode>header .nav-actions{flex:1 1 auto;min-width:0;margin-left:auto;flex-wrap:nowrap;gap:.45rem}
 body.app-mode>header .search-box{flex:1 1 auto;min-width:0;max-width:none;order:0}
 body.app-mode>header .search-box input{padding:.5rem 2.25rem .5rem .7rem}
 body.app-mode>header #profile-nav-btn,body.app-mode>header #sign-out-btn,body.app-mode>header .user-chip{display:none!important}
}

@media(max-width:720px){body.compact-dashboard #create-list-btn-secondary{display:inline-flex!important}}
.compact-dashboard .list-card-options .list-card-actions .icon-btn{width:100%;height:auto;min-height:44px}
.compact-admin-tools{margin-top:18px;color:var(--muted)}
.compact-admin-tools:not(:has(.app-panel:not(.hidden))){display:none}
.compact-admin-tools>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px}
.compact-admin-tools[open]{padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.compact-admin-tools input{max-width:100%}
@media(min-width:721px) and (max-width:1099px) and (max-height:500px){body.compact-dashboard main{padding:16px 12px 32px}.compact-dashboard .dashboard{padding:0}}
@media(max-width:720px){
 .compact-list #list-items-search-toggle{position:static;inset:auto;z-index:auto;width:auto;height:44px;min-width:44px;border-radius:.65rem;padding:.5rem .8rem;box-shadow:none;font-size:14px;transform:none}
}
#mobile-create-list-fab-menu{left:auto}
#mobile-create-list-fab-menu .mobile-create-list-action{justify-content:flex-start}
