/* Consolidation using audited Foundation tokens. No new type or spacing scale. */
html [data-dj-control-level="secondary"]{background:var(--dj-action-secondary-bg,var(--accent-soft))!important;color:var(--accent)!important;border-color:var(--accent)!important}
html [data-dj-control-level="utility"]{background:transparent!important;border-color:transparent!important;color:var(--ink)!important}
html [data-dj-control-level="destructive"]{background:transparent!important;border:1px solid var(--accent)!important;color:var(--accent)!important}
html [data-dj-control-level]:is(:focus-visible){outline:2px solid var(--ink);outline-offset:2px}
.v68-design-controls>.v41-switch{display:none}
/* Labels own their width; compound choices form a separate row on a phone. */
.settings-row>div:first-child{min-width:0;word-break:normal;overflow-wrap:normal;}
@media(max-width:599px){
 html body .settings-row{gap:var(--dj-space-3,var(--dj-space-3));}
 html body .settings-row:has(.v56-weekdays,.v22-style-picker,.v68-design-controls,select,input[type="time"]){display:flex!important;flex-direction:column;align-items:stretch;}
 html body .settings-row:has(.v56-weekdays)>div:first-child{width:100%;}
 html body .v56-weekdays{display:flex;flex-wrap:wrap;gap:var(--dj-space-2,var(--dj-space-2));width:100%;}
 html body .v56-weekday-toggle{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;flex:0 0 44px;}
 html body .settings-row :is(select,.v22-style-picker,.v68-design-controls){max-width:100%;width:100%;}
 html body .settings-row:has(input[type="time"])>div:last-child{display:flex;flex-wrap:wrap;gap:var(--dj-space-2);align-items:center;}
 html body .settings-row input[type="time"]{flex:1;min-width:130px;max-width:100%;}
 html[data-dj-notes-security] body .main{padding-bottom:var(--dj-content-clearance,calc(calc(var(--dj-space-8) + var(--dj-space-8) + var(--dj-space-4)) + env(safe-area-inset-bottom)))!important;scroll-padding-bottom:var(--dj-content-clearance,80px);}
}
.notes-security-actions,.notes-import-actions{display:flex;flex-wrap:wrap;gap:var(--dj-space-2,var(--dj-space-2));margin-block:var(--dj-space-3,var(--dj-space-3));}
.notes-security-settings :is(.notes-security-actions,.notes-import-actions) button{min-height:44px;flex:1 1 180px;text-align:start;}
.notes-security-settings .notes-import-settings{border-top:1px solid var(--line);margin-top:var(--dj-space-5,calc(var(--dj-space-4) + var(--dj-space-1)));padding-top:var(--dj-space-4,var(--dj-space-4));}
.notes-security-settings h4{font:var(--dj-text-body-weight,600) var(--dj-text-body-size,14px)/var(--dj-text-reading-line-height) var(--font-ui,system-ui);margin:0 0 var(--dj-space-2);}
.notes-security-settings>label{display:flex;align-items:center;gap:var(--dj-space-2);flex-wrap:wrap;margin-block:var(--dj-space-3);}
html[data-interface-design] body :is(.tp-time,.tp-calendar-time)[data-has-date="true"]{color:var(--success,#2f7d4f)!important}
html[data-interface-design] body :is(.tp-time,.tp-calendar-time)[data-has-date="true"].tp-overdue{color:var(--danger,#c53e3e)!important}
html :is([data-v17-no-deadline],[data-v27-project-no-date],.v30-stone-no-date,[data-v40-time-open]){border:1px solid var(--line);border-radius:var(--dj-radius-chip);background:var(--accent-soft);cursor:pointer}
html :is([data-v17-no-deadline],[data-v27-project-no-date],.v30-stone-no-date,[data-v40-time-open]):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.dj-empty-glyph{display:inline-grid;place-items:center;color:var(--muted);padding:var(--dj-space-4)}
.dj-empty-glyph>.v22-icon{width:52px!important;height:52px!important}
.dj-analytics-empty{margin:0;padding:var(--dj-space-3) 0;color:var(--muted);font-size:var(--dj-text-reading-size);font-weight:var(--dj-text-reading-weight);line-height:var(--dj-text-reading-line-height)}
html .v51-analytics-section:has(.dj-analytics-empty){border-radius:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.rightbar[data-dj-inspector-mode] h2{font-size:var(--dj-text-heading-size);font-weight:var(--dj-text-heading-weight);line-height:var(--dj-text-heading-line-height);margin:var(--dj-space-2) 0;overflow-wrap:anywhere}
.rightbar[data-dj-inspector-mode] p{font-size:var(--dj-text-reading-size);font-weight:var(--dj-text-reading-weight);line-height:var(--dj-text-reading-line-height);color:var(--muted);overflow-wrap:anywhere}
.rightbar[data-dj-inspector-mode="selection"] .rightbar-frozen>.capacity,.rightbar[data-dj-inspector-mode="insight"] .rightbar-frozen>.capacity{display:none}
.rightbar .capacity-row{gap:var(--dj-space-2);flex-wrap:wrap}
html .dj-inspector-selected{box-shadow:inset 3px 0 var(--accent)!important;background:var(--accent-soft)!important}
/* Utility icons stay recognisable within an expressive surface. */
[data-dj-art-owner] :is(.v22-role-utility,.v22-role-entity)>.v22-echo{display:none}
html[data-interface-design="claude"] [data-dj-art-intensity="trace"]{box-shadow:none!important}
html[data-interface-design="claude"] .v17-ritual-card[data-dj-art-intensity="trace"]{border-width:1px!important;background:var(--panel)!important}
html[data-interface-design="claude"] .v17-ritual-card[data-dj-art-intensity="trace"]::before{display:block!important;opacity:.55}
html[data-interface-design="claude"] .v17-ritual-card[data-dj-art-intensity="trace"]::after{display:block!important;opacity:.55;height:3px}
html[data-interface-design="claude"] [data-dj-art-intensity="trace"]>.ritual-pattern-bottom{display:none!important}
html[data-interface-design="claude"] [data-dj-art-intensity="trace"] .gaudi-mosaic{display:none}
html[data-interface-design="claude"] .v51-analytics-section[data-dj-art-intensity="trace"]{border-radius:var(--dj-radius-popup)!important}
html[data-interface-design="claude"] [data-dj-art-variant="compact"] .gaudi-mosaic{opacity:.45}
html[data-interface-design="claude"] [data-dj-art-variant="compact"].v17-ritual-card{border-width:1px!important;padding:var(--dj-space-4)!important}

/* Shapes may be expressive; glyphs and numbers remain level. */
html[data-interface-design]:not([data-interface-design="drunk"]) :is(.habit-history-cell,.weight-day,.ritual-square){transform:none!important;rotate:0deg!important}

.r27-dashboard-idea .r26-dashboard-metric:first-child{grid-column:1 / -1}
.r27-dashboard-idea .r26-dashboard-metric:not(:first-child) b{font-size:var(--dj-text-secondary-size);font-weight:var(--dj-text-secondary-weight);color:var(--muted)}
@media(min-width:600px) and (max-width:1024px){.r26-dashboard-launchers{flex-direction:column!important;align-items:center!important}}

html .v51-analytics-section:has(.dj-analytics-empty){padding:var(--dj-space-3) 0!important;margin:0!important}
html .v51-analytics-section:has(.dj-analytics-empty) .v51-section-title{justify-content:flex-start;padding:0;min-height:var(--dj-minheight-popup-row)}
html .v51-analytics-section .dj-analytics-empty{padding:var(--dj-space-1) 0}

/* Utility glyphs inherit the control foreground, including themed artwork. */
html body button .v22-role-utility .guest-icon-art :is(.stroke-a,.stroke-a2){stroke:currentColor!important}
html body button .v22-role-utility .guest-icon-art :is(.fill-a,.fill-a2){fill:currentColor!important}
html body .v19-task-menu .r26-cancel{background:var(--accent-soft)!important;color:var(--accent)!important}
/* Legacy modal actions add text check/cross pseudo-glyphs. Icon controls already
   provide their canonical glyph and must not render a second mark. */
html body .modal .modal-actions .btn:has(>.v22-icon)::after{content:none!important}
/* Settings disclosure rows use body text and a compact, full-width touch target.
 * This rule owns the common appearance across all section renderers. */
html body :is(.v41-settings-section,.settings-section,.v19-settings-section)>h3{font-size:var(--dj-text-body-size)!important;font-weight:var(--dj-text-body-weight)!important;line-height:var(--dj-text-body-line-height)!important;text-transform:none!important;letter-spacing:normal!important;color:var(--ink)!important;margin:0 0 0 var(--dj-space-4)!important}
html body :is(.v41-settings,.v20-settings-groups)>:is(.v41-settings-section,.settings-section,.v19-settings-section){margin-block:0!important;padding-block:var(--dj-space-1)!important;min-block-size:56px;box-sizing:border-box;}
html[data-interface-design="claude"] .v17-ritual-card{border-color:#544b40!important}
html[data-interface-design="claude"] .v17-ritual-card::before{border-color:#544b40!important}
html[data-interface-design="claude"] .v17-ritual-card::after,html[data-interface-design="claude"] .ritual-pattern-bottom{opacity:.75}
html[data-interface-design="claude"] .v16-habit-row{border:2px solid color-mix(in srgb,#bc775c 50%,var(--panel))!important;border-radius:22px 9px 20px 12px / 12px 20px 10px 18px!important;border-inline-start:4px solid #bc775c!important}
@media(max-width:599px){
  html body .v75-mobile-backdrop{bottom:calc(var(--r26-phone-bar-height,68px) + env(safe-area-inset-bottom,0px))!important;padding-bottom:0!important}
  html body .v76-mobile-actions:empty,html body .v76-mobile-actions:has(>.actions:empty){display:none!important;min-height:0!important;margin:0!important;padding:0!important}
  html body .v76-mobile-main-row .v76-header-button,html body .v76-mobile-main-row .v76-rose-button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;border-radius:var(--dj-radius-circle,50%)!important}
  html body :is(.v18-action-dock,.notes-focus-pair,#dv-mic-wrap){position:fixed!important}
  html body .r27-contact-search:not([data-search-open="true"]){display:none}
  html body .v76-mobile-main-row .dj-contact-search-toggle{position:static;width:44px;height:44px;min-width:44px;border-radius:var(--dj-radius-circle,50%)}
}
@media(min-width:600px) and (max-width:1024px){
  html body .v76-rose-menu{position:fixed!important;left:calc(var(--r26-tablet-rail,64px) + 1px)!important;transform:none!important;translate:none!important;animation:none!important;transition:none!important;margin:0!important}
}

html[data-interface-design="claude"] .v43-goal-capacity{background:var(--grille-ghost)!important;border:0!important;min-height:9px}
html[data-interface-design="claude"] .v43-goal-capacity>i{background:var(--grille-ink)!important;opacity:1!important}
html[data-interface-design="claude"] .v43-goal-progress{color:var(--ink);font-variant-numeric:tabular-nums}
.habit-history-row:empty,.v19-habit-state:empty{display:none}
.dj-habit-project{font-weight:var(--dj-text-heading-weight);overflow-wrap:anywhere}
.v19-habit-state{display:flex;align-items:center;gap:var(--dj-space-2);flex-wrap:wrap}
@media(max-width:599px){
  .v76-mobile-main-row:has([data-contact-search-toggle]) [data-v76-focus]{display:none!important}
.habit-history-caption{font-size:var(--dj-text-secondary-size)}
  .tp-line3:empty,.tp-line2:empty{display:none}
  .tp-line3{max-height:24px;overflow:hidden}
}

.tp-row[data-tp-variant="habit"]:has([data-v18-habit-menu]) .tp-menu-fallback{display:none}
@media(max-width:599px){.v46-streak-explain{display:none}}

/* One property-row component for Task, numeric Goal and Project editors.
 * Entity artwork and field-specific behavior remain with their owners. */
.dj-entity-editor{--dj-editor-field-bg:var(--panel);--r21-field-bg:var(--panel);--dj-task-property-min-height:44px;--dj-task-property-padding-x:12px;--v19-row-radius:var(--dj-radius-chip);}
html body .modal.dj-entity-editor{box-sizing:border-box;width:min(600px,calc(100vw - 32px))!important;padding:var(--dj-space-4,var(--dj-space-4))!important;border-radius:var(--dj-radius-popup)!important;}
html body .modal.dj-entity-editor>form.dj-entity-editor{padding:0!important;margin:0!important;width:100%!important;}
html body .dj-entity-editor :is(.v35-title-editor,.r21-editor-head>input,.v40-title-wrap>input){font-family:var(--font-display,var(--font-ui,system-ui))!important;font-size:var(--dj-text-heading-size,22px)!important;line-height:var(--dj-text-heading-line-height,1.35)!important;}
/* The --dj-row-* properties let an owner group rows into one card or turn a head into a section title
 * (task menu, D-169) without another !important; unset, every row is a separate framed card. */
html body .dj-entity-editor:is(.v19-task-menu.v19-task-menu.v19-task-menu.v19-task-menu,.r21-entity-editor) :is(.time-line,.v18-priority-row,.v18-artifact-row,.r21-entity-field,.r23-project-row,.r23-comment-head,.subtask-panel>.section-head,.v18-comments-head){min-height:var(--dj-row-min-height,44px)!important;height:auto!important;margin-block:var(--dj-row-gap-top,var(--dj-space-2)) var(--dj-row-gap-bottom,var(--dj-space-2))!important;padding:var(--dj-row-pad-y,var(--dj-space-2)) var(--tm20-priority-right-pad,var(--dj-space-3,var(--dj-space-3))) var(--dj-row-pad-y,var(--dj-space-2)) var(--dj-row-pad-left,var(--dj-space-3))!important;border:1px solid var(--dj-row-border,var(--line))!important;border-radius:var(--dj-row-radius,var(--dj-radius-chip))!important;background:var(--dj-row-bg,var(--dj-editor-field-bg))!important;overflow:visible!important;}
html body .dj-entity-editor .v19-pickers-chips{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;width:100%;gap:var(--dj-space-2,var(--dj-space-2))!important;}
html body .dj-entity-editor.v19-task-menu.v19-task-menu.v19-task-menu .v19-pickers-chips>button{box-sizing:border-box;flex:1 1 130px!important;max-width:100%;min-width:0!important;min-height:44px!important;height:auto!important;padding:var(--dj-space-2)!important;border-radius:var(--dj-radius-chip)!important;border:1px solid var(--line)!important;background:var(--panel)!important;color:var(--ink)!important;white-space:normal!important;overflow-wrap:anywhere;}
html body .dj-entity-editor.v19-task-menu.v19-task-menu.v19-task-menu .v19-pickers-chips>button:not([data-dj-extra-artifacts]){margin:0!important}
html body .dj-entity-editor .v19-pickers-chips>button>span:not(.v22-icon){white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}
html body .dj-entity-editor :is(.r21-editor-head,.task-head-v09,.v40-goal-head){gap:var(--dj-space-2,var(--dj-space-2))!important;margin-bottom:var(--dj-space-3,var(--dj-space-3))!important;}
html body .dj-entity-editor :is(.r21-editor-footer,.modal-actions){gap:var(--dj-space-2,var(--dj-space-2))!important;}
/* Property rows own their surface; legacy grouping nodes do not add another box. */
html body .dj-entity-editor .r30-editor-group{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;}
html body .dj-entity-editor .r30-editor-group :is(.r23-project-stack,.r23-project-comments){border-top:0!important;}
@media(max-width:1024px){
 html body .dj-entity-editor :is(.btn.icon-only,.v22-icon-button,.v40-goal-head>.task-state-check,.r21-icon-button,.v76-task-state-toggle,[data-v18-comments-add],[data-v18-comments-toggle],[data-v38-more],[data-v38-add]){--dolijane-mobile-control-size:44px!important;min-width:44px!important;min-height:44px!important;max-width:none!important;max-height:none!important;}
 html body .dj-entity-editor :is(input:not([type=hidden],[type=checkbox],[type=color]),select){min-height:44px;max-width:100%;}
}
/* In ordinary Ritual viewing an empty feed is a creation action, not content.
 * Keep the editor's empty comments section and all existing composer handlers. */
.v17-ritual-card .dj-empty-ritual-feed{border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important;margin:var(--dj-space-2) 0 0!important;min-height:0!important;}
.v17-ritual-card .dj-empty-ritual-feed .compact-feed-head{display:flex;justify-content:flex-end;padding:0!important;height:auto!important;min-height:44px!important;}
.v17-ritual-card .dj-empty-ritual-feed .compact-feed-head>:not([data-feed-add],.compact-feed-actions),.v17-ritual-card .dj-empty-ritual-feed .compact-feed-actions>:not([data-feed-add]),.v17-ritual-card .dj-empty-ritual-feed>:not(.compact-feed-head){display:none!important;}
html body .v17-ritual-card .dj-empty-ritual-feed .compact-feed-head [data-feed-add]{--v77-circle-size:44px!important;inline-size:44px!important;block-size:44px!important;min-inline-size:44px!important;min-block-size:44px!important;min-width:44px!important;min-height:44px!important;}
html body .r26-favorite-stack[hidden]{display:none!important;}
