/* Mac planning canvas. A single page-wide switch reveals secondary detail. */
body.in-objectives #sidebar, body.in-objectives #detail, body.in-objectives #quickAddWrap { display: none; }
body.in-objectives #main { flex: 1; border: 0; }
body.in-objectives #viewTitle { padding: 22px clamp(32px, 4vw, 72px); border-bottom: 1px solid var(--line); gap: 28px; }
body.in-objectives #viewTitle button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--hover); border: 0; border-radius: 7px; color: var(--text); padding: 7px 11px; font-size: 13px; font-weight: 400; cursor: pointer; }
body.in-objectives #viewTitle button:hover { background: #303030; }
body.in-objectives #viewTitle .op-back { background: transparent; color: #aaaab3; padding-left: 0; font-size: 14px; }
.op-header-start, .op-header-actions { display: flex; align-items: center; gap: 24px; }
.op-header-actions { margin-left: auto; gap: 12px; }
.op-current-date { font-size: 13px; font-weight: 400; color: #aaaab3; margin-right: 12px; }
#rows.obj-mount { padding: 34px clamp(32px, 4vw, 72px) 64px; position: relative; }
#rows.obj-mount button { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 0; border-radius: 6px; color: #aaaab3; padding: 5px 0; font-size: 14px; cursor: pointer; }
#rows.obj-mount button:hover { color: var(--text); }
#rows.obj-mount button:focus-visible, .op-dialog button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#rows.obj-mount svg { flex-shrink: 0; }
#rows.obj-mount .op-direction { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
#rows.obj-mount .op-horizon { display: flex; flex-direction: column; min-width: 0; height: clamp(300px, 46vh, 560px); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#rows.obj-mount .op-period { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
#rows.obj-mount .op-period h2 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
#rows.obj-mount .op-period > span { font-size: 13px; color: #aaaab3; }
#rows.obj-mount .op-nav { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; }
#rows.obj-mount .op-nav button { width: 26px; height: 26px; justify-content: center; padding: 0; font-size: 20px; color: #888892; }
#rows.obj-mount .op-nav button:hover { background: var(--hover); color: var(--text); }
#rows.obj-mount .op-horizon-goals { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 0 18px; position: relative; scrollbar-width: thin; scrollbar-color: #55555f transparent; }
#rows.obj-mount .op-horizon-goals::-webkit-scrollbar { width: 5px; }
#rows.obj-mount .op-horizon-goals::-webkit-scrollbar-thumb { background: #55555f; border-radius: 5px; }
#rows.obj-mount .op-horizon-goals:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#rows.obj-mount .op-objective { padding: 8px 0; }
#rows.obj-mount .op-objective + .op-objective { border-top: 1px solid var(--line); }
#rows.obj-mount .op-objective-line { display: flex; align-items: baseline; gap: 14px; }
#rows.obj-mount .op-objective .otitle { flex: 1; min-width: 0; font-size: 16px; line-height: 1.4; }
#rows.obj-mount .op-objective-status { flex-shrink: 0; font-size: 12px; line-height: 1.4; gap: 6px; padding: 2px 0; white-space: nowrap; }
#rows.obj-mount .op-horizon-empty { display: flex; flex-direction: column; justify-content: center; height: 100%; gap: 8px; max-width: 31ch; padding: 16px 0; }
#rows.obj-mount .op-horizon-empty p { color: var(--text); font-size: 15px; line-height: 1.5; }
#rows.obj-mount .op-horizon-empty span { color: #aaaab3; font-size: 13px; line-height: 1.5; }
#rows.obj-mount .otitle { display: block; min-width: 1ch; max-width: 100%; font-size: 19px; line-height: 1.5; overflow-wrap: anywhere; cursor: text; border-radius: 4px; }
#rows.obj-mount .otitle:focus { outline: 1px solid #484852; outline-offset: 4px; }
#rows.obj-mount .struck { text-decoration: line-through; color: #96969f; }
#rows.obj-mount .failed { text-decoration: line-through; text-decoration-color: #ff4d4d; text-decoration-thickness: 2px; }
#rows.obj-mount .op-horizon-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 10px 18px; border-top: 1px solid var(--line); flex-shrink: 0; }
#rows.obj-mount .op-horizon-actions button { font-size: 13px; }
#rows.obj-mount .op-horizon-actions svg { width: 15px; height: 15px; }
#rows.obj-mount .op-horizon-count { color: #aaaab3; font-size: 12px; }
#rows.obj-mount .op-empty { color: #9999a3; font-size: 16px; line-height: 1.6; }
#rows.obj-mount .op-week-heading { display: flex; align-items: baseline; gap: 12px; margin: 20px 0 16px; }
#rows.obj-mount .op-week-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
#rows.obj-mount .op-week-heading > span:not(.op-nav) { font-size: 12px; color: #aaaab3; }
/* Arrows first, so the week name's width never moves them (Duy, 2026-12-02). */
#rows.obj-mount .op-week-heading .op-nav { margin-left: -8px; gap: 0; align-self: center; }
#rows.obj-mount .op-workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); align-items: start; }
#rows.obj-mount .op-group { padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
#rows.obj-mount .op-group:first-child { padding-top: 0; }
#rows.obj-mount .op-group-head { display: flex; align-items: baseline; gap: 16px; }
#rows.obj-mount .op-group-head .otitle { flex: 0 1 auto; font-size: 16px; line-height: 1.4; font-weight: 500; }
#rows.obj-mount .op-disclose { width: 24px; height: 24px; justify-content: center; font-size: 16px; flex-shrink: 0; }
#rows.obj-mount .op-steps { padding: 12px 0 0; cursor: default; }
#rows.obj-mount .op-step { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#rows.obj-mount .op-step-copy { display: flex; align-items: baseline; gap: 14px; flex: 1; min-width: 0; }
#rows.obj-mount .op-step .otitle { font-size: 14px; line-height: 1.4; }
#rows.obj-mount .op-step-status { flex-shrink: 0; white-space: nowrap; font-size: 12px; padding: 2px 0; }
#rows.obj-mount .op-check { display: inline-flex; justify-content: center; align-items: center; width: 21px; height: 21px; border: 1px solid #9999a3; border-radius: 50%; flex: 0 0 21px; padding: 0; font-size: 14px; color: var(--panel2); }
#rows.obj-mount .op-check.checked { background: #b8b9c3; border-color: #b8b9c3; }
#rows.obj-mount .op-check:hover { border-color: var(--text); color: var(--panel2); }
#rows.obj-mount .op-assign { font-size: 13px; flex-shrink: 0; padding: 5px; }
#rows.obj-mount .op-add { color: #aaaab3; }
#rows.obj-mount .op-new-week { margin-top: 10px; }
#rows.obj-mount .op-workspace .op-add { font-size: 13px; }
#rows.obj-mount .op-workspace .op-check { width: 18px; height: 18px; flex-basis: 18px; font-size: 12px; }
#rows.obj-mount .op-days { display: grid; grid-template-columns: 28px repeat(7, minmax(0, 1fr)) 28px; gap: 6px; margin-bottom: 12px; }
#rows.obj-mount .op-day-arrow { justify-content: center; align-self: center; height: 32px; padding: 0; font-size: 24px; }
#rows.obj-mount .op-day-arrow:hover { background: var(--hover); }
#rows.obj-mount .op-day { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 7px 3px; border: 1px solid transparent; border-radius: 9px; min-width: 0; }
#rows.obj-mount .op-day-name { font-size: 12px; line-height: 16px; }
#rows.obj-mount .op-day strong { color: var(--text); font-size: 17px; line-height: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
#rows.obj-mount .op-day:hover { background: #222126; }
#rows.obj-mount .op-day[aria-pressed="true"] { background: #2d2639; color: #c3a4ed; }
#rows.obj-mount .op-day[aria-pressed="true"] strong { color: #c3a4ed; }
#rows.obj-mount .op-day[aria-current="date"] { border-color: #77628e; }
#rows.obj-mount .op-today-label { color: #c3a4ed; font-weight: 600; }
#rows.obj-mount .op-dot { width: 4px; height: 4px; border-radius: 50%; background: #aaaab3; }
#rows.obj-mount .op-dot.empty { background: transparent; }
#rows.obj-mount .op-day-mark { display: flex; align-items: center; justify-content: center; height: 16px; }
#rows.obj-mount .op-day-earned, #rows.obj-mount .op-day-failed { display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #8ee3b2; color: #193d2a; font-size: 12px; font-weight: 700; }
#rows.obj-mount .op-day-card { padding: 18px; border-radius: 10px; background: #24242a; max-height: 55vh; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #55555f transparent; }
#rows.obj-mount .op-day-card::-webkit-scrollbar { width: 5px; }
#rows.obj-mount .op-day-card::-webkit-scrollbar-thumb { background: #55555f; border-radius: 5px; }
#rows.obj-mount .op-day-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#rows.obj-mount .op-day-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: #aaaab3; font-size: 12px; margin-bottom: 14px; }
#rows.obj-mount .op-day-label > span:last-child { font-size: 12px; }
#rows.obj-mount .op-day-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#rows.obj-mount .op-missed-plan { font-size: 12px; color: #aaaab3; padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
#rows.obj-mount .op-missed-plan:hover { color: #ef8585; background: #ef858510; }
#rows.obj-mount .op-missed-plan[aria-pressed="true"] { color: #ef8585; }
#rows.obj-mount .op-missed-plan:disabled { opacity: .5; }
#rows.obj-mount .op-day-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
#rows.obj-mount .op-day-item .op-check { margin-top: 3px; }
#rows.obj-mount .op-day-copy { flex: 1; min-width: 0; }
#rows.obj-mount .op-day-line { display: flex; align-items: baseline; gap: 14px; }
#rows.obj-mount .op-day-controls { display: inline-flex; align-items: baseline; gap: 12px; flex-shrink: 0; margin-left: auto; }
#rows.obj-mount .op-priority { flex-shrink: 0; width: 92px; padding: 5px 20px 5px 9px; border: 1px solid #44444e; border-radius: 6px; background-color: transparent; color: color-mix(in srgb, var(--op-priority-color) 75%, white); font: inherit; font-size: 12px; cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #aaaab3 50%), linear-gradient(135deg, #aaaab3 50%, transparent 50%); background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
#rows.obj-mount .op-priority option { background: #24242a; color: var(--text); }
#rows.obj-mount .op-priority:hover { border-color: #777781; }
#rows.obj-mount .op-priority:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#rows.obj-mount .op-priority:disabled { opacity: .5; cursor: wait; }
#rows.obj-mount .op-day-title { font-size: 16px; line-height: 1.4; letter-spacing: 0; padding: 0; text-align: left; color: var(--text); overflow-wrap: anywhere; }
#rows.obj-mount .op-day-title.struck { color: #96969f; }
#rows.obj-mount .op-parent { font-size: 12px; color: #aaaab3; margin-top: 4px; }
#rows.obj-mount button.op-parent { display: flex; text-align: left; padding: 2px 0; }
#rows.obj-mount .op-child-title { flex: 1; min-width: 0; text-align: left; color: var(--text); }
#rows.obj-mount .op-steps { margin-left: 9px; padding-left: 18px; border-left: 1px solid #414148; }
.op-dialog .op-parent-note { margin: -8px 0 18px; font-size: 13px; line-height: 1.4; color: #aaaab3; }
.op-dialog .op-parent-field { margin-bottom: 18px; color: #b2b2bc; font-size: 14px; }
.op-dialog .op-parent-field input[type="hidden"] { display: none; }
.op-dialog .op-parent-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid #41414a; background: #29292f; text-align: left; font-size: 15px; }
.op-dialog .op-parent-trigger span:first-child { min-width: 0; overflow-wrap: anywhere; }
.op-dialog .op-parent-trigger small { display: block; margin-top: 4px; color: #aaaab3; font-size: 12px; }
.op-dialog .op-parent-trigger:disabled { cursor: default; }
.op-dialog .op-parent-trigger[aria-expanded="true"] { border-color: #bda1f2; }
.op-dialog .op-parent-panel { margin-top: 8px; padding: 8px; border: 1px solid #51515c; border-radius: 9px; background: #202025; }
.op-dialog .op-parent-panel[hidden] { display: none; }
.op-dialog .op-parent-panel input { margin: 0 0 6px; font-size: 14px; padding: 9px 10px; }
.op-dialog .op-parent-results { max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.op-dialog .op-parent-period { padding: 12px 10px 5px; font-size: 12px; font-weight: 600; color: #bda1f2; }
.op-dialog .op-parent-choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; padding: 9px 10px; text-align: left; overflow-wrap: anywhere; }
.op-dialog .op-parent-choice[aria-pressed="true"] { background: #30273f; color: #cbb4f4; }
.op-dialog .op-parent-clear { color: #aaaab3; width: 100%; text-align: left; }
.op-dialog .op-parent-empty { padding: 10px; color: #aaaab3; font-size: 14px; }
.op-objective-editor .op-parent-field { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; margin: 0; font-size: 13px; }
.op-objective-editor .op-parent-field > span { padding-top: 12px; }
.op-objective-editor .op-parent-trigger { margin: 0; }
.op-dialog .op-category-field input[type="hidden"] { display: none; }
.op-dialog .op-category-field select:disabled { opacity: 1; color: #c4c4cd; background-image: none; }
.op-dialog .op-category-source { display: block; margin: -10px 0 18px; font-size: 12px; color: #aaaab3; }
.op-dialog .op-category-source[hidden] { display: none; }
.op-objective-editor .op-category-source { margin: 5px 0 0 104px; }
#rows.obj-mount .op-day-empty { font-size: 16px; margin: 0 0 14px; }
.op-dialog { margin: auto; width: 480px; max-width: calc(100vw - 64px); max-height: calc(100vh - 64px); overflow-y: auto; padding: 28px; background: #26262d; color: var(--text); border: 1px solid #3a3a43; border-radius: 15px; box-shadow: 0 20px 70px #0006; font-size: 15px; }
.op-dialog::backdrop { background: #0008; }
.op-dialog h2 { font-size: 23px; font-weight: 600; margin: 0 0 20px; }
.op-dialog label { display: block; font-size: 14px; color: #b2b2bc; margin-bottom: 18px; }
.op-dialog input:not([type="checkbox"]), .op-dialog select { display: block; width: 100%; background: #19191e; color: var(--text); border: 1px solid #41414a; border-radius: 7px; font-size: 16px; padding: 10px 12px; margin-top: 8px; }
.op-dialog select { -webkit-appearance: none; appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, #b2b2bc 50%), linear-gradient(135deg, #b2b2bc 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 13px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.op-dialog input:focus, .op-dialog select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.op-dialog input[type="date"] { color-scheme: dark; min-height: 42px; }
.op-dialog .op-day-picker { position: relative; margin-bottom: 18px; color: #b2b2bc; font-size: 14px; }
.op-dialog .op-day-picker input[type="hidden"] { display: none; }
.op-dialog .op-day-picker-button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; margin-top: 8px; padding: 10px 12px; border: 1px solid #41414a; background: #19191e; font-size: 16px; text-align: left; }
.op-dialog .op-day-picker-button svg { width: 20px; height: 20px; flex-shrink: 0; color: #b2b2bc; }
.op-dialog .op-day-calendar { position: relative; margin-top: 10px; padding: 12px; border: 1px solid #41414a; border-radius: 10px; background: #202025; }
.op-dialog .op-day-calendar .cal { border: 0; padding: 0; }
.op-dialog .op-day-calendar .cal-head { padding: 0 0 12px; }
.op-dialog .op-day-calendar .cal-title { font-size: 19px; }
.op-dialog .op-day-calendar .cal-nav { display: flex; gap: 4px; }
.op-dialog .op-day-calendar .cal-nav button { width: 40px; height: 40px; padding: 0; font-size: 26px; }
.op-dialog .op-day-calendar .cal-dow { font-size: 14px; padding-bottom: 8px; }
.op-dialog .op-day-calendar .cal-grid { gap: 4px; }
.op-dialog .op-day-calendar .cal-d { width: 100%; height: 44px; padding: 0; border-radius: 7px; font-size: 17px; }
.op-dialog .op-day-calendar .cal-d.out { color: #83838d; }
.op-dialog .op-day-calendar .cal-d.today { color: #bda1f2; }
.op-dialog .op-day-calendar .cal-d.sel { background: #bda1f2; color: #241b32; }
.op-dialog .op-day-calendar .op-no-date { width: 100%; min-height: 44px; margin: 0 0 12px; border: 1px solid #51515c; background: transparent; text-align: center; }
.op-dialog .op-day-calendar .op-no-date[aria-pressed="true"] { border-color: #bda1f2; color: #bda1f2; }
.op-dialog .op-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.op-dialog .op-form-row > label { min-width: 0; }
.op-dialog button { padding: 7px 10px; background: transparent; border: 0; border-radius: 7px; color: var(--text); font-size: 14px; cursor: pointer; }
.op-dialog button:hover { background: #34343c; }
.op-dialog button:disabled { opacity: .5; cursor: wait; }
.op-dialog .op-dialog-context { color: #aaaab3; font-size: 15px; line-height: 1.5; margin-bottom: 22px; }
.op-dialog .op-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.op-dialog .op-primary { color: #24242a; background: #e3e3e8; padding: 9px 17px; }
.op-dialog .op-primary:hover { background: #fff; }
.op-dialog .op-month-picker { margin-bottom: 16px; }
.op-dialog .op-month-year { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.op-dialog .op-month-year strong { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.op-dialog .op-month-year button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #414148; font-size: 26px; padding: 0; }
.op-dialog .op-month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.op-dialog .op-month-choice { position: relative; display: block; margin: 0; cursor: pointer; }
.op-dialog .op-month-choice input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; clip-path: inset(50%); }
.op-dialog .op-month-choice span { display: grid; place-items: center; min-height: 46px; border: 1px solid #414148; border-radius: 7px; color: #d3d3da; font-size: 15px; background: #2b2b30; }
.op-dialog .op-month-choice:hover span { border-color: #777781; }
.op-dialog .op-month-choice input:checked + span { border-color: #b69af0; background: #342c43; color: #e0ccff; }
.op-dialog .op-month-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.op-dialog .op-month-choice input:disabled + span { opacity: .5; cursor: wait; }
.op-dialog .op-month-destination { margin-bottom: 8px; font-size: 15px; color: #e0ccff; }
.op-dialog .op-secondary-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.op-dialog .op-secondary-actions button { color: #b2b2bc; padding-left: 0; }
.op-dialog .op-form-error { color: #efa7a7; font-size: 14px; margin-top: 12px; }
.op-dialog .op-value-field { margin-bottom: 18px; font-size: 14px; color: #b2b2bc; }
.op-dialog .op-value-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.op-dialog .op-value-options .op-value-choice { position: relative; display: block; min-width: 0; margin: 0; cursor: pointer; }
.op-dialog .op-value-choice input { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
.op-dialog .op-value-choice span { display: block; padding: 9px 3px; border: 1px solid #414148; border-radius: 6px; background: #2b2b30; color: #b2b2bc; font-size: 13px; line-height: 16px; text-align: center; }
.op-dialog .op-value-choice:hover span { border-color: #777781; }
.op-dialog .op-value-choice input:checked + span { border-color: #b69af0; background: #342c43; color: #e0ccff; }
.op-dialog .op-value-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.op-dialog .op-value-choice input:disabled + span { opacity: .5; cursor: wait; }
.op-dialog .op-history { padding: 12px 0; border-top: 1px solid #41414a; }
.op-dialog summary { cursor: pointer; color: #b2b2bc; font-size: 14px; }
.op-dialog .op-history-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 18px; }
.op-dialog .op-day-choices label, .op-dialog .op-checkbox-label { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.op-dialog .op-assign-week { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: #aaaab3; font-size: 13px; }
.op-dialog .op-assign-week button { font-size: 22px; padding: 2px 12px; color: #aaaab3; }
.op-dialog .op-day-choices label > span:first-of-type { min-width: 70px; }
.op-dialog .op-assign-today { margin-left: auto; color: #c3a4ed; font-size: 12px; }
.op-dialog input[type="checkbox"] { width: 17px; height: 17px; accent-color: #b8b9c3; }
.op-dialog .op-choice { display: flex; flex-direction: column; width: 100%; text-align: left; border-bottom: 1px solid #41414a; border-radius: 0; padding: 13px 0; font-size: 16px; }
.op-dialog .op-choice small { color: #aaaab3; font-size: 12px; margin-top: 5px; }
/* Category is an emoji. Value alone colors the title. */
[data-value-color] { --op-value-color: var(--text); }
[data-value-color="1Thing"] { --op-value-color: #b69af0; }
[data-value-color="High"] { --op-value-color: #e99b78; }
[data-value-color="Mid"] { --op-value-color: #d4b86a; }
[data-value-color="Low"] { --op-value-color: #91adf3; }
.op-category-name { color: var(--text); }
#rows.obj-mount .otitle:not(.struck), #rows.obj-mount .op-day-title:not(.struck) { color: var(--op-value-color); }
.op-title-wrap { display: inline-flex; align-items: baseline; gap: 9px; min-width: 0; flex: 1; }
.op-category-emoji { display: inline-block; width: 20px; flex: 0 0 20px; font-size: 15px; line-height: 1.4; text-align: center; }
.op-step-copy .op-title-wrap { display: flex; }
.op-category-dialog { width: 480px; padding: 24px; background: #222226; }
.op-category-dialog .op-dialog-context { font-size: 13px; margin-bottom: 14px; }
.op-category-list { max-height: 48vh; overflow-y: auto; }
.op-category-row { display: flex; align-items: center; gap: 12px; min-height: 54px; border-bottom: 1px solid #333339; }
.op-category-copy { flex: 1; min-width: 0; }
.op-category-copy strong { display: block; font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.op-category-copy small { display: block; margin-top: 3px; font-size: 11px; color: #aaaab3; }
.op-category-row button { display: inline-flex; align-items: center; justify-content: center; padding: 6px; color: #aaaab3; }
.op-category-row button:hover { color: var(--text); }
.op-category-row svg { width: 15px; height: 15px; }
.op-category-dialog .op-category-add { display: inline-flex; gap: 7px; align-items: center; padding-left: 0; margin-top: 12px; font-size: 13px; }
.op-category-fields { display: grid; grid-template-columns: 74px 1fr; gap: 14px; }
.op-category-fields input[name="emoji"] { text-align: center; padding-left: 5px; padding-right: 5px; }
.op-emoji-choices { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin: 0 0 12px; }
.op-emoji-choices button { font-size: 21px; padding: 7px 3px; }
.op-sort-dialog { width: 680px; padding: 26px; background: #222226; border-radius: 12px; }
.op-sort-dialog .op-dialog-context { font-size: 13px; margin-bottom: 20px; }
.op-sort-dialog > form > label { display: flex; align-items: center; gap: 20px; }
.op-sort-dialog select { width: auto; min-width: 185px; margin-top: 0; font-size: 14px; padding-top: 8px; padding-bottom: 8px; }
.op-sort-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 20px; border-top: 1px solid #3a3a43; }
.op-sort-dialog [hidden] { display: none; }
.op-sort-dialog h3 { font-size: 14px; font-weight: 500; margin: 0 0 6px; }
.op-sort-hint { color: #aaaab3; font-size: 12px; margin-bottom: 16px; }
.op-sort-rules { counter-reset: sort-rule; }
.op-sort-rules > div, .op-category-order > div { display: flex; align-items: center; gap: 7px; min-height: 42px; border-bottom: 1px solid #333339; }
.op-sort-rules > div { padding: 10px 0; }
.op-sort-number::before { counter-increment: sort-rule; content: counter(sort-rule); color: #888892; font-size: 12px; }
.op-sort-copy { flex: 1; min-width: 0; padding-left: 5px; }
.op-sort-copy strong { display: block; font-size: 14px; font-weight: 400; }
.op-sort-copy small { display: block; font-size: 11px; color: #aaaab3; margin-top: 5px; line-height: 1.5; }
.op-category-order .op-category-name { flex: 1; font-size: 13px; }
.op-sort-dialog .op-drag-handle { display: flex; align-items: center; justify-content: center; padding: 6px; width: 28px; flex: 0 0 28px; color: #888892; cursor: grab; }
.op-sort-dialog [data-reorder-name] { position: relative; cursor: grab; border-radius: 4px; user-select: none; touch-action: none; }
.op-sort-dialog [data-reorder-name]:hover { background: #2b2b30; }
.op-sort-dialog .op-dragging { opacity: .4; }
.op-sort-dialog .op-drop-before::before, .op-sort-dialog .op-drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: #c3a4ed; border-radius: 2px; }
.op-sort-dialog .op-drop-before::before { top: -1px; }
.op-sort-dialog .op-drop-after::after { bottom: -1px; }
.op-sort-help { color: #aaaab3; font-size: 12px; margin-top: 18px; }
.op-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.op-sort-dialog button:disabled { opacity: .25; cursor: default; }
.op-sort-dialog .op-dialog-actions { padding-top: 18px; border-top: 1px solid #3a3a43; }

/* Objective editor: the title leads, followed by a quiet Mac property list. */
.op-objective-editor { width: 520px; padding: 22px 24px 20px; border-radius: 12px; background: #222226; }
.op-objective-editor .op-editor-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #aaaab3; font-size: 13px; }
.op-objective-editor .op-editor-close { display: inline-flex; justify-content: center; align-items: center; width: 28px; height: 28px; padding: 0; margin-right: -6px; color: #aaaab3; }
.op-objective-editor .op-editor-title { display: block; width: 100%; max-height: 132px; resize: none; overflow-y: auto; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--text); font: inherit; font-size: 24px; line-height: 1.35; font-weight: 500; letter-spacing: -.4px; padding: 6px 0; margin: 8px 0 20px; }
.op-objective-editor .op-editor-title:focus { outline: none; border-bottom-color: #62626c; }
.op-objective-editor .op-editor-properties { display: grid; gap: 10px; }
.op-objective-editor .op-value-field { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 16px; margin: 0; font-size: 13px; }
.op-objective-editor .op-value-options { margin: 0; }
.op-objective-editor .op-editor-properties label, .op-objective-editor .op-inherited-category { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 16px; margin: 0; font-size: 13px; color: #aaaab3; }
.op-objective-editor select { height: 36px; padding: 7px 32px 7px 11px; margin: 0; font-size: 14px; background-color: #2b2b30; border-color: #414148; border-radius: 6px; }
.op-objective-editor .op-inherited-category > span:last-child { color: var(--text); font-size: 14px; }
.op-objective-editor .op-inherited-category small { display: block; font-size: 12px; color: #aaaab3; margin-top: 4px; }
.op-objective-editor .op-history { padding: 14px 0 0; margin-top: 18px; }
.op-objective-editor summary { font-size: 13px; }
.op-objective-editor .op-history-grid { gap: 0 12px; margin-top: 14px; }
.op-objective-editor .op-history-grid label { font-size: 12px; margin-bottom: 12px; }
.op-objective-editor .op-history-grid select { margin-top: 6px; }
.op-objective-editor .op-secondary-actions { padding-top: 12px; margin-top: 18px; border-top: 1px solid #414148; }
.op-objective-editor .op-secondary-actions button { font-size: 13px; }
.op-objective-editor .op-dialog-actions { align-items: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #414148; }
.op-objective-editor .op-delete { display: inline-flex; align-items: center; gap: 7px; margin-right: auto; padding-left: 0; color: #aaaab3; font-size: 13px; }
.op-objective-editor .op-delete:hover { color: #efa7a7; background: transparent; }
.op-objective-editor .op-form-error:empty { display: none; }
.op-dialog .op-notes { margin-top: 18px; padding-top: 14px; border-top: 1px solid #414148; }
.op-dialog .op-notes textarea { display: block; width: 100%; min-height: 100px; max-height: 280px; resize: vertical; margin-top: 12px; padding: 11px 12px; background: #19191e; color: var(--text); border: 1px solid #414148; border-radius: 6px; font: inherit; font-size: 14px; line-height: 1.5; }
.op-dialog .op-notes textarea::placeholder { color: #888892; }
.op-dialog .op-notes textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Status remains a separate signal from the value color on titles. */
#rows.obj-mount [data-objective-status="prog"],
.op-dialog select[data-objective-status="prog"] { color: #e1bb62; }

/* Completion stays rewarding after the brief, one-shot celebration. */
#rows.obj-mount [data-objective-status="done"] { color: #8ee3b2; background: #8ee3b215; border-radius: 99px; padding: 2px 7px; font-variant-numeric: tabular-nums; }
#rows.obj-mount .op-check.checked { background: #8ee3b2; border-color: #8ee3b2; color: #163627; }
.op-dialog select[data-objective-status="done"] { color: #8ee3b2; }
.op-celebration { position: fixed; inset: 0; z-index: 1000; pointer-events: none; overflow: hidden; }
.op-reward { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: min(480px, calc(100vw - 48px)); padding: 15px 22px; border: 1px solid #8ee3b24d; border-radius: 14px; background: #1d3027; color: #eafff1; box-shadow: 0 12px 40px #0005; animation: op-reward 2.8s both; }
.op-reward-check { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #8ee3b2; color: #163627; font-size: 23px; }
.op-reward strong { display: block; font-size: 17px; font-weight: 600; }
.op-reward div { min-width: 0; }
.op-reward div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; color: #b9d5c4; font-size: 13px; }
.op-confetti i { position: absolute; top: 42%; left: 50%; width: 7px; height: 12px; border-radius: 2px; opacity: 0; }
.op-confetti i:nth-child(3n) { width: 9px; height: 9px; border-radius: 50%; }
.op-celebration-reduced .op-confetti i { top: 105px; width: 5px; height: 8px; }
.op-celebration-reduced .op-reward { animation-name: op-reward-fade; }
@keyframes op-reward {
  0% { opacity: 0; transform: translate(-50%, -12px) scale(.96); }
  12%, 82% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}
@keyframes op-reward-fade {
  0%, 100% { opacity: 0; }
  12%, 82% { opacity: 1; }
}

body.in-objectives #objDetails kbd { font: inherit; font-size: 11px; line-height: 16px; min-width: 17px; text-align: center; border: 1px solid #55555f; border-radius: 4px; color: #bcbcc5; }

/* Completion changes in place; the adjacent pencil opens the full editor. */
#rows.obj-mount .op-completion-controls { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; color: #aaaab3; font-size: 12px; }
#rows.obj-mount .op-completion-select { display: inline-flex; align-items: center; position: relative; min-height: 28px; white-space: nowrap; }
#rows.obj-mount .op-completion-select select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#rows.obj-mount .op-completion-select:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
#rows.obj-mount .op-edit-button { width: 26px; height: 28px; padding: 4px; justify-content: center; }
#rows.obj-mount .op-edit-button svg { width: 15px; height: 15px; }
.op-retry-dialog { padding: 24px; }
.op-retry-dialog h2 { margin-bottom: 12px; }
.op-retry-dialog .op-dialog-context { margin-bottom: 12px; }
.op-retry-dialog .op-day-calendar .cal-d { height: 40px; }
.op-retry-dialog .op-dialog-actions { margin-top: 16px; }

#rows.obj-mount .op-day-failed { background: #ef8585; color: #451d24; }
#rows.obj-mount [data-objective-status="fail"],
.op-dialog select[data-objective-status="fail"] { color: #ef8585; }

.op-dialog .op-quick-days { display: grid; grid-template-columns: .8fr 1fr 1fr 1.2fr; gap: 8px; margin-top: 8px; }
.op-dialog .op-quick-days button { min-height: 44px; padding: 9px 6px; border: 1px solid #41414a; background: #19191e; color: #d4d4da; font-size: 13px; white-space: nowrap; }
.op-dialog .op-quick-days button[aria-pressed="true"] { border-color: #b69af0; background: #342c43; color: #e0ccff; }
.op-dialog .op-quick-days .op-day-picker-button { margin: 0; justify-content: center; gap: 6px; }
.op-dialog .op-quick-days .op-day-picker-button svg { width: 16px; height: 16px; }
.op-dialog .op-selected-day { margin: 8px 0 0; font-size: 12px; color: #b2b2bc; }

/* Parent connections stay in the column gutters, clear of editable titles. */
#rows.obj-mount .op-direction { position: relative; }
#rows.obj-mount .op-direction.op-with-lines { column-gap: 48px; }
#rows.obj-mount .op-parent-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
#rows.obj-mount .op-parent-lines path { fill: none; stroke: #bda1f2; stroke-width: 1.5; opacity: .7; }
#rows.obj-mount .op-parent-lines circle { fill: #bda1f2; }
body.in-objectives #viewTitle #objLines[aria-pressed="true"] { background: #30263e; color: #c9aff4; }
/* A period not in memory yet: the old lists fade while the server answers.
   The delay keeps a fast answer from flashing. */
#rows.obj-mount.op-waiting .op-horizon-goals,
#rows.obj-mount.op-waiting .op-week-list,
#rows.obj-mount.op-waiting .op-day-area { opacity: .45; transition: opacity .15s .1s; }
