/* Photos and their captions have distinct surfaces in both appearance modes. */
.visual-card{border-radius:16px;background:var(--surface)}
.card-photo,.mini-card .card-photo{aspect-ratio:1.55;min-height:0}
.card-info{display:grid;gap:.46rem;padding:.9rem 2.75rem 1.05rem 1rem;color:var(--ink);text-align:left}
.card-info>strong{font-size:clamp(1.12rem,1.65vw,1.45rem);font-weight:640;line-height:1.2;letter-spacing:-.025em;overflow-wrap:anywhere}
.card-byline,.card-byline>span,.card-meta{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.card-byline,.card-meta{font-size:.83rem;color:var(--muted)}.card-byline{gap:.85rem}.card-byline .icon{width:14px;height:14px;color:var(--area)}.card-meta{gap:.65rem}
.visual-card>.card-drag{top:auto;bottom:.7rem;right:.55rem;color:var(--muted);background:transparent}
.mini-card .card-info{padding:.75rem 2.1rem .85rem .8rem}.mini-card .card-info>strong{font-size:1.06rem}
.record-photo{border-radius:16px;overflow:hidden;margin:.2rem 0 .6rem;background:var(--surface)}
.record-photo img{display:block;height:clamp(145px,21vh,235px);width:100%;object-fit:cover}
.cover-caption{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin:-.5rem 0 1rem}
.cover-caption .cover-kind,.cover-caption .cover-status{position:static;display:inline-flex;align-items:center;gap:.35rem;background:var(--surface);color:var(--ink)}
.cover-caption .cover-status{margin-left:auto}
.cover-edit,.record-identity .category-link{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:36px;padding:.35rem .65rem;border-radius:11px;background:var(--surface);color:var(--muted);font-size:.88rem;font-weight:500}
.cover-edit .icon{width:17px;height:17px}
.record-identity{gap:.5rem;padding:.35rem 0 .85rem}.record-identity>strong{margin-right:auto;letter-spacing:-.025em}
.record-detail .record-form{background:none;padding:0;gap:.85rem}
.record-detail .record-grid{display:grid;grid-template-columns:1fr;gap:0;background:var(--surface);border-radius:16px;padding:.3rem .65rem}
.record-detail .record-grid .record-field{position:relative;display:grid;grid-template-columns:minmax(7rem,.75fr) minmax(0,1.5fr);align-items:center;min-height:47px;border-radius:8px;padding:0 .45rem}
.record-grid .record-field+.record-field:before{content:'';position:absolute;left:2.05rem;right:.45rem;top:0;height:1px;background:color-mix(in srgb,var(--line) 66%,transparent)}
.record-detail .record-field>span:first-child{display:inline-flex;align-items:center;gap:.5rem;font-size:.91rem;line-height:1.25}.record-field>span:first-child .icon{width:16px;height:16px;color:var(--area,var(--accent));flex:none}
.record-detail .record-field input,.record-detail .record-field select,.record-detail .record-field textarea{border:0;outline:0;background:transparent;border-radius:8px;color:var(--ink);box-shadow:none;font:inherit;font-size:1rem}
.record-grid .record-field input,.record-grid .record-field select{text-align:right;min-height:42px}
.record-detail .record-grid .record-field:focus-within{background:var(--raised)}
.record-detail .record-form>.record-field{background:var(--surface);border-radius:14px;padding:.72rem .95rem .45rem}
.record-detail .record-form textarea{padding:.5rem 0;line-height:1.5}
.record-detail .record-save:disabled{background:transparent;color:var(--muted);opacity:.85}
.record-save{display:inline-flex;align-items:center;gap:.38rem}.record-save .icon{width:16px;height:16px}.record-form .item-actions .delete-item{margin-left:auto}
.home-timers{flex:none;margin:.2rem clamp(.8rem,2vw,1.5rem) .65rem;padding:.35rem .8rem;background:var(--surface);border-radius:16px}
.home-timers>header,.timer-idle,.timer-buttons,.timer-idle>span,.home-timers h2,.timer-control,.timer-picker footer label{display:flex;align-items:center;gap:.5rem}
.home-timers>header,.timer-idle{justify-content:space-between}.home-timers h2{margin:0;font-size:1.03rem;letter-spacing:-.02em}.home-timers h2 .icon{width:18px;height:18px;color:var(--accent)}
.home-timers>header button,.timer-control,.daylight-dialog button{min-height:40px}
.timer-list{max-height:25vh;overflow:auto;overscroll-behavior:contain}
.timer-row{display:grid;align-items:center;grid-template-columns:auto minmax(0,1fr) auto auto;gap:.7rem;padding:.65rem .1rem}
.timer-list .timer-row+.timer-row{border-top:1px solid var(--line)}
.timer-info{min-width:0}.timer-info strong,.timer-info button{display:block;max-width:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-weight:600;text-align:left;font-size:1rem}
.timer-info>span,.timer-digits small{font-size:.83rem;color:var(--muted)}
.timer-dial{width:37px;height:37px;border-radius:50%;background:conic-gradient(var(--area,var(--accent)) var(--fill),var(--line) 0);display:grid;place-items:center;position:relative}
.timer-dial:before{content:'';position:absolute;inset:3px;background:var(--surface);border-radius:50%}.timer-dial .icon{position:relative;width:15px;height:15px;color:var(--area,var(--accent))}
.timer-digits{text-align:right;line-height:1.15}.timer-digits strong{display:block;font-size:1.3rem;font-weight:600;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.timer-buttons{gap:.3rem}.timer-control{justify-content:center;background:var(--bg);color:var(--accent);border-radius:10px;padding:.4rem .65rem;font-weight:550}.timer-control .icon{width:16px;height:16px}
.item-timer{margin:.55rem 0 .9rem;border-radius:15px;background:var(--surface);padding:.38rem .85rem}.timer-idle>span{color:var(--muted);font-size:.94rem}.timer-idle .icon{width:16px;height:16px}
.daylight-dialog{box-sizing:border-box;position:fixed;inset:0;margin:auto;width:min(29rem,calc(100vw - 1.5rem));max-height:min(85dvh,47rem);overflow:auto;padding:1.2rem;background:var(--bg);color:var(--ink);border:0;border-radius:22px;box-shadow:0 22px 90px #0005;color-scheme:inherit}
.daylight-dialog[open]{animation:studio-arrive 180ms ease-out}.daylight-dialog::backdrop{background:#080c1666;backdrop-filter:blur(4px)}
.daylight-dialog header,.daylight-dialog footer,.timer-picker form>header{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.daylight-dialog header{margin-bottom:.85rem}.daylight-dialog header small,.daylight-dialog label{color:var(--muted);font-size:.91rem}.daylight-dialog header h2{margin:.15rem 0;font-size:1.45rem;letter-spacing:-.035em;line-height:1.2;overflow-wrap:anywhere}
.daylight-dialog header button{flex:none;display:grid;place-items:center;width:40px;border-radius:50%;background:var(--surface)}
.daylight-dialog input,.daylight-dialog textarea,.daylight-dialog select,.preview-editor input{font:inherit;font-size:1rem;box-sizing:border-box;width:100%;padding:.65rem .75rem;border:0;border-radius:10px;background:var(--surface);color:var(--ink)}
.daylight-dialog input:focus,.daylight-dialog textarea:focus,.preview-editor input:focus{outline:0;background:var(--raised)}
.daylight-dialog [hidden]{display:none!important}
.daylight-dialog footer{margin-top:1rem}.daylight-dialog footer>.primary{margin-left:auto}.daylight-dialog button:disabled{opacity:.48}
.studio-modes{display:flex;gap:3px;background:var(--surface);padding:3px;border-radius:12px;margin:0 0 1rem}
.studio-modes button{flex:1;border-radius:9px;color:var(--muted)}.studio-modes button[aria-pressed=true]{color:var(--ink);background:var(--raised);box-shadow:0 1px 5px #0002}
.cover-studio label,.preview-editor label{display:grid;gap:.35rem}.studio-tools{display:flex;gap:.65rem;margin:.65rem 0}
.studio-preview img{width:100%;max-height:31dvh;object-fit:contain;display:block;border-radius:12px}.cover-studio [role=status]{margin:.5rem 0 0;color:var(--muted);font-size:.9rem}
.cover-studio[aria-busy=true] [role=status]{color:var(--accent)}
.timer-picks{max-height:42dvh;overflow:auto;margin:.7rem 0}.timer-picks button{width:100%;display:flex;align-items:center;gap:.6rem;text-align:left;border-radius:10px;padding:.55rem .65rem}
.timer-picks button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent)}.timer-picks small{margin-left:auto;white-space:nowrap;color:var(--muted)}.timer-picker footer input{width:5.1rem}
.preview-editor{display:grid;grid-template-columns:repeat(auto-fit,minmax(8.4rem,1fr));gap:.65rem;margin-top:.9rem}.preview-editor label{color:var(--muted);font-size:.875rem}.preview-editor input{background:var(--bg);min-width:0}.preview-editor .move-actions{grid-column:1/-1;margin:0}
@container pane (max-width:540px){.timer-row{gap:.5rem}.timer-row .timer-control span{display:none}.timer-row .timer-control{min-width:38px}.card-photo,.mini-card .card-photo{aspect-ratio:1.55}.card-info>strong{font-size:1.16rem}.home-timers{margin-inline:.8rem}}
@media(hover:hover) and (pointer:fine){.record-grid .record-field:hover>span:first-child{color:var(--accent)}.timer-picks button:hover,.cover-edit:hover,.timer-control:hover{background:var(--hover);color:var(--ink)}}
@media(prefers-reduced-motion:no-preference){.record-field,.timer-control,.cover-edit,.studio-modes button,.timer-picks button{transition:background 150ms,color 150ms,transform 140ms}.timer-control:active,.cover-edit:active,.studio-modes button:active{transform:scale(.97)}@keyframes studio-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}}
@media(prefers-reduced-motion:reduce){.daylight-dialog[open]{animation:none}}
.native-property{position:relative;display:block;min-width:0}.native-property>span{display:none}
.native-property[data-empty=true]:not(:focus-within)>span{display:block;position:absolute;inset:0;pointer-events:none;text-align:right;align-content:center;padding-right:2.3rem;color:var(--muted);font-size:.95rem}
.native-property[data-empty=true]:not(:focus-within)>input{color:transparent}
.native-property[data-empty=true]:not(:focus-within)>input::-webkit-datetime-edit{opacity:0}
.cover-studio[aria-busy=true] .studio-preview:empty{display:block;height:clamp(100px,18vh,180px);border-radius:13px;background:linear-gradient(105deg,var(--surface) 22%,var(--raised) 45%,var(--surface) 68%);background-size:240% 100%}
@media(prefers-reduced-motion:no-preference){.cover-studio[aria-busy=true] .studio-preview:empty{animation:cover-wait 2.3s ease-in-out infinite alternate}@keyframes cover-wait{from{background-position:0% 50%}to{background-position:95% 50%}}}
.timer-history{margin:.2rem 0 .35rem}.timer-history summary{display:flex;align-items:center;gap:.45rem;min-height:36px;cursor:pointer;color:var(--muted);font-size:.89rem}.timer-history summary span{margin-left:auto;font-variant-numeric:tabular-nums}.timer-history summary .icon{width:15px;height:15px}.timer-history ul{margin:.3rem 0 .7rem;padding:0;list-style:none}.timer-history li{display:flex;justify-content:space-between;gap:.5rem;padding:.45rem 0;color:var(--muted);font-size:.87rem}.timer-row.is-overtime .timer-digits{color:var(--personal,var(--accent))}

/* Weekly totals share their columns with the activity breakdown. */
.week-time {
  --time-columns: minmax(0,1fr) minmax(3.7rem,auto) minmax(3.7rem,auto);
  margin: .25rem 0 1rem;
  border-radius: 15px;
  background: var(--surface);
  color: var(--ink);
}
.week-time summary,.week-time-row {
  display: grid;
  grid-template-columns: var(--time-columns);
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .8rem 1rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.week-time summary {list-style:none;cursor:pointer;min-height:56px}
.week-time summary::-webkit-details-marker {display:none}
.week-time-title,.week-time-row>span:first-child {display:flex;align-items:center;gap:.55rem;text-align:left;overflow-wrap:anywhere}
.week-time-title {font-weight:620}
.week-time-title .icon,.week-time summary>.icon {width:16px;height:16px;flex:none;color:var(--muted)}
.week-time-value {display:grid;gap:.15rem}
.week-time-value small {font-size:.84rem;color:var(--muted)}
.week-time-value strong {font-size:1.12rem;line-height:1.1;font-weight:600}
.week-time-value.measured strong,.week-time-row>span:nth-child(3) {color:var(--accent)}
.week-time-rows {max-height:18rem;overflow:auto;overscroll-behavior:contain}
.week-time-row {min-height:42px;padding-block:.4rem;border-radius:0;background:transparent;color:var(--ink);font-size:.94rem}
.week-time-row>span:first-child {min-width:0}
.week-time-row>span:nth-child(2) {color:var(--muted)}
.week-time-body p,.usual-duration-note {color:var(--muted);font-size:.88rem;line-height:1.4}
.week-time-body p {padding:.4rem 1rem .9rem;margin:0}
.usual-duration-note {flex-basis:100%}
@media(hover:hover) and (pointer:fine){.week-time-row:hover {color:var(--accent)}}
@container pane (max-width:430px){
  .week-time {--time-columns:minmax(0,1fr) 3.8rem 3.8rem}
  .week-time summary,.week-time-row {gap:.35rem;padding-inline:.65rem}
}
@media(prefers-reduced-motion:reduce){.week-time summary>.icon{transition:none}}

.lib-tools,.library-day-score,.lib-subhead,.lib-group>header,.library-dialog footer,.lib-columns,.lib-link,.lib-choice,.lib-button {
  display:flex;align-items:center;gap:.5rem
}
.lib-tools{flex-wrap:wrap;margin:.3rem 0 1rem}
.lib-button,.lib-log-action{border:0;border-radius:10px;background:var(--surface);color:var(--muted);font-size:.9rem;font-weight:550;min-height:38px;padding:.42rem .72rem}
.lib-button.prominent{background:var(--accent-soft);color:var(--accent)}
.lib-button .icon{width:16px;height:16px}
.lib-button:disabled{opacity:.55}
.library-day-score{justify-content:flex-end;margin:.1rem 0 .5rem}
.lib-group{margin:.15rem 0 1.25rem}
.lib-group>header,.lib-subhead{justify-content:space-between}
.lib-group>header{min-height:43px;border-bottom:1px solid var(--line)}
.lib-category{display:flex;align-items:center;gap:.6rem;background:transparent;color:var(--ink);font-size:1rem;font-weight:620;min-height:42px;text-align:left}
.lib-category .icon{width:14px;height:14px;color:var(--muted);opacity:0}
.lib-category:focus-visible .icon{opacity:1}
@media(hover:hover) and (pointer:fine){.lib-category:hover .icon{opacity:1}}
@media(hover:none){.lib-category .icon{opacity:1}}
.library-row{display:flex;align-items:center;gap:.3rem;padding-left:min(calc(var(--level)*1.3rem),16%);border-radius:9px;min-height:56px}
.lib-fold,.lib-spacer{width:1.45rem;flex:none}
.lib-fold{height:40px;color:var(--muted);background:transparent;padding:0}
.lib-fold .icon{width:16px;height:16px}
.lib-open{flex:1;min-width:0;display:flex;align-items:center;gap:.7rem;text-align:left;min-height:52px;background:transparent;color:var(--ink);padding:.4rem 0}
.lib-open>span:last-child{min-width:0}
.lib-open strong,.lib-open small,.lib-order li span strong,.lib-order li span small{display:block;overflow-wrap:anywhere}
.lib-open strong{font-size:1.04rem;font-weight:570}
.lib-open small,.lib-order small{font-size:.88rem;color:var(--muted)}
.lib-mark{display:inline-grid;place-items:center;border-radius:10px;width:34px;height:34px;flex:none;color:var(--lib-color,var(--area,var(--accent)));background:color-mix(in srgb,var(--lib-color,var(--area,var(--accent))) 15%,var(--bg))}
.lib-mark .icon{width:18px;height:18px}
.lib-check{display:grid;place-items:center;min-width:32px;min-height:44px}
.lib-check input,.lib-choice input,.lib-tracker input[type=checkbox]{width:19px;height:19px;accent-color:var(--accent)}
.lib-check input,.lib-choice input{flex:none}
.lib-record{margin:.6rem 0 .9rem}
.lib-subhead{min-height:44px}
.lib-subhead h2{font-size:1rem;font-weight:580}
.lib-link{min-height:40px;padding:.4rem .6rem;background:transparent;text-align:left;border-radius:9px;color:var(--ink);max-width:100%;overflow-wrap:anywhere}
.lib-link .icon{width:15px;height:15px;flex:none}
.library-dialog{width:min(31rem,calc(100vw - 1.5rem));padding:0}
.library-dialog form{display:flex;flex-direction:column;max-height:min(85dvh,48rem)}
.library-dialog header,.library-dialog footer{padding:.85rem 1.1rem;flex:none}
.library-dialog header{display:flex;align-items:center;justify-content:space-between;gap:.6rem}
.library-dialog h2{overflow-wrap:anywhere;font-size:1.25rem}
.library-dialog .lib-body{padding:0 1.1rem;min-height:0;overflow:auto;overscroll-behavior:contain;display:grid;gap:.7rem}
.library-dialog footer{justify-content:flex-end}
.library-dialog .form-error:empty{display:none}
.library-dialog .form-error{margin:.4rem 1.1rem}
.lib-field{display:grid;gap:.28rem;min-width:0}
.lib-field>span,.lib-hint{font-size:.88rem;color:var(--muted)}
.lib-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.library-dialog :is(input:not([type=checkbox],[type=radio]),textarea,select){width:100%;min-width:0;border:0;border-radius:9px;background:var(--surface);color:var(--ink);min-height:41px;padding:.44rem .6rem;font-size:1rem}
.library-dialog input[type=color]{padding:.2rem}
.lib-config{background:var(--surface);border-radius:11px;padding:.55rem .7rem}
.lib-config summary{cursor:pointer;color:var(--ink);font-weight:550}
.lib-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));column-gap:.4rem}
.lib-choice{min-height:39px;font-size:.94rem;overflow-wrap:anywhere}
.lib-tracker{display:grid;grid-template-columns:2fr 1.35fr .9fr;gap:.3rem;margin:.7rem 0}
.lib-tracker>label{grid-column:span 2}
.lib-rating{border:0;padding:0;margin:0;display:flex;gap:.4rem;flex-wrap:wrap}
.lib-rating legend{font-weight:570;margin-bottom:.4rem}
.lib-rating label{position:relative}
.lib-rating input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.lib-rating label span{min-width:42px;min-height:41px;display:grid;place-items:center;border-radius:10px;background:var(--surface);color:var(--ink);font-variant-numeric:tabular-nums}
.lib-rating input:checked+span{background:var(--accent);color:var(--accent-ink)}
.lib-rating input:focus-visible+span{outline:2px solid var(--accent)}
.lib-rating small{flex-basis:100%;color:var(--muted)}
.lib-order{list-style:none;margin:0;padding:0}
.lib-order li{display:flex;align-items:center;gap:.35rem;padding:.35rem 0}
.lib-order li>span{flex:1;overflow-wrap:anywhere}
.lib-order .secondary{min-width:38px;min-height:38px;padding:.35rem}
.lib-order button:disabled{opacity:.4}
@media(hover:hover) and (pointer:fine){.lib-link:hover{color:var(--accent)}}
@media(pointer:coarse){.lib-button,.lib-log-action,.lib-order .secondary,.lib-choice,.lib-rating label span,.lib-fold,.lib-group header .icon-button{min-height:44px}}
@container pane (max-width:380px){.library-row{gap:.15rem}.lib-open{gap:.42rem}.lib-mark{width:27px;height:30px}.lib-fold,.lib-spacer{width:1rem}}

.lib-gallery-grid{padding:.7rem 0}.card-byline .lib-mark{width:22px;height:22px;border-radius:6px}.card-byline .lib-mark .icon{width:14px;height:14px}

.category-form-top{grid-template-columns:56px minmax(84px,.65fr) minmax(115px,1.4fr)}
.lib-cat-order>div{display:flex;align-items:center;gap:.65rem}.lib-cat-order>span{font-size:.83rem;color:var(--muted)}.lib-cat-order button{min-width:40px}.lib-cat-order small{color:var(--muted)}
@container pane (max-width:350px){.category-form-top{grid-template-columns:56px 1fr}.category-form-top>label:last-child{grid-column:1/-1}}

.lib-scheduled{border-top:1px solid var(--line);margin-top:12px;padding-top:12px}.lib-scheduled h3,.lib-scheduled div{display:flex;align-items:center;gap:8px}.lib-scheduled h3{font-size:.8rem;color:var(--muted);font-weight:550}.lib-scheduled h3 .icon{width:14px;height:14px}.lib-scheduled div{justify-content:space-between;padding:.35rem 0}.lib-scheduled small,.lib-plan-total{color:var(--muted)}.lib-plan-total{margin-right:auto}

.saved-plan-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin:.5rem 0 1rem}.saved-plan-actions button{display:inline-flex;align-items:center;gap:.45rem;min-height:42px}
.saved-plan-grip{cursor:grab;touch-action:none}.saved-plan-grip:active{cursor:grabbing}.routine-intro>strong{margin-left:auto;font-size:.92rem;font-weight:540;color:var(--muted)}
.plan-steps{padding:0;list-style:none;margin:.25rem 0 1rem}.plan-steps .lib-link{width:100%}.plan-steps .lib-link span:not(.lib-mark){flex:1;text-align:left;overflow-wrap:anywhere}.plan-steps small,.plan-sequence small{color:var(--muted);font-variant-numeric:tabular-nums}.plan-steps small:first-child,.plan-sequence small:first-child{min-width:1.2rem}
.plan-length{display:flex;align-items:center;gap:.35rem;color:var(--muted);font-size:.85rem}.library-dialog .plan-length input{width:4.6rem;padding:.28rem .45rem}.plan-sequence li{min-height:40px}
.library-dialog footer:has([data-save-plan]),.library-dialog footer:has([data-open-saved-plan]){flex-wrap:wrap}.saved-day-plan .lib-record{margin-top:1rem}

