/* A result is editable where it is read, without moving the live text hooks. */
.habit-detail-dashboard .habit-result-edit {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 4px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  line-height: 1.3;
}
.habit-result-copy { display: grid; min-width: 0; gap: 5px; }
.habit-result-copy > [data-progress] { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.habit-detail-dashboard .habit-result-edit small {
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0;
  color: var(--muted);
}
.habit-result-edit > svg { color: var(--muted); flex: none; }
.habit-result-edit:hover > svg { color: var(--accent-ink); }
.habit-result-edit:disabled small { display: none; }
.habit-entry-form .sheet-content { display: flex; flex-direction: column; gap: 20px; }
.habit-entry-heading { display: grid; gap: 7px; }
.habit-entry-heading h3 { font-size: 19px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.habit-entry-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.habit-entry-check { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; min-width: 0; border: 0; }
.habit-entry-check legend { padding: 0 0 10px; color: var(--text); font-size: 13px; font-weight: 500; }
.habit-entry-check label { position: relative; min-width: 0; cursor: pointer; }
.habit-entry-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.habit-entry-check label > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 62px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--muted);
}
.habit-entry-empty { width: 20px; height: 20px; border: 1.7px solid currentColor; border-radius: 50%; flex: none; }
.habit-entry-check strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.habit-entry-check input:checked + span { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-border); }
.habit-entry-check input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.habit-entry-form .habit-entry-note { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 0; }
.habit-entry-sessions { margin: 0; border-top: 1px solid var(--line); padding-top: 4px; }
.habit-entry-sessions > :is(summary,.visible-section-heading) { min-height: 46px; display: flex; align-items: center; font-size: 13px; color: var(--muted); }
.habit-entry-sessions .session-row { display: grid; gap: 9px; padding: 14px 0; border-top: 1px solid var(--line); }
.habit-entry-sessions .session-row p { color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.habit-entry-sessions .session-row .btn { justify-self: start; min-height: 42px; font-size: 12px; }

/* The timer has one primary action and a directly editable reading. */
#modal .timer-sheet .sheet-content { padding-top: 14px; }
.timer-sheet .focus-timer { gap: 18px; width: 100%; max-width: 460px; margin: 0 auto; padding: 0 0 12px; }
.timer-sheet .focus-habit { gap: 8px; }
.timer-sheet .focus-habit > svg { color: var(--readable-accent, var(--accent-ink)); }
.timer-sheet .focus-habit p { color: var(--muted); font-size: 12px; }
.timer-sheet .focus-clock { width: min(290px, 78vw); height: min(290px, 78vw); margin: 5px 0 9px; }
.timer-sheet .focus-progress { stroke-width: 5; }
.timer-sheet .focus-progress [data-timer-arc] { stroke: var(--readable-accent, var(--accent-graphic)); }
.timer-sheet .focus-clock > div { width: 100%; height: 100%; gap: 13px; }
.timer-sheet .focus-time-edit {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 74px;
  max-width: 100%;
  padding: 4px 8px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  line-height: 1.2;
}
.timer-sheet .focus-time-edit strong { font-size: clamp(36px, 11vw, 49px); letter-spacing: -.045em; font-weight: 600; font-variant-numeric: tabular-nums; }
.timer-sheet .focus-time-edit > span { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; color: var(--muted); }
.timer-sheet .focus-time-edit:hover > span { color: var(--readable-accent, var(--accent-ink)); }
.timer-sheet .focus-time-edit:disabled > span { display: none; }
.timer-sheet .focus-controls { width: 100%; max-width: 290px; margin: 0 auto; }
.timer-sheet .focus-controls .btn { min-height: 52px; border-radius: 17px; font-size: 15px; }
.timer-sheet .focus-more { margin: 0; }
.timer-sheet .focus-more .btn { min-height: 42px; padding: 8px 12px; font-size: 12px; }
.timer-sheet .focus-note { max-width: 260px; font-size: 11px; line-height: 1.6; }
@media (max-width: 359px) {
  .habit-detail-dashboard .detail-hero {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 16px !important;
  }
  .habit-detail-dashboard .detail-hero > div:last-child { width: 100%; }
  .habit-detail-dashboard .detail-hero h2 { font-size: 23px !important; }
  .habit-detail-dashboard .habit-result-edit { display: block; position: relative; }
  .habit-detail-dashboard .habit-result-edit > svg {
    position: absolute;
    right: 0;
    bottom: 6px;
  }
  .habit-detail-dashboard .habit-result-edit small { padding-right: 28px; }
  .habit-detail-dashboard .detail-hero > .icon-tile {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
  }
  .habit-entry-check label > span { flex-direction: column; gap: 6px; min-height: 78px; }
  .timer-sheet .focus-clock { width: 244px; height: 244px; }
  .timer-sheet .focus-time-edit strong { font-size: 37px; }
}
@media (max-height: 650px) {
  #modal .timer-sheet .sheet-content { padding-top: 6px; }
  .timer-sheet .focus-timer { gap: 12px; }
  .timer-sheet .focus-clock { width: 218px; height: 218px; margin-block: 0; }
  .timer-sheet .focus-time-edit strong { font-size: 34px; }
  .timer-sheet .focus-clock > div { gap: 8px; }
}
