.front-view {
  grid-template-columns: 220px minmax(0, 1fr) 320px;
}

.front-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 18px;
}

.front-head__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.front-head__dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
}

.front-head__name {
  overflow: hidden;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.front-head__meta {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
}

.front-actions {
  display: flex;
  align-items: center;
}

.resume__head .front-actions {
  flex: none;
}

.note__tag {
  white-space: nowrap;
}

.note__text {
  color: var(--text);
  font-size: 16px;
}

.note__text.is-empty {
  color: var(--muted);
  font-size: 15px;
}

.seq {
  display: flex;
  align-items: center;
  margin: 18px 2px 0;
}

.seq__dot {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text);
}

.seq__dot.is-done {
  background: var(--text);
}

.seq__dot.is-next {
  border-color: var(--amber);
  background: var(--amber);
}

.seq__line {
  flex: 1;
  height: 2px;
  background: rgba(227, 232, 239, 0.18);
}

.seq__line.is-done {
  background: var(--text);
}

.note__next {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
}

.note__next-tag {
  flex: none;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--amber);
  color: var(--amber-ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.note__next-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.note__next-count {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
}

.link-btn {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--muted);
}

.steps {
  margin-top: 18px;
}

.step-row {
  display: grid;
  grid-template-columns: 24px 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.step-row__grip {
  display: grid;
  place-items: center;
  height: 44px;
  color: var(--muted);
  opacity: 0.6;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.step-row__check {
  width: 24px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  position: relative;
}

.step-row__check::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 13px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--muted);
  transition: transform var(--dur) var(--ease-in);
}

.step-row__check:active::before {
  transform: scale(0.9);
}

.step-row.is-done .step-row__check::before {
  border-color: var(--text);
  background: var(--text);
}

.step-row.is-next .step-row__check::before {
  border-color: var(--amber);
}

.step-row__text {
  overflow: hidden;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: var(--fs-row);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.step-row.is-done .step-row__text {
  color: var(--muted);
  text-decoration: line-through;
}

.step-row__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--amber);
}

.step-row__input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.quick-add {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.quick-add__label {
  font-size: 12px;
  color: var(--muted);
}

.quick-add__input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color var(--dur) var(--ease-in);
}

.quick-add__input:focus {
  outline: none;
  border-style: solid;
  border-color: var(--accent);
  background: var(--surface);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.chip[aria-pressed='true'] {
  border-color: var(--amber);
  color: var(--amber);
}

.context__tabs {
  margin-bottom: 14px;
}

.context__panel {
  display: grid;
  align-content: start;
}

.context__empty {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.context__new {
  justify-self: start;
}

.log-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
}

.log-row__when {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
}

.note-row {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
}

.note-row__title {
  font-size: var(--fs-row);
  font-weight: 500;
}

.note-row__body {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ctx-task {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-row);
}

.ctx-task__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.ctx-task__text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ctx-task__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
}

.ctx-task.is-done .ctx-task__text {
  color: var(--muted);
  text-decoration: line-through;
}

.textarea {
  min-height: 160px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

.history {
  display: grid;
}

.history__row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.history__when {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
}

.history__text {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.closing__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.closing__option {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: none;
  font-size: 14px;
  color: var(--text);
  text-align: left;
}

.closing__option[aria-pressed='true'] {
  border-color: var(--amber);
  color: var(--amber);
}

.closing__other {
  margin-top: 10px;
}

.close-day {
  display: grid;
  gap: 10px;
}

.close-day__intro,
.close-day__empty {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

.close-day__row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.close-day__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
}

.close-day__text {
  display: grid;
  min-width: 0;
}

.close-day__text b {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.close-day__text small {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
}

.close-day__ready {
  font-size: 13px;
  color: var(--accent);
}

.today .quick-add {
  margin-top: 14px;
}