/* Clock */
.clock-page{max-width:900px;margin:0 auto;padding:0 0 1.6rem;--cl-accent:var(--accent);font-variant-numeric:tabular-nums}
.cl-header,.cl-section-head,.cl-face-top,.cl-reading,.cl-controls,.cl-modes,.cl-presets,.cl-alarm,.cl-nav,.cl-idle,.cl-strip,.cl-report-row,.cl-alert-actions{display:flex;align-items:center;gap:.5rem}
.cl-header,.cl-section-head,.cl-face-top,.cl-alarm,.cl-report-row{justify-content:space-between}.cl-header{padding:0 0 1rem;flex-wrap:wrap;border-bottom:1px solid var(--line)}.cl-header time,.cl-note,.cl-face small,.cl-alarm small,.cl-report-row small,.cl-stats small{color:var(--muted);font-size:.88rem}.cl-seg{display:inline-flex;align-items:center;gap:2px;border-radius:12px;background:var(--surface);padding:3px}.cl-seg button{font-size:.94rem;font-weight:550;min-height:36px;padding:5px 12px;border-radius:9px;color:var(--muted)}.cl-seg .is-on{background:var(--accent-soft);color:var(--accent)}
.clock-page h2{font-size:1.15rem;letter-spacing:-.02em;margin:.8rem 0}.cl-section-head{flex-wrap:wrap;margin:.55rem 0}.cl-section-head>div,.cl-controls,.cl-presets,.cl-modes{display:flex;gap:.4rem;flex-wrap:wrap}.clock-page button.primary,.clock-page button.secondary,.clock-alert button{min-height:40px;padding:.45rem .72rem;border-radius:10px}.cl-face,.cl-idle{background:var(--surface);border-radius:20px;padding:1.05rem 1.15rem;margin:.65rem 0 1rem;overflow:hidden}.cl-face-top h2{margin:.17rem 0}.cl-face-top>div{min-width:0;overflow-wrap:anywhere}.cl-reading{gap:.8rem;padding:.75rem 0 1rem}.cl-reading strong{font-size:clamp(2rem,5vw,3.5rem);line-height:1.1;font-weight:570;letter-spacing:-.05em}.cl-reading>span:last-child{color:var(--muted)}.cl-disk{border-radius:50%;width:50px;height:50px;background:conic-gradient(from 0deg,var(--area,var(--accent)) var(--cl-fill),var(--bg) 0);flex:none}.cl-idle{padding:1.25rem;gap:1rem}.cl-idle strong{display:block;margin:0 0 .55rem}.cl-idle-dial{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);flex-shrink:0}.cl-idle-dial .icon{width:32px;height:32px}
.cl-strip{margin:0 1rem .45rem;padding:.45rem .65rem;min-height:34px;max-width:calc(100% - 2rem);border-radius:10px;background:var(--accent-soft);color:var(--accent);font-size:.88rem}.cl-strip span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.cl-strip strong{margin-left:auto;font-variant-numeric:tabular-nums}.cl-strip small{white-space:nowrap}.cl-controls button.secondary,.cl-modes button.secondary{background:var(--bg)}
.cl-report-row{width:100%;text-align:left;padding:.7rem .2rem;border-bottom:1px solid var(--line);min-height:44px}.cl-report-row>span{overflow-wrap:anywhere}.cl-report-row small,.cl-report-row span strong,.cl-alarm small,.cl-alarm span,.cl-stats strong,.cl-stats small{display:block}.cl-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:.4rem}.cl-stats>div{padding:.8rem;background:var(--surface);border-radius:14px}.cl-stats strong{font-size:1.28rem}.cl-alarm{padding:1rem .1rem;border-bottom:1px solid var(--line);flex-wrap:wrap}.cl-alarm strong{font-size:1.65rem;letter-spacing:-.04em}.cl-alarm>div:first-child{min-width:0;overflow-wrap:anywhere}.cl-weekdays input{accent-color:var(--accent)}.cl-preset{display:flex;align-items:center;background:var(--surface);border-radius:10px}.cl-remove{font-size:0;padding:7px}.cl-remove::after{content:'×';font-size:1.1rem}
.cl-field{display:grid;gap:.3rem;min-width:0}.cl-field>span,.cl-weekdays legend{font-size:.9rem;color:var(--muted)}.clock-dialog [hidden]{display:none!important}.cl-weekdays{display:flex;flex-wrap:wrap;gap:.4rem;border:0;padding:0}.cl-weekdays label{display:flex;align-items:center;gap:3px;min-height:36px}.clock-alert{position:fixed;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:500;max-width:min(590px,94vw);width:max-content;background:var(--surface);color:var(--ink);border-radius:15px;padding:.8rem 1rem;box-shadow:0 8px 40px #0005}.clock-alert[hidden]{display:none}.clock-alert>div{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem}.clock-alert>div+div{margin-top:.4rem}.clock-alert small{color:var(--muted)}.cl-nav{gap:.4rem}.cl-nav strong{font-size:.9rem}.cl-nav button{font-size:1.2rem}
@container pane (max-width:390px){.clock-page .cl-header time{display:none}.clock-page .cl-idle-dial{width:44px;height:44px}.clock-page .cl-idle{padding:.8rem}.cl-controls button{flex-grow:1}}

.cl-item-tools{display:flex;gap:.6rem;justify-content:flex-end}.cl-item-tools button{min-height:34px;font-size:.88rem}

.cl-recent{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.45rem 0;border-bottom:1px solid var(--line)}.cl-recent small{display:block;color:var(--muted);font-size:.86rem}
.cl-insight-total{background:var(--surface);border-radius:18px;padding:1rem 1.1rem;margin:.7rem 0}.cl-insight-total>small{display:block;color:var(--muted)}.cl-insight-total>strong{display:block;font-size:clamp(1.8rem,5vw,2.6rem);font-weight:580;letter-spacing:-.05em}.cl-proportion{height:6px;margin-top:.7rem;border-radius:5px;background:var(--accent-soft);overflow:hidden}.cl-proportion i{display:block;background:var(--accent);height:100%}.cl-week-chart{display:grid;grid-template-columns:repeat(7,1fr);gap:.35rem;margin-top:.8rem}.cl-week-chart button{min-width:0;padding:.2rem;color:var(--muted)}.cl-bar-track{height:37px;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px solid var(--line)}.cl-bar-track i{display:block;width:min(65%,24px);border-radius:4px 4px 0 0;background:var(--accent)}.cl-week-chart small{font-size:.72rem}.cl-recent{flex-wrap:wrap}.cl-recent>span{margin-right:auto;overflow-wrap:anywhere}.cl-report-row>strong{flex-shrink:0;font-size:.94rem}
@container pane (max-width:510px){.cl-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cl-nav button{min-width:40px}.cl-insight-total>strong{margin:.15rem 0}.cl-remove{min-width:38px;min-height:40px}}

/* The same library row carries timers in Clock and Today. */
.tr-toolbar{margin:.8rem 0}
.tr-record{border-bottom:1px solid var(--line)}
.tr-row{--level:0;min-height:66px;gap:clamp(.15rem,1cqw,.65rem);padding-inline:.2rem}
.tr-row .lib-open{min-width:0}.tr-row .tr-mark{background:transparent;width:30px}
.tr-mark .icon{width:23px;height:23px}
.tr-digits{display:grid;justify-items:end;flex:none;min-width:3.2rem;font-variant-numeric:tabular-nums}
.tr-digits strong{font-size:clamp(1.35rem,5.6cqw,2rem);line-height:1.05;letter-spacing:-.045em;font-weight:650}
.tr-digits small{color:var(--muted);font-size:.76rem}
.tr-digits small:empty{display:none}
.tr-progress{height:2px;width:100%;border-radius:2px;background:linear-gradient(to right,var(--area,var(--accent)) var(--remaining),var(--line) var(--remaining))}
.tr-play{position:relative;display:grid;place-items:center;box-sizing:border-box;margin-inline:.35rem .05rem;width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;padding:0;border:0;border-radius:50%;background:var(--surface);color:var(--accent);touch-action:manipulation;-webkit-touch-callout:none;user-select:none}
.tr-play .tr-stop{display:none}
.tr-play.tr-holding{background:var(--surface);color:var(--danger)}
.tr-play.tr-holding>.icon{visibility:hidden}
.tr-play.tr-holding .tr-stop{position:absolute;inset:0;display:grid;place-items:center}
.tr-play.tr-ready{background:var(--danger);color:var(--bg)}
.tr-play.tr-holding::after{content:'';position:absolute;inset:2px;border:2px solid currentColor;border-radius:inherit;pointer-events:none;animation:tr-confirm .33s ease-out both}
@keyframes tr-confirm{from{opacity:0;transform:scale(.8)}to{opacity:.8;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.tr-play.tr-holding::after{animation:none}}
.tr-play .icon{height:23px;width:23px;fill:currentColor}

.tr-row .icon-button{flex:none;width:36px;min-height:40px}
.tr-options{padding:.25rem .3rem .65rem}
.tr-icons{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:.4rem}.tr-icons legend{color:var(--muted);font-size:.9rem;margin-bottom:.4rem}
.tr-icons label{display:inline-flex;position:relative}.tr-icons input{position:absolute;opacity:0;inset:0;cursor:pointer}
.tr-icons label>span{display:grid;place-items:center;min-width:40px;height:40px;padding:0 .35rem;border-radius:9px;background:var(--surface);pointer-events:none}
.tr-icons input:checked+span{background:var(--accent-soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.tr-icons input:focus-visible+span,.tr-play:focus-visible,.section-links button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.home-timers:has(.tr-record){max-height:34vh;overflow-y:auto;overscroll-behavior:contain}
.home-timers .lib-mark,.home-timers .lib-open{background:transparent}
.section-links{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap;margin:.15rem 0 .7rem}
.section-links button{padding:.4rem .75rem;min-height:36px;color:var(--muted);font-size:.94rem;background:transparent;border-radius:9px;font-weight:550}
.section-links button[aria-current=page]{color:var(--accent);background:var(--accent-soft)}
.nav-saved{margin-top:.65rem}.nav-saved[open]>summary{color:var(--ink)}.nav-saved[open]>summary>.icon{color:var(--accent)}.nav-saved .nav-group{margin-top:0}
@container pane (max-width:370px){.tr-row .lib-open{gap:.25rem}.tr-digits strong{font-size:1.32rem}.tr-play{margin-inline:.1rem}.tr-row .icon-button{width:30px}.tr-mark .icon{width:20px;height:20px}}
.tr-play.is-running:not(.tr-holding){background:var(--area,var(--accent));color:var(--bg)}
.clock-gear{margin-left:auto;flex:none;width:44px;height:44px;color:var(--muted)}
.clock-dialog:has(.clock-switches)>header{margin-bottom:0}
.clock-dialog .clock-switches label{font-size:1rem;color:var(--ink)}
.tr-history>summary{display:flex;align-items:center;gap:.4rem;min-height:44px;list-style:none}
.tr-history>summary::-webkit-details-marker{display:none}
.tr-history>summary>.icon{width:14px;height:14px}
.clock-switches{padding:0 1.1rem .85rem;overflow-y:auto;max-height:65dvh}
.clock-switches label{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:52px;padding:.4rem 0;cursor:pointer}
.clock-switches label+label{border-top:1px solid var(--line)}
.clock-switches input{appearance:none;position:relative;flex:none;width:40px;height:24px;margin:0;border-radius:20px;border:1px solid var(--muted);background:var(--surface);cursor:pointer}
.clock-switches input::before{content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:var(--muted)}
.clock-switches input:checked{background:var(--accent);border-color:var(--accent)}
.clock-switches input:checked::before{transform:translateX(16px);background:var(--accent-ink)}
.clock-switches input:focus-visible,.tr-menu button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tr-menu{position:fixed;inset:auto;margin:0;padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:0 5px 20px #0003}
.tr-menu button{min-height:44px;padding:0 .8rem;border-radius:8px;color:inherit}
@media(prefers-reduced-motion:no-preference){.clock-switches input::before{transition:transform 140ms ease}.tr-play{transition:background-color 120ms ease,color 120ms ease}}
@media(forced-colors:active){.clock-switches input{appearance:auto}.clock-switches input::before{display:none}}
.clock-page .cl-header:has([data-clock-action=addTimer]){align-items:center;gap:.55rem}
@container pane (max-width:430px){
  .cl-header .cl-seg button{padding-inline:.46rem}
  .cl-header>.lib-button{padding-inline:.56rem}
}
@media(pointer:coarse){
  .tr-row .icon-button{min-width:44px;min-height:44px}
}

.day-drawer{flex:none;min-width:0;border-top:1px solid var(--line);background:var(--bg);padding:0 clamp(12px,3cqi,24px);z-index:2}
.day-drawer header,.day-drawer-toggle,.day-drawer-tabs,.day-log-add,.day-rules header,.day-rule{display:flex;align-items:center;gap:8px}
.day-drawer header{min-height:49px}
.day-drawer-toggle{flex:1;min-width:0;text-align:left;min-height:44px;font-weight:650}
.day-drawer-toggle small,.day-rule small{color:var(--muted);font-size:.84rem;font-weight:450}
.day-drawer-toggle .icon,.day-log-add .icon,.day-drawer-tabs .icon{width:16px;height:16px}
.day-log-add,.day-drawer-tabs button{color:var(--accent);min-height:44px;padding:0 8px}
.day-drawer-tabs{gap:4px;margin-bottom:3px}
.day-drawer-tabs button{display:inline-flex;align-items:center;gap:5px;border-radius:8px;color:var(--muted)}
.day-drawer-tabs button[aria-pressed=true]{color:var(--ink);background:var(--surface)}
.day-drawer-tabs button.reflect{margin-left:auto}
.day-drawer-scroll{overflow:auto;overscroll-behavior:contain;max-height:min(32dvh,320px);min-height:48px;padding:3px 0 7px}
.day-drawer-rows{display:grid;gap:4px}
.day-drawer-scroll .quiet-copy,.day-reflection{color:var(--muted);margin:10px 2px;font-size:.91rem}
.day-reflection{border-top:1px solid var(--line);padding-top:10px;white-space:pre-line}
.plan-chip.confirmable{display:flex;align-items:stretch}
.plan-chip.confirmable>button[data-open]{flex:1;min-width:0;width:auto}
.plan-chip.confirmable>button.day-result{flex:0 0 44px;min-height:40px;width:44px;display:grid;place-items:center;padding:0;color:var(--muted);font-size:1.2rem}
.day-result i{width:16px;height:16px;display:block;border:1.5px solid currentColor;border-radius:50%}
.plan-chip .day-result.done{color:var(--area)}
.day-drawer-rows .plan-chip{border-radius:8px}
.day-drawer-rows .plan-chip>button[data-open]{font-size:.94rem;min-height:44px;padding-inline:10px}
.day-drawer-rows .plan-chip>button[data-open]>span{white-space:normal}
.day-drawer-rows .plan-chip>button[data-open]>time{display:block}
.day-drawer-rows .plan-chip:has(.skipped)>button[data-open]{color:var(--muted)}
.day-rules header{justify-content:space-between}.day-rule{width:100%;min-height:46px;border-bottom:1px solid var(--line);text-align:left}.day-rule span{flex:1}.day-rule .icon{width:15px}
.day-log-dialog .lib-body{display:grid;gap:.65rem}.day-log-dialog .lib-body label{display:grid;gap:4px}
.day-log-dialog .log-details summary{display:list-item;cursor:pointer;color:var(--muted);padding-block:8px}
.day-log-dialog .log-details[open] label+label{margin-top:.6rem}
@media(pointer:coarse){.plan-chip.confirmable>button.day-result{min-height:44px}}
.plan-chip.confirmable>button.day-skip{flex:none;width:auto;min-width:44px;padding:0 5px;justify-content:center;font-size:.8rem;color:var(--muted)}

.drag-in-progress .toast,.drag-in-progress .capture-hint{visibility:hidden;pointer-events:none}
.day-record-result{font-size:.85rem;color:var(--muted)}

.reflection-widget{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px clamp(12px,3cqi,24px);background:var(--bg)}
.reflection-intro{display:grid;line-height:1.25;min-width:0}
.reflection-intro strong,.journal-writing strong{font-weight:650}
.reflection-intro small{color:var(--muted);font-size:.78rem}
.mood-buttons,.journal-link,.mood-history li,.journal-date,.journal-rating{display:flex;align-items:center}
.mood-buttons{gap:1px}.mood{display:grid;place-items:center;align-content:center;min-height:48px;min-width:44px;gap:1px;border-radius:12px}
.mood svg{width:24px;height:24px}.mood span{font-size:.75rem;color:var(--muted);line-height:1.2}
.mood[data-latest]{background:var(--surface)}.mood[data-latest] span{color:var(--ink)}
.mood-0{color:#d39cab}.mood-1{color:#b8adce}.mood-2{color:#d6bd95}.mood-3{color:#9bc9b8}.mood-4{color:#e7c974}
.mood,.mood-history{--face-ink:#33313b}
.journal-link{color:var(--accent);min-width:44px;min-height:44px;gap:6px;justify-content:center}
.journal-link svg{width:19px;height:19px}
@container (max-width:570px){.reflection-widget{flex-wrap:wrap;gap:0 8px}.reflection-intro{order:0}.journal-link{order:1;margin-left:auto}.mood-buttons{order:2;width:100%;justify-content:space-between}.mood{flex:1}}
.journal-dialog{width:min(510px,calc(100vw - 20px))}
.journal-dialog .lib-body{gap:16px}.journal-date{gap:6px;justify-content:center}.journal-date button{width:44px;height:44px}.journal-date svg{width:17px}.journal-dialog .journal-date input{width:auto}
.journal-dialog h3,.journal-writing strong{font-size:.96rem;margin:0 0 5px}.journal-writing{display:grid}.journal-writing textarea{resize:vertical;line-height:1.55;max-height:35dvh}
.journal-rating{justify-content:space-between;gap:10px;color:var(--muted)}.journal-dialog .journal-rating select{width:auto;max-width:70%}
.journal-source{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;min-height:44px;padding:7px 0}.journal-source>span{display:grid;gap:2px;min-width:0}.journal-source span span{color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}.journal-source svg{width:16px;flex:none;color:var(--muted)}
.mood-history{display:flex;gap:5px 12px;flex-wrap:wrap;list-style:none;margin:0;padding:0}.mood-history li{gap:5px}.mood-history svg{width:20px;height:20px}.mood-history span{color:var(--ink)}.mood-history time,.journal-dialog footer small{color:var(--muted);font-size:.8rem}
.journal-dialog footer{align-items:center;justify-content:space-between}.journal-observations{display:flex;flex-wrap:wrap;gap:4px}.journal-observations button{background:var(--surface);padding:6px 9px;min-height:38px}
.journal-dialog .form-error{overflow-wrap:anywhere;max-height:20dvh;overflow:auto}.day-record-result svg{width:13px;height:13px}
.journal-review summary,.journal-review>div label{min-height:44px;cursor:pointer}.journal-review summary{color:var(--accent);padding-block:10px}
.journal-review>div{max-height:210px;overflow:auto}.journal-review>div label{display:flex;align-items:center;gap:8px}.journal-review small{margin-left:auto;color:var(--muted)}
.journal-review>label{display:grid;gap:4px;margin-block:10px;color:var(--muted)}.journal-return{margin:8px 12px;min-height:44px}
.mood-history{align-items:flex-start}.mood-history li:has(details[open]){flex:1 1 100%}.mood-entry{width:100%}.mood-entry summary{display:flex;align-items:center;gap:5px;min-height:44px;cursor:pointer;list-style:none}.mood-entry summary::-webkit-details-marker{display:none}.mood-entry summary>.icon{width:13px;height:13px;color:var(--muted)}.mood-entry textarea{min-height:60px}

/* Compound rows expose each action separately. The title carries the pointer
   feedback; its larger button still accepts touch and keyboard input. */
:is(.home-act-main,.home-feed-main,.lib-open,.row-main) strong,
.row-main>span,.feed-mark,.lib-mark{transition:color 120ms ease}
:where(.home-icon,.icon-button){position:relative;isolation:isolate}
:is(.home-icon,.icon-button):not(.add-item,.delete-item,.card-drag)::before{
  content:'';pointer-events:none;position:absolute;z-index:-1;
  inset:50% auto auto 50%;transform:translate(-50%,-50%);
  width:min(30px,100%);height:min(30px,100%);border-radius:9px;
  background:color-mix(in srgb,var(--ink) 9%,transparent);opacity:0;
  transition:opacity 120ms ease;
}
@media(hover:hover) and (pointer:fine){
  :is(.lib-open,.home-act-main,.home-feed-main):hover strong,.row-main:hover>span,.cl-report-row:hover strong{color:var(--accent)}
  .lib-open:hover .lib-mark,.home-act-main:hover .lib-mark,.home-feed-main:hover .feed-mark{color:var(--area,var(--accent))}
  :is(.home-icon,.icon-button):not(.add-item,.delete-item,.card-drag):enabled:hover::before{opacity:1}
  .tr-play:enabled:hover:not(.tr-holding){box-shadow:inset 0 0 0 1px color-mix(in srgb,currentColor 28%,transparent);filter:brightness(1.1)}
  :is(.home-link,.text-action,.lib-log-action,.journal-link,.home-timeline-link):enabled:hover{
    color:var(--ink);text-decoration:underline;text-underline-offset:.23em;text-decoration-thickness:1px;
  }
  :is(.lib-config,.log-details,.timer-history,.journal-review)>summary:hover{color:var(--accent)}
}
:is(.home-icon,.icon-button):not(.add-item,.delete-item,.card-drag):enabled:active::before{opacity:1}
@media(pointer:coarse){.tr-row .icon-button{min-width:44px;min-height:44px}}

/* Creation is one shared, compact action everywhere. */
.icon-button.add-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;flex:0 0 44px;color:var(--accent);background:transparent;border:0;border-radius:12px}
.icon-button.add-button .icon{width:22px;height:22px}
.home-clock header time{font-variant-numeric:tabular-nums;font-size:.92rem;color:var(--muted);white-space:nowrap}
.timer-picker-actions{display:flex;gap:4px;align-items:center}
.timer-choice{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px 4px;text-align:left;border-radius:12px;background:transparent}
.timer-choice>i{display:grid;place-items:center;flex:0 0 40px;height:40px;border-radius:12px;background:var(--surface);color:var(--accent);font-style:normal}
.timer-choice>span{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.4}
.timer-choice small{display:block;color:var(--muted);font-size:.82rem;font-weight:400}
.timer-choice>.icon{width:18px;height:18px;flex:none;color:var(--accent)}
[data-timer-choices]{display:grid;margin-top:8px}
.timer-activity-link{display:grid;gap:8px}
[data-timer-link-label]{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}
[data-timer-link-label]>span{display:flex;align-items:center;gap:10px;min-width:0}
[data-timer-link-label]>span>span{display:grid;min-width:0;overflow-wrap:anywhere}
[data-timer-link-label] strong{font-size:.95rem;font-weight:500}
[data-timer-link-label] small{color:var(--muted);font-size:.8rem}
[data-timer-link-label] .icon{flex:none;width:20px;height:20px}
.timer-link-picker{background:var(--surface);padding:12px;border-radius:16px}
.timer-link-picker[hidden]{display:none}
[data-timer-link-results]{max-height:240px;overflow:auto;overscroll-behavior:contain;margin-top:8px}
@media(hover:hover) and (pointer:fine){.timer-choice:hover>span{color:var(--accent)}}
.timer-choice:active>span{color:var(--accent)}
@media(prefers-reduced-motion:no-preference){.timer-choice>span{transition:color 120ms ease}}

.lib-card-actions{display:flex;justify-content:flex-end;padding:0 12px 8px}
.lib-today.is-added{color:var(--area,var(--accent))}
.lib-log-action.icon-button{background:transparent;padding:10px;min-width:44px;min-height:44px}
